@pie-element/extended-text-entry 13.2.2-next.5 → 13.2.2-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/element.js CHANGED
@@ -1 +1 @@
1
- import{_dll_react as e,_dll_classnames as t,_dll_prop_types as n,_dll_material_ui__core as o,_dll_material_ui__core_styles as i,_dll_lodash as s,_dll_debug as a,_dll_pie_lib__render_ui as r,_dll_react_dom as l}from"../../../@pie-lib/shared-module@^1.14.9/module/index.js";import{_dll_pie_lib__math_rendering as d}from"../../../@pie-lib/math-rendering-module@^2.8.0/module/index.js";import{_dll_pie_lib__editable_html as c}from"../../../@pie-lib/editable-html-module@^5.6.9/module/index.js";import{_dll_pie_lib__config_ui as p}from"../../../@pie-lib/config-module@^2.19.9/module/index.js";const h=(e,t,n)=>{const o=n||[],i=o.reduce(((e,t)=>e+t.textContent.length),0);let s=!0;if(i>t)return!1;for(e&&(3===e.nodeType&&e.parentNode&&!e.parentNode.hasAttribute("data-ann-id")&&o.push(e),e=e.firstChild);e&&s;)s=h(e,t,o),e=e.nextSibling;return o},m=e=>{const{commonAncestorContainer:t,startContainer:n,endContainer:o,startOffset:i,endOffset:s}=e,a=[];let r=!1,l=!1,d="";const c=e=>{const{nodeValue:t,childNodes:p}=e;e===n&&e===o?(t&&(d+=t.substring(i,s)),r=l=!0):e===n?(t&&(d+=t.substring(i)),r=!0):e===o?(t&&(d+=t.substring(0,s)),l=!0):e&&3===e.nodeType&&e.parentNode&&!e.parentNode.hasAttribute("data-ann-id")&&t&&r&&!l&&(d+=t,a.push(e)),p.forEach((e=>{l||c(e)}))};return c(t),[a,d]},u=e=>{const t=document.createElement("SPAN");return e.surroundContents(t),t},g=e=>{if(e.startContainer===e.endContainer)return[u(e)];const[t]=m(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);const o=u(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);const s=u(i);return[o,...t.map((e=>{const t=document.createElement("SPAN");return e.parentNode.insertBefore(t,e),t.appendChild(e),t})),s]},b=(e,t)=>{(e||[]).forEach((e=>{const t=e.parentNode,n=e.childNodes,o=n.length;if(o>0)for(let i=0;i<o;i++)t.insertBefore(n[0],e);else t.insertBefore(document.createTextNode(e.textContent),e);t.removeChild(e)})),t.normalize()},f=()=>{document.getSelection?(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange())):window.getSelection?window.getSelection().removeAllRanges?(window.getSelection().removeAllRanges(),window.getSelection().addRange(document.createRange())):window.getSelection().empty&&window.getSelection().empty():document.selection&&document.selection.empty()},v=e=>e.length>=20||-1!==e.search(/\n|\r|\r\n/),C=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),x=e=>document.querySelector(`[data-ann-id='${e}']`),y=e,E=t,_=n,{Popover:w}=o,{TextField:S}=o,{withStyles:A}=i;class R extends y.Component{static __initStatic(){this.propTypes={anchorEl:_.object,open:_.bool,offset:_.number,value:_.string,type:_.string,onClose:_.func,onDelete:_.func,onSave:_.func,onTypeChange:_.func}}constructor(e){super(e),R.prototype.__init.call(this),R.prototype.__init2.call(this),R.prototype.__init3.call(this),this.state={value:e.value}}UNSAFE_componentWillReceiveProps(e){const{value:t}=e,{value:n}=this.props;t!==n&&this.setState({value:t})}__init(){this.onValueChange=e=>this.setState({value:e.target.value})}__init2(){this.handleSave=()=>{const{value:e,onSave:t,onClose:n,onDelete:o}=this.props,{value:i}=this.state;""===i&&o(),e!==i&&t(e,i),this.setState({value:""}),n()}}__init3(){this.handleTypeChange=()=>{const{onTypeChange:e,onDelete:t}=this.props,{value:n}=this.state;""===n?t():e(n),this.setState({value:""})}}render(){const{anchorEl:e,classes:t,offset:n,onDelete:o,open:i,type:s}=this.props,{value:a}=this.state;return y.createElement(w,{anchorEl:e,elevation:2,open:i,onClose:this.handleSave,classes:{paper:E(t.arrow,s)},style:{marginTop:`${n}px`,transition:"margin-top 2s ease-out"},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}},y.createElement("div",{className:E(t.wrapper,s)},y.createElement(S,{id:"annotation-editor",style:{padding:"2px 5px",width:"95%"},autoFocus:!0,multiline:!0,rows:1,rowsMax:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),y.createElement("div",{className:t.holder},y.createElement("div",{className:t.button,onClick:o},"Delete"),y.createElement("div",{className:E(t.button,s),onClick:this.handleTypeChange},"negative"===s?"Green":"Pink"),y.createElement("div",{className:t.button,onClick:this.handleSave},"Save"))))}}R.__initStatic();var k=A((e=>({wrapper:{width:"200px",overflow:"hidden",borderRadius:"4px",backgroundColor:"#ffffff",border:`4px solid ${e.palette.grey[100]}`,"&.negative":{borderColor:"rgb(255, 204, 238) !important"},"&.positive":{borderColor:"rgb(153, 255, 153) !important"}},holder:{display:"flex",flexWrap:"wrap",borderTop:`2px solid ${e.palette.grey[100]}`},positive:{backgroundColor:"rgb(153, 255, 153) !important","&:hover":{filter:"brightness(85%)"}},negative:{backgroundColor:"rgb(255, 204, 238) !important","&:hover":{filter:"brightness(85%)"}},button:{flexGrow:1,width:"28%",textAlign:"center",padding:"4px",cursor:"pointer","&:not(:nth-child(3n))":{borderRight:`1px solid ${e.palette.grey[100]}`},"&:hover":{backgroundColor:e.palette.grey[100]},"&.negative:hover":{backgroundColor:"rgb(153, 255, 153) !important"},"&.positive:hover":{backgroundColor:"rgb(255, 204, 238) !important"}},arrow:{overflowX:"unset",overflowY:"unset",marginLeft:"16px","&::before":{position:"absolute",right:"100%",top:"13px",border:"solid transparent",content:'""',height:0,width:0,pointerEvents:"none",borderWidth:"7px",borderRightColor:e.palette.grey[100]},"&.negative::before":{borderRightColor:"rgb(255, 204, 238) !important"},"&.positive::before":{borderRightColor:"rgb(153, 255, 153) !important"}}})))(R);const N=e,T=t,M=n,{withStyles:L}=i,{Popover:I}=o;class W extends N.Component{static __initStatic(){this.propTypes={anchorEl:M.object,open:M.bool,annotations:M.array,isNewAnnotation:M.bool,onClose:M.func,onDelete:M.func,onEdit:M.func,onWrite:M.func,onAnnotate:M.func}}render(){const{anchorEl:e,annotations:t,classes:n,isNewAnnotation:o,onAnnotate:i,onClose:s,onEdit:a,onDelete:r,onWrite:l,open:d}=this.props;return N.createElement(I,{anchorEl:e,open:d,onClose:s,classes:{paper:n.arrow},elevation:5,anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},N.createElement("div",{className:n.mainWrapper},N.createElement("div",{className:n.annotationsWrapper},t.map(((e,t)=>N.createElement("div",{key:`annotation-${t}`,className:T(n.button,"positive"===e.type?n.positive:n.negative),onClick:()=>i(e)},e.label)))),N.createElement("div",{className:n.controlsWrapper},N.createElement("div",{className:n.button,onClick:s},"Cancel"),N.createElement("div",{style:{pointerEvents:"none"},className:n.button}),o?N.createElement(N.Fragment,null,N.createElement("div",{className:T(n.button,n.positive),onClick:()=>l("positive")},"Write"),N.createElement("div",{className:T(n.button,n.negative),onClick:()=>l("negative")},"Write")):N.createElement(N.Fragment,null,N.createElement("div",{className:n.button,onClick:r},"Delete"),N.createElement("div",{className:n.button,onClick:a},"Edit")))))}}W.__initStatic();var P=L((e=>({mainWrapper:{width:"300px",overflow:"hidden",borderRadius:"4px",backgroundColor:e.palette.common.white,border:`2px solid ${e.palette.grey[100]}`},annotationsWrapper:{display:"flex",flexWrap:"wrap"},controlsWrapper:{display:"flex",flexWrap:"wrap",borderTop:`2px solid ${e.palette.grey[100]}`},button:{width:"22%",textAlign:"center",padding:"4px",cursor:"pointer",borderBottom:`1px solid ${e.palette.grey[100]}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${e.palette.grey[100]}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:e.palette.grey[100]}},positive:{backgroundColor:"rgb(153, 255, 153) !important","&:hover":{filter:"brightness(85%)"}},negative:{backgroundColor:"rgb(255, 204, 238) !important","&:hover":{filter:"brightness(85%)"}},holder:{display:"flex",flexWrap:"wrap",borderTop:`2px solid ${e.palette.grey[100]}`},arrow:{overflowX:"unset",overflowY:"unset",marginTop:"-16px","&::after":{position:"absolute",left:"calc(50% - 7px)",border:"solid transparent",content:'""',height:0,width:0,pointerEvents:"none",borderWidth:"7px",borderTopColor:"black"}}})))(W);const D=e,{withStyles:H}=i,O=t,$=n,z=c,{InputContainer:j}=p;class q extends D.Component{static __initStatic(){this.propTypes={text:$.string,comment:$.string,annotations:$.array,predefinedAnnotations:$.array,onChange:$.func.isRequired,onCommentChange:$.func.isRequired,width:$.number,height:$.number,maxHeight:$.string,disabled:$.bool,disabledMath:$.bool,customKeys:$.array,keypadMode:$.string,classes:$.object.isRequired}}constructor(e){super(e),q.prototype.__init.call(this),q.prototype.__init2.call(this),q.prototype.__init3.call(this),q.prototype.__init4.call(this),q.prototype.__init5.call(this),q.prototype.__init6.call(this),q.prototype.__init7.call(this),q.prototype.__init8.call(this),q.prototype.__init9.call(this),q.prototype.__init10.call(this),q.prototype.__init11.call(this),q.prototype.__init12.call(this),q.prototype.__init13.call(this),q.prototype.__init14.call(this),q.prototype.__init15.call(this),this.state={anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotation:null,annotationIndex:null}}componentDidMount(){const{annotations:e,text:t}=this.props;t&&e.forEach((e=>{const[t,n]=((e,t,n)=>{const o=h(n,t),i=[];let s=0;return o.forEach((n=>{const o=s+n.textContent.length;[e,t].forEach((e=>{s<=e&&e<o&&i.push({node:n,offset:e-s})})),s=o})),i})(e.start,e.end,this.textRef);if(t&&n){const o=document.createRange();o.setStart(t.node,t.offset),o.setEnd(n.node,n.offset);const i=g(o);this.createDOMAnnotation(i,e)}})),this.textRef&&(this.adjustAnnotationsPosition(),this.textRef.addEventListener("scroll",this.adjustAnnotationsPosition))}__init(){this.adjustAnnotationsPosition=()=>{if(this.textRef&&this.labelsRef){const e=this.textRef.offsetLeft+this.textRef.offsetWidth+8;Array.from(this.labelsRef.children).forEach((t=>{const n=C(t.dataset.annId),o=(n[0].offsetTop?n[0].offsetTop:n[0].offsetParent.offsetTop)-this.textRef.scrollTop-6;t.style.top=`${o}px`,t.style.left=`${e}px`}))}}}__init2(){this.handleClick=e=>{const{annotations:t,classes:n}=this.props,{selectionDetails:o}=this.state;if(o)return;const{id:i,annId:s}=e.target.dataset,a=i||s,r=C(a),l=x(a),d=t.findIndex((e=>e.id===a)),c=l.hasAttribute("data-freeform");c&&l.classList.add(n.highlight),this.setState({anchorEl:r[0],openedMenu:!!i||!!s&&!c,openedEditor:!!s&&c,selectedElems:r,labelElem:l,annotationIndex:d,annotation:t[d],selectionDetails:null})}}__init3(){this.handleHover=e=>{const{classes:t}=this.props,{id:n,annId:o}=e.target.dataset,i=n||o,s=C(i),a=x(i),r=a.hasAttribute("data-freeform");s.forEach((e=>e.classList.add(t.hover))),a.classList.add(r?t.sideAnnotationHover:t.labelHover)}}__init4(){this.handleCancelHover=e=>{const{classes:t}=this.props,{id:n,annId:o}=e.target.dataset,i=n||o,s=C(i),a=x(i),r=a.hasAttribute("data-freeform");s.forEach((e=>e.classList.remove(t.hover))),a.classList.remove(r?t.sideAnnotationHover:t.labelHover)}}__init5(){this.handleClose=e=>{const{classes:t}=this.props,{selectedElems:n,labelElem:o}=this.state;n.length&&!n[0].hasAttribute("data-id")&&b(n,this.textRef),o&&o.classList.remove(t.highlight),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),f()}}__init6(){this.handleSelection=e=>{const t=window.getSelection();if(e.detail>2)f();else if(t&&t.rangeCount>0){const e=t.getRangeAt(0),n=e.toString(),o=this.textRef.contains(e.commonAncestorContainer);if(!t.isCollapsed&&""!==n&&o){const t=((e,t)=>{const n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);const[,o]=m(n),[,i]=m(e),s=o.length;return{quote:i,start:s,end:s+i.length}})(e,this.textRef),n=g(e);this.setState({anchorEl:n[0],openedMenu:!0,selectedElems:n,selectionDetails:t})}}}}__init7(){this.deleteAnnotation=()=>{const{annotations:e,onChange:t}=this.props,{selectedElems:n,labelElem:o,annotationIndex:i,annotation:s}=this.state;(v(s.label)?this.labelsRef:n[0]).removeChild(o),b(n,this.textRef),e.splice(i,1),t(e),this.handleClose()}}__init8(){this.createDOMAnnotation=(e,t)=>{const{classes:n,disabled:o}=this.props,{id:i,label:s,type:a}=t;(e||[]).forEach((e=>{e.dataset.id=i,e.className=O(n.annotation,a),e.onclick=!o&&this.handleClick,e.onmouseover=this.handleHover,e.onmouseout=this.handleCancelHover}));const r=e&&e[0]||{},l=document.createElement("SPAN");if(l.dataset.annId=i,l.innerHTML=s,l.onclick=!o&&this.handleClick,l.onmouseover=this.handleHover,l.onmouseout=this.handleCancelHover,v(s)){const e=(r.offsetTop?r.offsetTop:r.offsetParent.offsetTop)-this.textRef.scrollTop,t=this.textRef.offsetLeft+this.textRef.offsetWidth+8;l.dataset.freeform=!0,l.className=O(n.sideAnnotation,a),l.style.top=`${e}px`,l.style.left=`${t}px`,this.labelsRef.appendChild(l)}else l.className=O(n.annotationLabel,a),r.appendChild(l)}}__init9(){this.createNewAnnotation=(e,t)=>{const{selectedElems:n,selectionDetails:o}=this.state,i={id:[o.start,o.end,(new Date).getTime()].join("-"),label:e,type:t,...o};return this.createDOMAnnotation(n,i),i}}__init10(){this.handleMenuClick=e=>{const{annotations:t,onChange:n}=this.props,{annotation:o,annotationIndex:i}=this.state,{type:s,text:a}=e;if(o){const e={...o,label:a,type:s},{type:n,label:r}=o;this.updateLabel(r,e,s!==n&&n),t.splice(i,1,e)}else{const e=this.createNewAnnotation(a,s);t.push(e)}n(t),this.handleClose()}}__init11(){this.editAnnotation=()=>{this.setState({openedMenu:!1,openedEditor:!0})}}__init12(){this.addAnnotation=e=>{const{annotations:t,onChange:n}=this.props,o=this.createNewAnnotation("",e),i=x(o.id);t.push(o),this.setState({openedMenu:!1,openedEditor:!0,annotationIndex:t.length-1,annotation:o,labelElem:i}),n(t)}}__init13(){this.updateLabel=(e,t,n)=>{const{selectedElems:o,labelElem:i}=this.state,{label:s,type:a}=t;v(s)&&v(e)||!v(s)&&!v(e)?(i.innerHTML=s,n&&(i.classList.remove(n),i.classList.add(a),o.forEach((e=>{e.classList.remove(n),e.classList.add(a)})))):v(s)&&!v(e)?(o[0].removeChild(i),this.createDOMAnnotation(o,t)):!v(s)&&v(e)&&(this.labelsRef.removeChild(i),this.createDOMAnnotation(o,t))}}__init14(){this.changeAnnotationType=e=>{const{annotations:t,onChange:n}=this.props,{annotationIndex:o,selectedElems:i}=this.state,{type:s,label:a}=t[o],r="positive"===s?"negative":"positive",l={...t[o],type:r,label:e};i.forEach((e=>{e.classList.remove(s),e.classList.add(r)})),this.updateLabel(a,l,s),t.splice(o,1,l),n(t),this.handleClose()}}__init15(){this.updateAnnotation=(e,t)=>{const{annotations:n,onChange:o}=this.props,{annotationIndex:i}=this.state,s={...n[i],label:t};this.updateLabel(e,s),n.splice(i,1,s),o(n)}}componentWillUnmount(){this.textRef.removeEventListener("scroll",this.adjustAnnotationsPosition)}render(){const{classes:e,comment:t,customKeys:n,disabled:o,disabledMath:i,keypadMode:s,height:a,width:r,maxHeight:l,onCommentChange:d,predefinedAnnotations:c,text:p}=this.props,{anchorEl:h,annotation:m,openedMenu:u,openedEditor:g,selectionDetails:b}=this.state,v=h&&(h.offsetTop?h.offsetTop:h.offsetParent.offsetTop),C=this.textRef&&v?v-this.textRef.scrollTop-8:0;return D.createElement("div",null,D.createElement("div",{className:e.wrapper},D.createElement("div",{className:e.textContainer,style:{width:r-34,minHeight:a,maxHeight:l},ref:e=>this.textRef=e,onMouseDown:o?()=>{}:f,onMouseUp:o?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:p}}),D.createElement("div",{className:e.labelsContainer,ref:e=>this.labelsRef=e})),D.createElement(j,{label:"Comment",className:e.commentContainer},D.createElement(z,{className:e.prompt,markup:t||"",onChange:d,width:r&&(r+104).toString(),disabled:o,pluginProps:{math:{disabled:i,customKeys:n,keypadMode:s,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0}}})),D.createElement(P,{anchorEl:h,open:u&&!o,annotations:c,isNewAnnotation:!!b,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),D.createElement(k,{anchorEl:this.textRef,open:g&&!o,offset:C,value:m&&m.label||"",type:m&&m.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType}))}}q.__initStatic();var B=H((e=>({textContainer:{padding:"10px 120px 10px 16px",backgroundColor:"rgba(0, 0, 0, 0.06)",border:"1px solid #ccc",borderRadius:"4px",overflowY:"scroll",lineHeight:"36px",whiteSpace:"pre-wrap",overflowWrap:"break-word","& p":{margin:0},"& span[data-latex]":{userSelect:"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none"}},labelsContainer:{width:"230px"},wrapper:{position:"relative",overflowX:"hidden",display:"flex"},commentContainer:{paddingTop:2*e.spacing.unit,marginBottom:2*e.spacing.unit,marginTop:2*e.spacing.unit,width:"100%"},annotation:{position:"relative",cursor:"pointer","&.positive":{backgroundColor:"rgb(51, 255, 51, 0.5)"},"&.negative":{backgroundColor:"rgba(255, 102, 204, 0.4)"}},annotationLabel:{backgroundColor:"rgb(242, 242, 242)",padding:"2px",position:"absolute",userSelect:"none",whiteSpace:"nowrap",top:"-10px",left:"-2px",fontSize:e.typography.fontSize-2,fontStyle:"normal",fontWeight:"normal",lineHeight:"6px","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","&.positive":{color:"rgb(0, 128, 0)"},"&.negative":{color:"rgb(204, 0, 136)"}},labelHover:{zIndex:20,"&.positive":{color:"rgb(0, 77, 0)"},"&.negative":{color:"rgb(153, 0, 102)"}},highlight:{zIndex:10},hover:{zIndex:20,"&.positive":{backgroundColor:"rgb(51, 255, 51, 0.7)"},"&.negative":{backgroundColor:"rgba(255, 102, 204, 0.55)"}},sideAnnotationHover:{zIndex:20,"&.negative":{backgroundColor:"rgb(255, 179, 230) !important","&:before":{borderRightColor:"rgb(255, 179, 230) !important"}},"&.positive":{backgroundColor:"rgb(128, 255, 128) !important","&:before":{borderRightColor:"rgb(153, 255, 153) !important"}}},sideAnnotation:{position:"absolute",padding:e.spacing.unit/2,borderRadius:"4px",marginLeft:e.spacing.unit,width:"180px",whiteSpace:"pre-wrap",wordBreak:"break-word",border:`2px solid ${e.palette.common.white}`,fontSize:e.typography.fontSize,fontStyle:"normal",fontWeight:"normal","&:before":{position:"absolute",right:"100%",top:"5px",border:"solid transparent",content:'""',height:0,width:0,pointerEvents:"none",borderWidth:"7px"},"&.negative":{backgroundColor:"rgb(255, 204, 238)","&:before":{borderRightColor:"rgb(255, 204, 238)"}},"&.positive":{backgroundColor:"rgb(153, 255, 153)","&:before":{borderRightColor:"rgb(153, 255, 153)"}}}})))(q);const K=e,F=n,V=t,{debounce:Y}=s,U=a,{Typography:G}=o,{withStyles:X}=i,{color:Q}=r,{Feedback:J}=r,{Collapsible:Z}=r,{PreviewPrompt:ee}=r,{UiLayout:te}=r,ne=c,oe=U("@pie-ui:extended-text-entry");class ie extends K.Component{constructor(...e){super(...e),ie.prototype.__init.call(this),ie.prototype.__init2.call(this)}static __initStatic(){this.propTypes={onValueChange:F.func.isRequired,onAnnotationsChange:F.func.isRequired,onCommentChange:F.func.isRequired,model:F.object,classes:F.object.isRequired,session:F.shape({value:F.string,annotations:F.array,comment:F.string}).isRequired}}__init(){this.changeSessionValue=Y(this.props.onValueChange,1500)}__init2(){this.changeSessionComment=Y(this.props.onCommentChange,1500)}render(){const{model:e,classes:t,session:n,onAnnotationsChange:o}=this.props,{animationsDisabled:i,annotatorMode:s,customKeys:a,dimensions:r,disabled:l,disabledAnnotator:d,equationEditor:c,extraCSSRules:p,feedback:h,mathInput:m,playersToolbarPosition:u,predefinedAnnotations:g,prompt:b,spanishInput:f,specialInput:v,spellCheckEnabled:C,teacherInstructions:x}=e,{annotations:y,comment:E,value:_}=n,{width:w,height:S}=r||{},A="40vh",R={position:"top"===u?"top":"bottom"};oe("[render] disabled? ",l);const k=K.createElement(ee,{defaultClassName:"teacher-instructions",prompt:x}),N=[];return f&&N.push({language:"spanish"}),v&&N.push({language:"special"}),K.createElement(te,{extraCSSRules:p,className:t.main,ref:e=>{this.containerRef=e}},K.createElement("h2",{className:t.srOnly},"Constructed Response Question"),x&&K.createElement("div",{className:t.teacherInstructions},i?k:K.createElement(Z,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"},className:t.collapsible},k)),b&&K.createElement(G,{component:"span",className:t.prompt},K.createElement(ee,{defaultClassName:"prompt",prompt:e.prompt})),s?K.createElement(B,{text:_||"",annotations:y||[],comment:E||"",predefinedAnnotations:g||[],onChange:o,onCommentChange:this.changeSessionComment,width:w,height:S,maxHeight:A,disabled:d,disabledMath:!m,customKeys:a,keypadMode:c}):K.createElement(ne,{className:V(t.editor,"response-area-editor"),onChange:this.changeSessionValue,markup:_||"",maxWidth:w&&w.toString(),minWidth:"100px",minHeight:S&&S.toString(),maxHeight:A,disabled:l,highlightShape:!0,toolbarOpts:R,spellCheck:C,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!m,customKeys:this.props.model.customKeys,keypadMode:this.props.model.equationEditor,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},table:{disabled:!0},textAlign:{disabled:!0},separateParagraphs:{disabled:!1}},languageCharactersProps:N}),h&&K.createElement(J,{correctness:"correct",feedback:h}))}}ie.__initStatic();var se=X((e=>({main:{backgroundColor:Q.background(),color:Q.text()},prompt:{width:"100%",color:Q.text(),marginBottom:2*e.spacing.unit,fontSize:"inherit"},teacherInstructions:{marginBottom:2*e.spacing.unit},editor:{marginBottom:2*e.spacing.unit,borderRadius:"4px"},srOnly:{position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}})))(ie),ae={};Object.defineProperty(ae,"__esModule",{value:!0});class re extends CustomEvent{constructor(e,t,n){super(re.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e,hasModel:n}}),this.component=e,this.complete=t}}re.TYPE="model-set";var le=ae.ModelSetEvent=re;class de extends CustomEvent{constructor(e,t){super(de.TYPE,{bubbles:!0,composed:!0,detail:{complete:t,component:e}}),this.component=e,this.complete=t}}de.TYPE="session-changed";var ce=ae.SessionChangedEvent=de;const pe=e,he=l,me=a,{renderMath:ue}=d,ge=me("@pie-elements:extended-text-entry"),be=void 0!==typeof window?new DOMParser:{parseFromString:e=>e};function fe(e){if("string"==typeof e)try{const t=be.parseFromString(e,"text/html");return t.body.textContent}catch(t){return ge("tried to parse as dom and failed",e),e}}function ve(e){const t=fe(e);return void 0!==t&&t.length>0}class Ce extends HTMLElement{constructor(){super(),this._model=null,this._session=null}setLangAttribute(){const e=this._model&&(this._model.language,1)?this._model.language:"",t=e?e.slice(0,2):"en";this.setAttribute("lang",t)}set model(e){this._model=e,this.dispatchEvent(new le(this.tagName.toLowerCase(),!1,!!this._model)),this.render()}set session(e){this._session=e,this.render()}get session(){return this._session}valueChange(e){this._session.value=e,this.dispatchEvent(new ce(this.tagName.toLowerCase(),ve(e))),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new ce(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this.dispatchEvent(new ce(this.tagName.toLowerCase(),ve(e))),this.render()}connectedCallback(){this.setAttribute("aria-label","Written Response Question"),this.setAttribute("role","region"),this.render()}render(){if(this._model&&this._session){let e=pe.createElement(se,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),he.render(e,this,(()=>{ue(this)}))}}}export{Ce as default,ve as isComplete,fe as textContent};
1
+ import{_dll_react,_dll_classnames,_dll_prop_types,_dll_material_ui__core,_dll_material_ui__core_styles,_dll_lodash,_dll_debug,_dll_pie_lib__render_ui,_dll_react_dom}from"../../../@pie-lib/shared-module@^1.14.10/module/index.js";import{_dll_pie_lib__editable_html}from"../../../@pie-lib/editable-html-module@^5.6.9/module/index.js";import{_dll_pie_lib__config_ui}from"../../../@pie-lib/config-module@^2.19.9/module/index.js";const getAllTextNodesBeforePosition=(t,e,r)=>{const n=r||[],o=n.reduce(((t,e)=>t+e.textContent.length),0);let i=!0;if(o>e)return!1;for(t&&(3===t.nodeType&&t.parentNode&&!t.parentNode.hasAttribute("data-ann-id")&&n.push(t),t=t.firstChild);t&&i;)i=getAllTextNodesBeforePosition(t,e,n),t=t.nextSibling;return n},getDOMNodes=(t,e,r)=>{const n=getAllTextNodesBeforePosition(r,e),o=[];let i=0;return n.forEach((r=>{const n=i+r.textContent.length;[t,e].forEach((t=>{i<=t&&t<n&&o.push({node:r,offset:t-i})})),i=n})),o},getTextNodesBetween=t=>{const{commonAncestorContainer:e,startContainer:r,endContainer:n,startOffset:o,endOffset:i}=t,a=[];let s=!1,l=!1,c="";const u=t=>{const{nodeValue:e,childNodes:d}=t;t===r&&t===n?(e&&(c+=e.substring(o,i)),s=l=!0):t===r?(e&&(c+=e.substring(o)),s=!0):t===n?(e&&(c+=e.substring(0,i)),l=!0):t&&3===t.nodeType&&t.parentNode&&!t.parentNode.hasAttribute("data-ann-id")&&e&&s&&!l&&(c+=e,a.push(t)),d.forEach((t=>{l||u(t)}))};return u(e),[a,c]},surroundContent=t=>{const e=document.createElement("SPAN");return t.surroundContents(e),e},wrapRange=t=>{if(t.startContainer===t.endContainer)return[surroundContent(t)];const[e]=getTextNodesBetween(t),r=document.createRange();r.selectNodeContents(t.startContainer),r.setStart(t.startContainer,t.startOffset);const n=surroundContent(r),o=document.createRange();o.selectNode(t.endContainer),o.setEnd(t.endContainer,t.endOffset);const i=surroundContent(o);return[n,...e.map((t=>{const e=document.createElement("SPAN");return t.parentNode.insertBefore(e,t),e.appendChild(t),e})),i]},getRangeDetails=(t,e)=>{const r=document.createRange();r.setStart(e,0),r.setEnd(t.startContainer,t.startOffset);const[,n]=getTextNodesBetween(r),[,o]=getTextNodesBetween(t),i=n.length;return{quote:o,start:i,end:i+o.length}},removeElemsWrapping=(t,e)=>{(t||[]).forEach((t=>{const e=t.parentNode,r=t.childNodes,n=r.length;if(n>0)for(let o=0;o<n;o++)e.insertBefore(r[0],t);else e.insertBefore(document.createTextNode(t.textContent),t);e.removeChild(t)})),e.normalize()},clearSelection=()=>{document.getSelection?(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange())):window.getSelection?window.getSelection().removeAllRanges?(window.getSelection().removeAllRanges(),window.getSelection().addRange(document.createRange())):window.getSelection().empty&&window.getSelection().empty():document.selection&&document.selection.empty()},isSideLabel=t=>t.length>=20||-1!==t.search(/\n|\r|\r\n/),getAnnotationElements=t=>Array.from(document.querySelectorAll(`[data-id='${t}']`)),getLabelElement=t=>document.querySelector(`[data-ann-id='${t}']`),React$4=_dll_react,classNames$2=_dll_classnames,PropTypes$3=_dll_prop_types,{Popover:Popover$1}=_dll_material_ui__core,{TextField:TextField}=_dll_material_ui__core,{withStyles:withStyles$3}=_dll_material_ui__core_styles,styles$1=t=>({wrapper:{width:"200px",overflow:"hidden",borderRadius:"4px",backgroundColor:"#ffffff",border:`4px solid ${t.palette.grey[100]}`,"&.negative":{borderColor:"rgb(255, 204, 238) !important"},"&.positive":{borderColor:"rgb(153, 255, 153) !important"}},holder:{display:"flex",flexWrap:"wrap",borderTop:`2px solid ${t.palette.grey[100]}`},positive:{backgroundColor:"rgb(153, 255, 153) !important","&:hover":{filter:"brightness(85%)"}},negative:{backgroundColor:"rgb(255, 204, 238) !important","&:hover":{filter:"brightness(85%)"}},button:{flexGrow:1,width:"28%",textAlign:"center",padding:"4px",cursor:"pointer","&:not(:nth-child(3n))":{borderRight:`1px solid ${t.palette.grey[100]}`},"&:hover":{backgroundColor:t.palette.grey[100]},"&.negative:hover":{backgroundColor:"rgb(153, 255, 153) !important"},"&.positive:hover":{backgroundColor:"rgb(255, 204, 238) !important"}},arrow:{overflowX:"unset",overflowY:"unset",marginLeft:"16px","&::before":{position:"absolute",right:"100%",top:"13px",border:"solid transparent",content:'""',height:0,width:0,pointerEvents:"none",borderWidth:"7px",borderRightColor:t.palette.grey[100]},"&.negative::before":{borderRightColor:"rgb(255, 204, 238) !important"},"&.positive::before":{borderRightColor:"rgb(153, 255, 153) !important"}}});class FreeformEditor extends React$4.Component{static __initStatic(){this.propTypes={anchorEl:PropTypes$3.object,open:PropTypes$3.bool,offset:PropTypes$3.number,value:PropTypes$3.string,type:PropTypes$3.string,onClose:PropTypes$3.func,onDelete:PropTypes$3.func,onSave:PropTypes$3.func,onTypeChange:PropTypes$3.func}}constructor(t){super(t),FreeformEditor.prototype.__init.call(this),FreeformEditor.prototype.__init2.call(this),FreeformEditor.prototype.__init3.call(this),this.state={value:t.value}}UNSAFE_componentWillReceiveProps(t){const{value:e}=t,{value:r}=this.props;e!==r&&this.setState({value:e})}__init(){this.onValueChange=t=>this.setState({value:t.target.value})}__init2(){this.handleSave=()=>{const{value:t,onSave:e,onClose:r,onDelete:n}=this.props,{value:o}=this.state;""===o&&n(),t!==o&&e(t,o),this.setState({value:""}),r()}}__init3(){this.handleTypeChange=()=>{const{onTypeChange:t,onDelete:e}=this.props,{value:r}=this.state;""===r?e():t(r),this.setState({value:""})}}render(){const{anchorEl:t,classes:e,offset:r,onDelete:n,open:o,type:i}=this.props,{value:a}=this.state;return React$4.createElement(Popover$1,{anchorEl:t,elevation:2,open:o,onClose:this.handleSave,classes:{paper:classNames$2(e.arrow,i)},style:{marginTop:`${r}px`,transition:"margin-top 2s ease-out"},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}},React$4.createElement("div",{className:classNames$2(e.wrapper,i)},React$4.createElement(TextField,{id:"annotation-editor",style:{padding:"2px 5px",width:"95%"},autoFocus:!0,multiline:!0,rows:1,rowsMax:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),React$4.createElement("div",{className:e.holder},React$4.createElement("div",{className:e.button,onClick:n},"Delete"),React$4.createElement("div",{className:classNames$2(e.button,i),onClick:this.handleTypeChange},"negative"===i?"Green":"Pink"),React$4.createElement("div",{className:e.button,onClick:this.handleSave},"Save"))))}}FreeformEditor.__initStatic();var FreeformEditor$1=withStyles$3(styles$1)(FreeformEditor);const React$3=_dll_react,classNames$1=_dll_classnames,PropTypes$2=_dll_prop_types,{withStyles:withStyles$2}=_dll_material_ui__core_styles,{Popover:Popover}=_dll_material_ui__core,styles=t=>({mainWrapper:{width:"300px",overflow:"hidden",borderRadius:"4px",backgroundColor:t.palette.common.white,border:`2px solid ${t.palette.grey[100]}`},annotationsWrapper:{display:"flex",flexWrap:"wrap"},controlsWrapper:{display:"flex",flexWrap:"wrap",borderTop:`2px solid ${t.palette.grey[100]}`},button:{width:"22%",textAlign:"center",padding:"4px",cursor:"pointer",borderBottom:`1px solid ${t.palette.grey[100]}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${t.palette.grey[100]}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:t.palette.grey[100]}},positive:{backgroundColor:"rgb(153, 255, 153) !important","&:hover":{filter:"brightness(85%)"}},negative:{backgroundColor:"rgb(255, 204, 238) !important","&:hover":{filter:"brightness(85%)"}},holder:{display:"flex",flexWrap:"wrap",borderTop:`2px solid ${t.palette.grey[100]}`},arrow:{overflowX:"unset",overflowY:"unset",marginTop:"-16px","&::after":{position:"absolute",left:"calc(50% - 7px)",border:"solid transparent",content:'""',height:0,width:0,pointerEvents:"none",borderWidth:"7px",borderTopColor:"black"}}});class AnnotationMenu extends React$3.Component{static __initStatic(){this.propTypes={anchorEl:PropTypes$2.object,open:PropTypes$2.bool,annotations:PropTypes$2.array,isNewAnnotation:PropTypes$2.bool,onClose:PropTypes$2.func,onDelete:PropTypes$2.func,onEdit:PropTypes$2.func,onWrite:PropTypes$2.func,onAnnotate:PropTypes$2.func}}render(){const{anchorEl:t,annotations:e,classes:r,isNewAnnotation:n,onAnnotate:o,onClose:i,onEdit:a,onDelete:s,onWrite:l,open:c}=this.props;return React$3.createElement(Popover,{anchorEl:t,open:c,onClose:i,classes:{paper:r.arrow},elevation:5,anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},React$3.createElement("div",{className:r.mainWrapper},React$3.createElement("div",{className:r.annotationsWrapper},e.map(((t,e)=>React$3.createElement("div",{key:`annotation-${e}`,className:classNames$1(r.button,"positive"===t.type?r.positive:r.negative),onClick:()=>o(t)},t.label)))),React$3.createElement("div",{className:r.controlsWrapper},React$3.createElement("div",{className:r.button,onClick:i},"Cancel"),React$3.createElement("div",{style:{pointerEvents:"none"},className:r.button}),n?React$3.createElement(React$3.Fragment,null,React$3.createElement("div",{className:classNames$1(r.button,r.positive),onClick:()=>l("positive")},"Write"),React$3.createElement("div",{className:classNames$1(r.button,r.negative),onClick:()=>l("negative")},"Write")):React$3.createElement(React$3.Fragment,null,React$3.createElement("div",{className:r.button,onClick:s},"Delete"),React$3.createElement("div",{className:r.button,onClick:a},"Edit")))))}}AnnotationMenu.__initStatic();var AnnotationMenu$1=withStyles$2(styles)(AnnotationMenu);const React$2=_dll_react,{withStyles:withStyles$1}=_dll_material_ui__core_styles,classNames=_dll_classnames,PropTypes$1=_dll_prop_types,EditableHtml$1=_dll_pie_lib__editable_html,{InputContainer:InputContainer}=_dll_pie_lib__config_ui,style$1=t=>({textContainer:{padding:"10px 120px 10px 16px",backgroundColor:"rgba(0, 0, 0, 0.06)",border:"1px solid #ccc",borderRadius:"4px",overflowY:"scroll",lineHeight:"36px",whiteSpace:"pre-wrap",overflowWrap:"break-word","& p":{margin:0},"& span[data-latex]":{userSelect:"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none"}},labelsContainer:{width:"230px"},wrapper:{position:"relative",overflowX:"hidden",display:"flex"},commentContainer:{paddingTop:2*t.spacing.unit,marginBottom:2*t.spacing.unit,marginTop:2*t.spacing.unit,width:"100%"},annotation:{position:"relative",cursor:"pointer","&.positive":{backgroundColor:"rgb(51, 255, 51, 0.5)"},"&.negative":{backgroundColor:"rgba(255, 102, 204, 0.4)"}},annotationLabel:{backgroundColor:"rgb(242, 242, 242)",padding:"2px",position:"absolute",userSelect:"none",whiteSpace:"nowrap",top:"-10px",left:"-2px",fontSize:t.typography.fontSize-2,fontStyle:"normal",fontWeight:"normal",lineHeight:"6px","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","&.positive":{color:"rgb(0, 128, 0)"},"&.negative":{color:"rgb(204, 0, 136)"}},labelHover:{zIndex:20,"&.positive":{color:"rgb(0, 77, 0)"},"&.negative":{color:"rgb(153, 0, 102)"}},highlight:{zIndex:10},hover:{zIndex:20,"&.positive":{backgroundColor:"rgb(51, 255, 51, 0.7)"},"&.negative":{backgroundColor:"rgba(255, 102, 204, 0.55)"}},sideAnnotationHover:{zIndex:20,"&.negative":{backgroundColor:"rgb(255, 179, 230) !important","&:before":{borderRightColor:"rgb(255, 179, 230) !important"}},"&.positive":{backgroundColor:"rgb(128, 255, 128) !important","&:before":{borderRightColor:"rgb(153, 255, 153) !important"}}},sideAnnotation:{position:"absolute",padding:t.spacing.unit/2,borderRadius:"4px",marginLeft:t.spacing.unit,width:"180px",whiteSpace:"pre-wrap",wordBreak:"break-word",border:`2px solid ${t.palette.common.white}`,fontSize:t.typography.fontSize,fontStyle:"normal",fontWeight:"normal","&:before":{position:"absolute",right:"100%",top:"5px",border:"solid transparent",content:'""',height:0,width:0,pointerEvents:"none",borderWidth:"7px"},"&.negative":{backgroundColor:"rgb(255, 204, 238)","&:before":{borderRightColor:"rgb(255, 204, 238)"}},"&.positive":{backgroundColor:"rgb(153, 255, 153)","&:before":{borderRightColor:"rgb(153, 255, 153)"}}}});class AnnotationEditor extends React$2.Component{static __initStatic(){this.propTypes={text:PropTypes$1.string,comment:PropTypes$1.string,annotations:PropTypes$1.array,predefinedAnnotations:PropTypes$1.array,onChange:PropTypes$1.func.isRequired,onCommentChange:PropTypes$1.func.isRequired,width:PropTypes$1.number,height:PropTypes$1.number,maxHeight:PropTypes$1.string,disabled:PropTypes$1.bool,disabledMath:PropTypes$1.bool,customKeys:PropTypes$1.array,keypadMode:PropTypes$1.string,classes:PropTypes$1.object.isRequired}}constructor(t){super(t),AnnotationEditor.prototype.__init.call(this),AnnotationEditor.prototype.__init2.call(this),AnnotationEditor.prototype.__init3.call(this),AnnotationEditor.prototype.__init4.call(this),AnnotationEditor.prototype.__init5.call(this),AnnotationEditor.prototype.__init6.call(this),AnnotationEditor.prototype.__init7.call(this),AnnotationEditor.prototype.__init8.call(this),AnnotationEditor.prototype.__init9.call(this),AnnotationEditor.prototype.__init10.call(this),AnnotationEditor.prototype.__init11.call(this),AnnotationEditor.prototype.__init12.call(this),AnnotationEditor.prototype.__init13.call(this),AnnotationEditor.prototype.__init14.call(this),AnnotationEditor.prototype.__init15.call(this),this.state={anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotation:null,annotationIndex:null}}componentDidMount(){const{annotations:t,text:e}=this.props;e&&t.forEach((t=>{const[e,r]=getDOMNodes(t.start,t.end,this.textRef);if(e&&r){const n=document.createRange();n.setStart(e.node,e.offset),n.setEnd(r.node,r.offset);const o=wrapRange(n);this.createDOMAnnotation(o,t)}})),this.textRef&&(this.adjustAnnotationsPosition(),this.textRef.addEventListener("scroll",this.adjustAnnotationsPosition))}__init(){this.adjustAnnotationsPosition=()=>{if(this.textRef&&this.labelsRef){const t=this.textRef.offsetLeft+this.textRef.offsetWidth+8;Array.from(this.labelsRef.children).forEach((e=>{const r=getAnnotationElements(e.dataset.annId),n=(r[0].offsetTop?r[0].offsetTop:r[0].offsetParent.offsetTop)-this.textRef.scrollTop-6;e.style.top=`${n}px`,e.style.left=`${t}px`}))}}}__init2(){this.handleClick=t=>{const{annotations:e,classes:r}=this.props,{selectionDetails:n}=this.state;if(n)return;const{id:o,annId:i}=t.target.dataset,a=o||i,s=getAnnotationElements(a),l=getLabelElement(a),c=e.findIndex((t=>t.id===a)),u=l.hasAttribute("data-freeform");u&&l.classList.add(r.highlight),this.setState({anchorEl:s[0],openedMenu:!!o||!!i&&!u,openedEditor:!!i&&u,selectedElems:s,labelElem:l,annotationIndex:c,annotation:e[c],selectionDetails:null})}}__init3(){this.handleHover=t=>{const{classes:e}=this.props,{id:r,annId:n}=t.target.dataset,o=r||n,i=getAnnotationElements(o),a=getLabelElement(o),s=a.hasAttribute("data-freeform");i.forEach((t=>t.classList.add(e.hover))),a.classList.add(s?e.sideAnnotationHover:e.labelHover)}}__init4(){this.handleCancelHover=t=>{const{classes:e}=this.props,{id:r,annId:n}=t.target.dataset,o=r||n,i=getAnnotationElements(o),a=getLabelElement(o),s=a.hasAttribute("data-freeform");i.forEach((t=>t.classList.remove(e.hover))),a.classList.remove(s?e.sideAnnotationHover:e.labelHover)}}__init5(){this.handleClose=t=>{const{classes:e}=this.props,{selectedElems:r,labelElem:n}=this.state;r.length&&!r[0].hasAttribute("data-id")&&removeElemsWrapping(r,this.textRef),n&&n.classList.remove(e.highlight),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),clearSelection()}}__init6(){this.handleSelection=t=>{const e=window.getSelection();if(t.detail>2)clearSelection();else if(e&&e.rangeCount>0){const t=e.getRangeAt(0),r=t.toString(),n=this.textRef.contains(t.commonAncestorContainer);if(!e.isCollapsed&&""!==r&&n){const e=getRangeDetails(t,this.textRef),r=wrapRange(t);this.setState({anchorEl:r[0],openedMenu:!0,selectedElems:r,selectionDetails:e})}}}}__init7(){this.deleteAnnotation=()=>{const{annotations:t,onChange:e}=this.props,{selectedElems:r,labelElem:n,annotationIndex:o,annotation:i}=this.state;(isSideLabel(i.label)?this.labelsRef:r[0]).removeChild(n),removeElemsWrapping(r,this.textRef),t.splice(o,1),e(t),this.handleClose()}}__init8(){this.createDOMAnnotation=(t,e)=>{const{classes:r,disabled:n}=this.props,{id:o,label:i,type:a}=e;(t||[]).forEach((t=>{t.dataset.id=o,t.className=classNames(r.annotation,a),t.onclick=!n&&this.handleClick,t.onmouseover=this.handleHover,t.onmouseout=this.handleCancelHover}));const s=t&&t[0]||{},l=document.createElement("SPAN");if(l.dataset.annId=o,l.innerHTML=i,l.onclick=!n&&this.handleClick,l.onmouseover=this.handleHover,l.onmouseout=this.handleCancelHover,isSideLabel(i)){const t=(s.offsetTop?s.offsetTop:s.offsetParent.offsetTop)-this.textRef.scrollTop,e=this.textRef.offsetLeft+this.textRef.offsetWidth+8;l.dataset.freeform=!0,l.className=classNames(r.sideAnnotation,a),l.style.top=`${t}px`,l.style.left=`${e}px`,this.labelsRef.appendChild(l)}else l.className=classNames(r.annotationLabel,a),s.appendChild(l)}}__init9(){this.createNewAnnotation=(t,e)=>{const{selectedElems:r,selectionDetails:n}=this.state,o={id:[n.start,n.end,(new Date).getTime()].join("-"),label:t,type:e,...n};return this.createDOMAnnotation(r,o),o}}__init10(){this.handleMenuClick=t=>{const{annotations:e,onChange:r}=this.props,{annotation:n,annotationIndex:o}=this.state,{type:i,text:a}=t;if(n){const t={...n,label:a,type:i},{type:r,label:s}=n;this.updateLabel(s,t,i!==r&&r),e.splice(o,1,t)}else{const t=this.createNewAnnotation(a,i);e.push(t)}r(e),this.handleClose()}}__init11(){this.editAnnotation=()=>{this.setState({openedMenu:!1,openedEditor:!0})}}__init12(){this.addAnnotation=t=>{const{annotations:e,onChange:r}=this.props,n=this.createNewAnnotation("",t),o=getLabelElement(n.id);e.push(n),this.setState({openedMenu:!1,openedEditor:!0,annotationIndex:e.length-1,annotation:n,labelElem:o}),r(e)}}__init13(){this.updateLabel=(t,e,r)=>{const{selectedElems:n,labelElem:o}=this.state,{label:i,type:a}=e;isSideLabel(i)&&isSideLabel(t)||!isSideLabel(i)&&!isSideLabel(t)?(o.innerHTML=i,r&&(o.classList.remove(r),o.classList.add(a),n.forEach((t=>{t.classList.remove(r),t.classList.add(a)})))):isSideLabel(i)&&!isSideLabel(t)?(n[0].removeChild(o),this.createDOMAnnotation(n,e)):!isSideLabel(i)&&isSideLabel(t)&&(this.labelsRef.removeChild(o),this.createDOMAnnotation(n,e))}}__init14(){this.changeAnnotationType=t=>{const{annotations:e,onChange:r}=this.props,{annotationIndex:n,selectedElems:o}=this.state,{type:i,label:a}=e[n],s="positive"===i?"negative":"positive",l={...e[n],type:s,label:t};o.forEach((t=>{t.classList.remove(i),t.classList.add(s)})),this.updateLabel(a,l,i),e.splice(n,1,l),r(e),this.handleClose()}}__init15(){this.updateAnnotation=(t,e)=>{const{annotations:r,onChange:n}=this.props,{annotationIndex:o}=this.state,i={...r[o],label:e};this.updateLabel(t,i),r.splice(o,1,i),n(r)}}componentWillUnmount(){this.textRef.removeEventListener("scroll",this.adjustAnnotationsPosition)}render(){const{classes:t,comment:e,customKeys:r,disabled:n,disabledMath:o,keypadMode:i,height:a,width:s,maxHeight:l,onCommentChange:c,predefinedAnnotations:u,text:d}=this.props,{anchorEl:p,annotation:m,openedMenu:h,openedEditor:f,selectionDetails:_}=this.state,g=p&&(p.offsetTop?p.offsetTop:p.offsetParent.offsetTop),y=this.textRef&&g?g-this.textRef.scrollTop-8:0;return React$2.createElement("div",null,React$2.createElement("div",{className:t.wrapper},React$2.createElement("div",{className:t.textContainer,style:{width:s-34,minHeight:a,maxHeight:l},ref:t=>this.textRef=t,onMouseDown:n?()=>{}:clearSelection,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:d}}),React$2.createElement("div",{className:t.labelsContainer,ref:t=>this.labelsRef=t})),React$2.createElement(InputContainer,{label:"Comment",className:t.commentContainer},React$2.createElement(EditableHtml$1,{className:t.prompt,markup:e||"",onChange:c,width:s&&(s+104).toString(),disabled:n,pluginProps:{math:{disabled:o,customKeys:r,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0}}})),React$2.createElement(AnnotationMenu$1,{anchorEl:p,open:h&&!n,annotations:u,isNewAnnotation:!!_,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),React$2.createElement(FreeformEditor$1,{anchorEl:this.textRef,open:f&&!n,offset:y,value:m&&m.label||"",type:m&&m.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType}))}}AnnotationEditor.__initStatic();var AnnotationEditor$1=withStyles$1(style$1)(AnnotationEditor);const React$1=_dll_react,PropTypes=_dll_prop_types,classnames=_dll_classnames,{debounce:debounce}=_dll_lodash,debug$2=_dll_debug,{Typography:Typography}=_dll_material_ui__core,{withStyles:withStyles}=_dll_material_ui__core_styles,{color:color}=_dll_pie_lib__render_ui,{Feedback:Feedback}=_dll_pie_lib__render_ui,{Collapsible:Collapsible}=_dll_pie_lib__render_ui,{PreviewPrompt:PreviewPrompt}=_dll_pie_lib__render_ui,{UiLayout:UiLayout}=_dll_pie_lib__render_ui,EditableHtml=_dll_pie_lib__editable_html,log$2=debug$2("@pie-ui:extended-text-entry"),style=t=>({main:{backgroundColor:color.background(),color:color.text()},prompt:{width:"100%",color:color.text(),marginBottom:2*t.spacing.unit,fontSize:"inherit"},teacherInstructions:{marginBottom:2*t.spacing.unit},editor:{marginBottom:2*t.spacing.unit,borderRadius:"4px"},srOnly:{position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden"}});class Main extends React$1.Component{constructor(...t){super(...t),Main.prototype.__init.call(this),Main.prototype.__init2.call(this)}static __initStatic(){this.propTypes={onValueChange:PropTypes.func.isRequired,onAnnotationsChange:PropTypes.func.isRequired,onCommentChange:PropTypes.func.isRequired,model:PropTypes.object,classes:PropTypes.object.isRequired,session:PropTypes.shape({value:PropTypes.string,annotations:PropTypes.array,comment:PropTypes.string}).isRequired}}__init(){this.changeSessionValue=debounce(this.props.onValueChange,1500)}__init2(){this.changeSessionComment=debounce(this.props.onCommentChange,1500)}render(){const{model:t,classes:e,session:r,onAnnotationsChange:n}=this.props,{animationsDisabled:o,annotatorMode:i,customKeys:a,dimensions:s,disabled:l,disabledAnnotator:c,equationEditor:u,extraCSSRules:d,feedback:p,mathInput:m,playersToolbarPosition:h,predefinedAnnotations:f,prompt:_,spanishInput:g,specialInput:y,spellCheckEnabled:b,teacherInstructions:v}=t,{annotations:x,comment:M,value:S}=r,{width:E,height:C}=s||{},$="40vh",O={position:"top"===h?"top":"bottom"};log$2("[render] disabled? ",l);const A=React$1.createElement(PreviewPrompt,{defaultClassName:"teacher-instructions",prompt:v}),j=[];return g&&j.push({language:"spanish"}),y&&j.push({language:"special"}),React$1.createElement(UiLayout,{extraCSSRules:d,className:e.main,ref:t=>{this.containerRef=t}},React$1.createElement("h2",{className:e.srOnly},"Constructed Response Question"),v&&React$1.createElement("div",{className:e.teacherInstructions},o?A:React$1.createElement(Collapsible,{labels:{hidden:"Show Teacher Instructions",visible:"Hide Teacher Instructions"},className:e.collapsible},A)),_&&React$1.createElement(Typography,{component:"span",className:e.prompt},React$1.createElement(PreviewPrompt,{defaultClassName:"prompt",prompt:t.prompt})),i?React$1.createElement(AnnotationEditor$1,{text:S||"",annotations:x||[],comment:M||"",predefinedAnnotations:f||[],onChange:n,onCommentChange:this.changeSessionComment,width:E,height:C,maxHeight:$,disabled:c,disabledMath:!m,customKeys:a,keypadMode:u}):React$1.createElement(EditableHtml,{className:classnames(e.editor,"response-area-editor"),onChange:this.changeSessionValue,markup:S||"",maxWidth:E&&E.toString(),minWidth:"100px",minHeight:C&&C.toString(),maxHeight:$,disabled:l,highlightShape:!0,toolbarOpts:O,spellCheck:b,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!m,customKeys:this.props.model.customKeys,keypadMode:this.props.model.equationEditor,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},table:{disabled:!0},textAlign:{disabled:!0},separateParagraphs:{disabled:!1}},languageCharactersProps:j}),p&&React$1.createElement(Feedback,{correctness:"correct",feedback:p}))}}Main.__initStatic();var Main$1=withStyles(style)(Main),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function commonjsRequire(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var mathjax={},version={};Object.defineProperty(version,"__esModule",{value:!0}),version.VERSION=void 0,version.VERSION="3.2.2";var HandlerList$1={},PrioritizedList$1={};Object.defineProperty(PrioritizedList$1,"__esModule",{value:!0}),PrioritizedList$1.PrioritizedList=void 0;var PrioritizedList=function(){function t(){this.items=[],this.items=[]}return t.prototype[Symbol.iterator]=function(){var t=0,e=this.items;return{next:function(){return{value:e[t++],done:t>e.length}}}},t.prototype.add=function(e,r){void 0===r&&(r=t.DEFAULTPRIORITY);var n=this.items.length;do{n--}while(n>=0&&r<this.items[n].priority);return this.items.splice(n+1,0,{item:e,priority:r}),e},t.prototype.remove=function(t){var e=this.items.length;do{e--}while(e>=0&&this.items[e].item!==t);e>=0&&this.items.splice(e,1)},t.DEFAULTPRIORITY=5,t}();PrioritizedList$1.PrioritizedList=PrioritizedList;var __extends$2i=commonjsGlobal&&commonjsGlobal.__extends||(extendStatics=function(t,e){return extendStatics=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])},extendStatics(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}extendStatics(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),extendStatics,__values$Z=commonjsGlobal&&commonjsGlobal.__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(HandlerList$1,"__esModule",{value:!0}),HandlerList$1.HandlerList=void 0;var PrioritizedList_js_1$1=PrioritizedList$1,HandlerList=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$2i(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=__values$Z(this),o=n.next();!o.done;o=n.next()){var i=o.value.item;if(i.handlesDocument(t))return i}}catch(t){e={error:t}}finally{try{o&&!o.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}(PrioritizedList_js_1$1.PrioritizedList);HandlerList$1.HandlerList=HandlerList;var Retries={};function handleRetriesFor(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)}}))}function retryAfter(t){var e=new Error("MathJax retry");throw e.retry=t,e}Object.defineProperty(Retries,"__esModule",{value:!0}),Retries.retryAfter=Retries.handleRetriesFor=void 0,Retries.handleRetriesFor=handleRetriesFor,Retries.retryAfter=retryAfter,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.mathjax=void 0;var e=version,r=HandlerList$1,n=Retries;t.mathjax={version:e.VERSION,handlers:new r.HandlerList,document:function(e,r){return t.mathjax.handlers.document(e,r)},handleRetriesFor:n.handleRetriesFor,retryAfter:n.retryAfter,asyncLoad:null}}(mathjax),getDefaultExportFromCjs(mathjax);var global$1={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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(t,"__esModule",{value:!0}),t.MathJax=t.combineWithMathJax=t.combineDefaults=t.combineConfig=t.isObject=void 0;var r=version;function n(t){return"object"==typeof t&&null!==t}function o(t,r){var i,a;try{for(var s=e(Object.keys(r)),l=s.next();!l.done;l=s.next()){var c=l.value;"__esModule"!==c&&(!n(t[c])||!n(r[c])||r[c]instanceof Promise?null!==r[c]&&void 0!==r[c]&&(t[c]=r[c]):o(t[c],r[c]))}}catch(t){i={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}return t}t.isObject=n,t.combineConfig=o,t.combineDefaults=function t(r,o,i){var a,s;r[o]||(r[o]={}),r=r[o];try{for(var l=e(Object.keys(i)),c=l.next();!c.done;c=l.next()){var u=c.value;n(r[u])&&n(i[u])?t(r,u,i[u]):null==r[u]&&null!=i[u]&&(r[u]=i[u])}}catch(t){a={error:t}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}return r},t.combineWithMathJax=function(e){return o(t.MathJax,e)},void 0===commonjsGlobal.MathJax&&(commonjsGlobal.MathJax={}),commonjsGlobal.MathJax.version||(commonjsGlobal.MathJax={version:r.VERSION,_:{},config:commonjsGlobal.MathJax}),t.MathJax=commonjsGlobal.MathJax}(global$1),getDefaultExportFromCjs(global$1);var assistiveMml={},MathItem={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.newState=t.STATE=t.AbstractMathItem=t.protoItem=void 0,t.protoItem=function(t,e,r,n,o,i,a){return void 0===a&&(a=null),{open:t,math:e,close:r,n:n,start:{n:o},end:{n:i},display:a}};var e=function(){function e(e,r,n,o,i){void 0===n&&(n=!0),void 0===o&&(o={i:0,n:0,delim:""}),void 0===i&&(i={i:0,n:0,delim:""}),this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={},this._state=t.STATE.UNPROCESSED,this.math=e,this.inputJax=r,this.display=n,this.start=o,this.end=i,this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={}}return Object.defineProperty(e.prototype,"isEscaped",{get:function(){return null===this.display},enumerable:!1,configurable:!0}),e.prototype.render=function(t){t.renderActions.renderMath(this,t)},e.prototype.rerender=function(e,r){void 0===r&&(r=t.STATE.RERENDER),this.state()>=r&&this.state(r-1),e.renderActions.renderMath(this,e,r)},e.prototype.convert=function(e,r){void 0===r&&(r=t.STATE.LAST),e.renderActions.renderConvert(this,e,r)},e.prototype.compile=function(e){this.state()<t.STATE.COMPILED&&(this.root=this.inputJax.compile(this,e),this.state(t.STATE.COMPILED))},e.prototype.typeset=function(e){this.state()<t.STATE.TYPESET&&(this.typesetRoot=e.outputJax[this.isEscaped?"escaped":"typeset"](this,e),this.state(t.STATE.TYPESET))},e.prototype.updateDocument=function(t){},e.prototype.removeFromDocument=function(t){},e.prototype.setMetrics=function(t,e,r,n,o){this.metrics={em:t,ex:e,containerWidth:r,lineWidth:n,scale:o}},e.prototype.state=function(e,r){return void 0===e&&(e=null),void 0===r&&(r=!1),null!=e&&(e<t.STATE.INSERTED&&this._state>=t.STATE.INSERTED&&this.removeFromDocument(r),e<t.STATE.TYPESET&&this._state>=t.STATE.TYPESET&&(this.outputData={}),e<t.STATE.COMPILED&&this._state>=t.STATE.COMPILED&&(this.inputData={}),this._state=e),this._state},e.prototype.reset=function(e){void 0===e&&(e=!1),this.state(t.STATE.UNPROCESSED,e)},e}();t.AbstractMathItem=e,t.STATE={UNPROCESSED:0,FINDMATH:10,COMPILED:20,CONVERT:100,METRICS:110,RERENDER:125,TYPESET:150,INSERTED:200,LAST:1e4},t.newState=function(e,r){if(e in t.STATE)throw Error("State "+e+" already exists");t.STATE[e]=r}}(MathItem),getDefaultExportFromCjs(MathItem);var SerializedMmlVisitor={},MmlVisitor$3={},MmlFactory$1={},NodeFactory$2={},Factory={},__values$Y=commonjsGlobal&&commonjsGlobal.__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.")},__read$_=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$y=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(Factory,"__esModule",{value:!0}),Factory.AbstractFactory=void 0;var AbstractFactory=function(){function t(t){var e,r;void 0===t&&(t=null),this.defaultKind="unknown",this.nodeMap=new Map,this.node={},null===t&&(t=this.constructor.defaultNodes);try{for(var n=__values$Y(Object.keys(t)),o=n.next();!o.done;o=n.next()){var i=o.value;this.setNodeClass(i,t[i])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}return t.prototype.create=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return(this.node[t]||this.node[this.defaultKind]).apply(void 0,__spreadArray$y([],__read$_(e),!1))},t.prototype.setNodeClass=function(t,e){this.nodeMap.set(t,e);var r=this,n=this.nodeMap.get(t);this.node[t]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(n.bind.apply(n,__spreadArray$y([void 0,r],__read$_(t),!1)))}},t.prototype.getNodeClass=function(t){return this.nodeMap.get(t)},t.prototype.deleteNodeClass=function(t){this.nodeMap.delete(t),delete this.node[t]},t.prototype.nodeIsKind=function(t,e){return t instanceof this.getNodeClass(e)},t.prototype.getKinds=function(){return Array.from(this.nodeMap.keys())},t.defaultNodes={},t}();Factory.AbstractFactory=AbstractFactory;var __extends$2h=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(NodeFactory$2,"__esModule",{value:!0}),NodeFactory$2.AbstractNodeFactory=void 0;var Factory_js_1$2=Factory,AbstractNodeFactory=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$2h(e,t),e.prototype.create=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r=[]),this.node[t](e,r)},e}(Factory_js_1$2.AbstractFactory);NodeFactory$2.AbstractNodeFactory=AbstractNodeFactory;var MML={},MmlNode={},Attributes={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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(t,"__esModule",{value:!0}),t.Attributes=t.INHERIT=void 0,t.INHERIT="_inherit_";var r=function(){function r(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 r.prototype.set=function(t,e){this.attributes[t]=e},r.prototype.setList=function(t){Object.assign(this.attributes,t)},r.prototype.get=function(e){var r=this.attributes[e];return r===t.INHERIT&&(r=this.global[e]),r},r.prototype.getExplicit=function(t){if(this.attributes.hasOwnProperty(t))return this.attributes[t]},r.prototype.getList=function(){for(var t,r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i={};try{for(var a=e(n),s=a.next();!s.done;s=a.next()){var l=s.value;i[l]=this.get(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i},r.prototype.setInherited=function(t,e){this.inherited[t]=e},r.prototype.getInherited=function(t){return this.inherited[t]},r.prototype.getDefault=function(t){return this.defaults[t]},r.prototype.isSet=function(t){return this.attributes.hasOwnProperty(t)||this.inherited.hasOwnProperty(t)},r.prototype.hasDefault=function(t){return t in this.defaults},r.prototype.getExplicitNames=function(){return Object.keys(this.attributes)},r.prototype.getInheritedNames=function(){return Object.keys(this.inherited)},r.prototype.getDefaultNames=function(){return Object.keys(this.defaults)},r.prototype.getGlobalNames=function(){return Object.keys(this.global)},r.prototype.getAllAttributes=function(){return this.attributes},r.prototype.getAllInherited=function(){return this.inherited},r.prototype.getAllDefaults=function(){return this.defaults},r.prototype.getAllGlobals=function(){return this.global},r}();t.Attributes=r}(Attributes),getDefaultExportFromCjs(Attributes);var Node={},__extends$2g=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$J=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$J=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$J.apply(this,arguments)},__values$X=commonjsGlobal&&commonjsGlobal.__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(Node,"__esModule",{value:!0}),Node.AbstractEmptyNode=Node.AbstractNode=void 0;var AbstractNode=function(){function t(t,e,r){var n,o;void 0===e&&(e={}),void 0===r&&(r=[]),this.factory=t,this.parent=null,this.properties={},this.childNodes=[];try{for(var i=__values$X(Object.keys(e)),a=i.next();!a.done;a=i.next()){var s=a.value;this.setProperty(s,e[s])}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}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<arguments.length;n++)r[n]=arguments[n];try{for(var o=__values$X(r),i=o.next();!i.done;i=o.next()){var a=i.value;delete this.properties[a]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},t.prototype.isKind=function(t){return this.factory.nodeIsKind(this,t)},t.prototype.setChildren=function(t){var e,r;this.childNodes=[];try{for(var n=__values$X(t),o=n.next();!o.done;o=n.next()){var i=o.value;this.appendChild(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.appendChild=function(t){return this.childNodes.push(t),t.parent=this,t},t.prototype.replaceChild=function(t,e){var r=this.childIndex(e);return null!==r&&(this.childNodes[r]=t,t.parent=this,e.parent=null),t},t.prototype.removeChild=function(t){var e=this.childIndex(t);return null!==e&&(this.childNodes.splice(e,1),t.parent=null),t},t.prototype.childIndex=function(t){var e=this.childNodes.indexOf(t);return-1===e?null:e},t.prototype.copy=function(){var t,e,r=this.factory.create(this.kind);r.properties=__assign$J({},this.properties);try{for(var n=__values$X(this.childNodes||[]),o=n.next();!o.done;o=n.next()){var i=o.value;i&&r.appendChild(i.copy())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.findNodes=function(t){var e=[];return this.walkTree((function(r){r.isKind(t)&&e.push(r)})),e},t.prototype.walkTree=function(t,e){var r,n;t(this,e);try{for(var o=__values$X(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;a&&a.walkTree(t,e)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return e},t.prototype.toString=function(){return this.kind+"("+this.childNodes.join(",")+")"},t}();Node.AbstractNode=AbstractNode;var AbstractEmptyNode=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$2g(e,t),e.prototype.setChildren=function(t){},e.prototype.appendChild=function(t){return t},e.prototype.replaceChild=function(t,e){return e},e.prototype.childIndex=function(t){return null},e.prototype.walkTree=function(t,e){return t(this,e),e},e.prototype.toString=function(){return this.kind},e}(AbstractNode);Node.AbstractEmptyNode=AbstractEmptyNode,function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},n=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.XMLNode=t.TextNode=t.AbstractMmlEmptyNode=t.AbstractMmlBaseNode=t.AbstractMmlLayoutNode=t.AbstractMmlTokenNode=t.AbstractMmlNode=t.indentAttributes=t.TEXCLASSNAMES=t.TEXCLASS=void 0;var i=Attributes,a=Node;t.TEXCLASS={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,VCENTER:8,NONE:-1},t.TEXCLASSNAMES=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"];var s=["","thinmathspace","mediummathspace","thickmathspace"],l=[[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]];t.indentAttributes=["indentalign","indentalignfirst","indentshift","indentshiftfirst"];var c=function(a){function c(t,e,r){void 0===e&&(e={}),void 0===r&&(r=[]);var n=a.call(this,t)||this;return n.prevClass=null,n.prevLevel=null,n.texclass=null,n.arity<0&&(n.childNodes=[t.create("inferredMrow")],n.childNodes[0].parent=n),n.setChildren(r),n.attributes=new i.Attributes(t.getNodeClass(n.kind).defaults,t.getNodeClass("math").defaults),n.attributes.setList(e),n}return e(c,a),c.prototype.copy=function(t){var e,o,i,a;void 0===t&&(t=!1);var s=this.factory.create(this.kind);if(s.properties=r({},this.properties),this.attributes){var l=this.attributes.getAllAttributes();try{for(var c=n(Object.keys(l)),u=c.next();!u.done;u=c.next()){var d=u.value;("id"!==d||t)&&s.attributes.set(d,l[d])}}catch(t){e={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}}if(this.childNodes&&this.childNodes.length){var p=this.childNodes;1===p.length&&p[0].isInferred&&(p=p[0].childNodes);try{for(var m=n(p),h=m.next();!h.done;h=m.next()){var f=h.value;f?s.appendChild(f.copy()):s.childNodes.push(null)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}}return s},Object.defineProperty(c.prototype,"texClass",{get:function(){return this.texclass},set:function(t){this.texclass=t},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"arity",{get:function(){return 1/0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"Parent",{get:function(){for(var t=this.parent;t&&t.notParent;)t=t.Parent;return t},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),c.prototype.setChildren=function(t){return this.arity<0?this.childNodes[0].setChildren(t):a.prototype.setChildren.call(this,t)},c.prototype.appendChild=function(t){var e,r,o=this;if(this.arity<0)return this.childNodes[0].appendChild(t),t;if(t.isInferred){if(this.arity===1/0)return t.childNodes.forEach((function(t){return a.prototype.appendChild.call(o,t)})),t;var i=t;(t=this.factory.create("mrow")).setChildren(i.childNodes),t.attributes=i.attributes;try{for(var s=n(i.getPropertyNames()),l=s.next();!l.done;l=s.next()){var c=l.value;t.setProperty(c,i.getProperty(c))}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}return a.prototype.appendChild.call(this,t)},c.prototype.replaceChild=function(t,e){return this.arity<0?(this.childNodes[0].replaceChild(t,e),t):a.prototype.replaceChild.call(this,t,e)},c.prototype.core=function(){return this},c.prototype.coreMO=function(){return this},c.prototype.coreIndex=function(){return 0},c.prototype.childPosition=function(){for(var t,e,r=this,o=r.parent;o&&o.notParent;)r=o,o=o.parent;if(o){var i=0;try{for(var a=n(o.childNodes),s=a.next();!s.done;s=a.next()){if(s.value===r)return i;i++}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}return null},c.prototype.setTeXclass=function(t){return this.getPrevClass(t),null!=this.texClass?this:t},c.prototype.updateTeXclass=function(t){t&&(this.prevClass=t.prevClass,this.prevLevel=t.prevLevel,t.prevClass=t.prevLevel=null,this.texClass=t.texClass)},c.prototype.getPrevClass=function(t){t&&(this.prevClass=t.texClass,this.prevLevel=t.attributes.get("scriptlevel"))},c.prototype.texSpacing=function(){var e=null!=this.prevClass?this.prevClass:t.TEXCLASS.NONE,r=this.texClass||t.TEXCLASS.ORD;if(e===t.TEXCLASS.NONE||r===t.TEXCLASS.NONE)return"";e===t.TEXCLASS.VCENTER&&(e=t.TEXCLASS.ORD),r===t.TEXCLASS.VCENTER&&(r=t.TEXCLASS.ORD);var n=l[e][r];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&n>=0?"":s[Math.abs(n)]},c.prototype.hasSpacingAttributes=function(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()},c.prototype.setInheritedAttributes=function(t,e,r,i){var a,s;void 0===t&&(t={}),void 0===e&&(e=!1),void 0===r&&(r=0),void 0===i&&(i=!1);var l=this.attributes.getAllDefaults();try{for(var u=n(Object.keys(t)),d=u.next();!d.done;d=u.next()){var p=d.value;if(l.hasOwnProperty(p)||c.alwaysInherit.hasOwnProperty(p)){var m=o(t[p],2),h=m[0],f=m[1];((c.noInherit[h]||{})[this.kind]||{})[p]||this.attributes.setInherited(p,f)}}}catch(t){a={error:t}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}void 0===this.attributes.getExplicit("displaystyle")&&this.attributes.setInherited("displaystyle",e),void 0===this.attributes.getExplicit("scriptlevel")&&this.attributes.setInherited("scriptlevel",r),i&&this.setProperty("texprimestyle",i);var _=this.arity;if(_>=0&&_!==1/0&&(1===_&&0===this.childNodes.length||1!==_&&this.childNodes.length!==_))if(_<this.childNodes.length)this.childNodes=this.childNodes.slice(0,_);else for(;this.childNodes.length<_;)this.appendChild(this.factory.create("mrow"));this.setChildInheritedAttributes(t,e,r,i)},c.prototype.setChildInheritedAttributes=function(t,e,r,o){var i,a;try{for(var s=n(this.childNodes),l=s.next();!l.done;l=s.next()){l.value.setInheritedAttributes(t,e,r,o)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},c.prototype.addInheritedAttributes=function(t,e){var o,i,a=r({},t);try{for(var s=n(Object.keys(e)),l=s.next();!l.done;l=s.next()){var c=l.value;"displaystyle"!==c&&"scriptlevel"!==c&&"style"!==c&&(a[c]=[this.kind,e[c]])}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a},c.prototype.inheritAttributesFrom=function(t){var e=t.attributes,r=e.get("displaystyle"),n=e.get("scriptlevel"),o=e.isSet("mathsize")?{mathsize:["math",e.get("mathsize")]}:{},i=t.getProperty("texprimestyle")||!1;this.setInheritedAttributes(o,r,n,i)},c.prototype.verifyTree=function(t){if(void 0===t&&(t=null),null!==t){this.verifyAttributes(t);var e=this.arity;t.checkArity&&e>=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)}},c.prototype.verifyAttributes=function(t){var e,r;if(t.checkAttributes){var o=this.attributes,i=[];try{for(var a=n(o.getExplicitNames()),s=a.next();!s.done;s=a.next()){var l=s.value;"data-"===l.substr(0,5)||void 0!==o.getDefault(l)||l.match(/^(?:class|style|id|(?:xlink:)?href)$/)||i.push(l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}i.length&&this.mError("Unknown attributes for "+this.kind+" node: "+i.join(", "),t)}},c.prototype.verifyChildren=function(t){var e,r;try{for(var o=n(this.childNodes),i=o.next();!i.done;i=o.next()){i.value.verifyTree(t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},c.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 o=this.factory.create("mtext"),i=this.factory.create("text");i.setText(e.fullErrors?t:this.kind),o.appendChild(i),n.appendChild(o),this.parent.replaceChild(n,this)}else this.parent.replaceChild(n,this),n.appendChild(this);return n},c.defaults={mathbackground:i.INHERIT,mathcolor:i.INHERIT,mathsize:i.INHERIT,dir:i.INHERIT},c.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}}},c.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0},c.verifyDefaults={checkArity:!0,checkAttributes:!1,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0},c}(a.AbstractNode);t.AbstractMmlNode=c;var u=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),Object.defineProperty(o.prototype,"isToken",{get:function(){return!0},enumerable:!1,configurable:!0}),o.prototype.getText=function(){var t,e,r="";try{for(var o=n(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;a instanceof h&&(r+=a.getText())}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},o.prototype.setChildInheritedAttributes=function(t,e,r,o){var i,a;try{for(var s=n(this.childNodes),l=s.next();!l.done;l=s.next()){var u=l.value;u instanceof c&&u.setInheritedAttributes(t,e,r,o)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},o.prototype.walkTree=function(t,e){var r,o;t(this,e);try{for(var i=n(this.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;s instanceof c&&s.walkTree(t,e)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return e},o.defaults=r(r({},c.defaults),{mathvariant:"normal",mathsize:i.INHERIT}),o}(c);t.AbstractMmlTokenNode=u;var d=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),Object.defineProperty(r.prototype,"isSpacelike",{get:function(){return this.childNodes[0].isSpacelike},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"arity",{get:function(){return-1},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){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t},r.defaults=c.defaults,r}(c);t.AbstractMmlLayoutNode=d;var p=function(r){function o(){return null!==r&&r.apply(this,arguments)||this}return e(o,r),Object.defineProperty(o.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),o.prototype.core=function(){return this.childNodes[0]},o.prototype.coreMO=function(){return this.childNodes[0].coreMO()},o.prototype.setTeXclass=function(e){var r,o;this.getPrevClass(e),this.texClass=t.TEXCLASS.ORD;var i=this.childNodes[0];i?this.isEmbellished||i.isKind("mi")?(e=i.setTeXclass(e),this.updateTeXclass(this.core())):(i.setTeXclass(null),e=this):e=this;try{for(var a=n(this.childNodes.slice(1)),s=a.next();!s.done;s=a.next()){var l=s.value;l&&l.setTeXclass(null)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return e},o.defaults=c.defaults,o}(c);t.AbstractMmlBaseNode=p;var m=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return e(n,r),Object.defineProperty(n.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Parent",{get:function(){return this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"texClass",{get:function(){return t.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prevClass",{get:function(){return t.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prevLevel",{get:function(){return 0},enumerable:!1,configurable:!0}),n.prototype.hasSpacingAttributes=function(){return!1},Object.defineProperty(n.prototype,"attributes",{get:function(){return null},enumerable:!1,configurable:!0}),n.prototype.core=function(){return this},n.prototype.coreMO=function(){return this},n.prototype.coreIndex=function(){return 0},n.prototype.childPosition=function(){return 0},n.prototype.setTeXclass=function(t){return t},n.prototype.texSpacing=function(){return""},n.prototype.setInheritedAttributes=function(t,e,r,n){},n.prototype.inheritAttributesFrom=function(t){},n.prototype.verifyTree=function(t){},n.prototype.mError=function(t,e,r){return null},n}(a.AbstractEmptyNode);t.AbstractMmlEmptyNode=m;var h=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.text="",e}return e(r,t),Object.defineProperty(r.prototype,"kind",{get:function(){return"text"},enumerable:!1,configurable:!0}),r.prototype.getText=function(){return this.text},r.prototype.setText=function(t){return this.text=t,this},r.prototype.copy=function(){return this.factory.create(this.kind).setText(this.getText())},r.prototype.toString=function(){return this.text},r}(m);t.TextNode=h;var f=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.xml=null,e.adaptor=null,e}return e(r,t),Object.defineProperty(r.prototype,"kind",{get:function(){return"XML"},enumerable:!1,configurable:!0}),r.prototype.getXML=function(){return this.xml},r.prototype.setXML=function(t,e){return void 0===e&&(e=null),this.xml=t,this.adaptor=e,this},r.prototype.getSerializedXML=function(){return this.adaptor.serializeXML(this.xml)},r.prototype.copy=function(){return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml))},r.prototype.toString=function(){return"XML data"},r}(m);t.XMLNode=f}(MmlNode),getDefaultExportFromCjs(MmlNode);var math$2={},__extends$2f=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$I=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$I=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$I.apply(this,arguments)};Object.defineProperty(math$2,"__esModule",{value:!0}),math$2.MmlMath=void 0;var MmlNode_js_1$P=MmlNode,MmlMath=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$2f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"math"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(e,r,n,o){"display"===this.attributes.get("mode")&&this.attributes.setInherited("display","block"),e=this.addInheritedAttributes(e,this.attributes.getAllAttributes()),r=!!this.attributes.get("displaystyle")||!this.attributes.get("displaystyle")&&"block"===this.attributes.get("display"),this.attributes.setInherited("displaystyle",r),n=this.attributes.get("scriptlevel")||this.constructor.defaults.scriptlevel,t.prototype.setChildInheritedAttributes.call(this,e,r,n,o)},e.defaults=__assign$I(__assign$I({},MmlNode_js_1$P.AbstractMmlLayoutNode.defaults),{mathvariant:"normal",mathsize:"normal",mathcolor:"",mathbackground:"transparent",dir:"ltr",scriptlevel:0,displaystyle:!1,display:"inline",maxwidth:"",overflow:"linebreak",altimg:"","altimg-width":"","altimg-height":"","altimg-valign":"",alttext:"",cdgroup:"",scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:"8px",infixlinebreakstyle:"before",lineleading:"1ex",linebreakmultchar:"⁢",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),e}(MmlNode_js_1$P.AbstractMmlLayoutNode);math$2.MmlMath=MmlMath;var mi$2={},__extends$2e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$H=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$H=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$H.apply(this,arguments)};Object.defineProperty(mi$2,"__esModule",{value:!0}),mi$2.MmlMi=void 0;var MmlNode_js_1$O=MmlNode,MmlMi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$O.TEXCLASS.ORD,e}return __extends$2e(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mi"},enumerable:!1,configurable:!0}),e.prototype.setInheritedAttributes=function(r,n,o,i){void 0===r&&(r={}),void 0===n&&(n=!1),void 0===o&&(o=0),void 0===i&&(i=!1),t.prototype.setInheritedAttributes.call(this,r,n,o,i),this.getText().match(e.singleCharacter)&&!r.mathvariant&&this.attributes.setInherited("mathvariant","italic")},e.prototype.setTeXclass=function(t){this.getPrevClass(t);var r=this.getText();return r.length>1&&r.match(e.operatorName)&&"normal"===this.attributes.get("mathvariant")&&void 0===this.getProperty("autoOP")&&void 0===this.getProperty("texClass")&&(this.texClass=MmlNode_js_1$O.TEXCLASS.OP,this.setProperty("autoOP",!0)),this},e.defaults=__assign$H({},MmlNode_js_1$O.AbstractMmlTokenNode.defaults),e.operatorName=/^[a-z][a-z0-9]*$/i,e.singleCharacter=/^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/,e}(MmlNode_js_1$O.AbstractMmlTokenNode);mi$2.MmlMi=MmlMi;var mn$2={},__extends$2d=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$G=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$G=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$G.apply(this,arguments)};Object.defineProperty(mn$2,"__esModule",{value:!0}),mn$2.MmlMn=void 0;var MmlNode_js_1$N=MmlNode,MmlMn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$N.TEXCLASS.ORD,e}return __extends$2d(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mn"},enumerable:!1,configurable:!0}),e.defaults=__assign$G({},MmlNode_js_1$N.AbstractMmlTokenNode.defaults),e}(MmlNode_js_1$N.AbstractMmlTokenNode);mn$2.MmlMn=MmlMn;var mo$2={},OperatorDictionary={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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(t,"__esModule",{value:!0}),t.OPTABLE=t.MMLSPACING=t.getRange=t.RANGES=t.MO=t.OPDEF=void 0;var r=MmlNode;function n(t,e,n,o){return void 0===n&&(n=r.TEXCLASS.BIN),void 0===o&&(o=null),[t,e,n,o]}t.OPDEF=n,t.MO={ORD:n(0,0,r.TEXCLASS.ORD),ORD11:n(1,1,r.TEXCLASS.ORD),ORD21:n(2,1,r.TEXCLASS.ORD),ORD02:n(0,2,r.TEXCLASS.ORD),ORD55:n(5,5,r.TEXCLASS.ORD),NONE:n(0,0,r.TEXCLASS.NONE),OP:n(1,2,r.TEXCLASS.OP,{largeop:!0,movablelimits:!0,symmetric:!0}),OPFIXED:n(1,2,r.TEXCLASS.OP,{largeop:!0,movablelimits:!0}),INTEGRAL:n(0,1,r.TEXCLASS.OP,{largeop:!0,symmetric:!0}),INTEGRAL2:n(1,2,r.TEXCLASS.OP,{largeop:!0,symmetric:!0}),BIN3:n(3,3,r.TEXCLASS.BIN),BIN4:n(4,4,r.TEXCLASS.BIN),BIN01:n(0,1,r.TEXCLASS.BIN),BIN5:n(5,5,r.TEXCLASS.BIN),TALLBIN:n(4,4,r.TEXCLASS.BIN,{stretchy:!0}),BINOP:n(4,4,r.TEXCLASS.BIN,{largeop:!0,movablelimits:!0}),REL:n(5,5,r.TEXCLASS.REL),REL1:n(1,1,r.TEXCLASS.REL,{stretchy:!0}),REL4:n(4,4,r.TEXCLASS.REL),RELSTRETCH:n(5,5,r.TEXCLASS.REL,{stretchy:!0}),RELACCENT:n(5,5,r.TEXCLASS.REL,{accent:!0}),WIDEREL:n(5,5,r.TEXCLASS.REL,{accent:!0,stretchy:!0}),OPEN:n(0,0,r.TEXCLASS.OPEN,{fence:!0,stretchy:!0,symmetric:!0}),CLOSE:n(0,0,r.TEXCLASS.CLOSE,{fence:!0,stretchy:!0,symmetric:!0}),INNER:n(0,0,r.TEXCLASS.INNER),PUNCT:n(0,3,r.TEXCLASS.PUNCT),ACCENT:n(0,0,r.TEXCLASS.ORD,{accent:!0}),WIDEACCENT:n(0,0,r.TEXCLASS.ORD,{accent:!0,stretchy:!0})},t.RANGES=[[32,127,r.TEXCLASS.REL,"mo"],[160,191,r.TEXCLASS.ORD,"mo"],[192,591,r.TEXCLASS.ORD,"mi"],[688,879,r.TEXCLASS.ORD,"mo"],[880,6688,r.TEXCLASS.ORD,"mi"],[6832,6911,r.TEXCLASS.ORD,"mo"],[6912,7615,r.TEXCLASS.ORD,"mi"],[7616,7679,r.TEXCLASS.ORD,"mo"],[7680,8191,r.TEXCLASS.ORD,"mi"],[8192,8303,r.TEXCLASS.ORD,"mo"],[8304,8351,r.TEXCLASS.ORD,"mo"],[8448,8527,r.TEXCLASS.ORD,"mi"],[8528,8591,r.TEXCLASS.ORD,"mn"],[8592,8703,r.TEXCLASS.REL,"mo"],[8704,8959,r.TEXCLASS.BIN,"mo"],[8960,9215,r.TEXCLASS.ORD,"mo"],[9312,9471,r.TEXCLASS.ORD,"mn"],[9472,10223,r.TEXCLASS.ORD,"mo"],[10224,10239,r.TEXCLASS.REL,"mo"],[10240,10495,r.TEXCLASS.ORD,"mtext"],[10496,10623,r.TEXCLASS.REL,"mo"],[10624,10751,r.TEXCLASS.ORD,"mo"],[10752,11007,r.TEXCLASS.BIN,"mo"],[11008,11055,r.TEXCLASS.ORD,"mo"],[11056,11087,r.TEXCLASS.REL,"mo"],[11088,11263,r.TEXCLASS.ORD,"mo"],[11264,11744,r.TEXCLASS.ORD,"mi"],[11776,11903,r.TEXCLASS.ORD,"mo"],[11904,12255,r.TEXCLASS.ORD,"mi","normal"],[12272,12351,r.TEXCLASS.ORD,"mo"],[12352,42143,r.TEXCLASS.ORD,"mi","normal"],[42192,43055,r.TEXCLASS.ORD,"mi"],[43056,43071,r.TEXCLASS.ORD,"mn"],[43072,55295,r.TEXCLASS.ORD,"mi"],[63744,64255,r.TEXCLASS.ORD,"mi","normal"],[64256,65023,r.TEXCLASS.ORD,"mi"],[65024,65135,r.TEXCLASS.ORD,"mo"],[65136,65791,r.TEXCLASS.ORD,"mi"],[65792,65935,r.TEXCLASS.ORD,"mn"],[65936,74751,r.TEXCLASS.ORD,"mi","normal"],[74752,74879,r.TEXCLASS.ORD,"mn"],[74880,113823,r.TEXCLASS.ORD,"mi","normal"],[113824,119391,r.TEXCLASS.ORD,"mo"],[119648,119679,r.TEXCLASS.ORD,"mn"],[119808,120781,r.TEXCLASS.ORD,"mi"],[120782,120831,r.TEXCLASS.ORD,"mn"],[122624,129023,r.TEXCLASS.ORD,"mo"],[129024,129279,r.TEXCLASS.REL,"mo"],[129280,129535,r.TEXCLASS.ORD,"mo"],[131072,195103,r.TEXCLASS.ORD,"mi","normnal"]],t.getRange=function(r){var n,o,i=r.codePointAt(0);try{for(var a=e(t.RANGES),s=a.next();!s.done;s=a.next()){var l=s.value;if(i<=l[1]){if(i>=l[0])return l;break}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return null},t.MMLSPACING=[[0,0],[1,2],[3,3],[4,4],[0,0],[0,0],[0,3]],t.OPTABLE={prefix:{"(":t.MO.OPEN,"+":t.MO.BIN01,"-":t.MO.BIN01,"[":t.MO.OPEN,"{":t.MO.OPEN,"|":t.MO.OPEN,"||":[0,0,r.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,r.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"¬":t.MO.ORD21,"±":t.MO.BIN01,"‖":[0,0,r.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"‘":[0,0,r.TEXCLASS.OPEN,{fence:!0}],"“":[0,0,r.TEXCLASS.OPEN,{fence:!0}],"ⅅ":t.MO.ORD21,"ⅆ":n(2,0,r.TEXCLASS.ORD),"∀":t.MO.ORD21,"∂":t.MO.ORD21,"∃":t.MO.ORD21,"∄":t.MO.ORD21,"∇":t.MO.ORD21,"∏":t.MO.OP,"∐":t.MO.OP,"∑":t.MO.OP,"−":t.MO.BIN01,"∓":t.MO.BIN01,"√":[1,1,r.TEXCLASS.ORD,{stretchy:!0}],"∛":t.MO.ORD11,"∜":t.MO.ORD11,"∠":t.MO.ORD,"∡":t.MO.ORD,"∢":t.MO.ORD,"∫":t.MO.INTEGRAL,"∬":t.MO.INTEGRAL,"∭":t.MO.INTEGRAL,"∮":t.MO.INTEGRAL,"∯":t.MO.INTEGRAL,"∰":t.MO.INTEGRAL,"∱":t.MO.INTEGRAL,"∲":t.MO.INTEGRAL,"∳":t.MO.INTEGRAL,"⋀":t.MO.OP,"⋁":t.MO.OP,"⋂":t.MO.OP,"⋃":t.MO.OP,"⌈":t.MO.OPEN,"⌊":t.MO.OPEN,"〈":t.MO.OPEN,"❲":t.MO.OPEN,"⟦":t.MO.OPEN,"⟨":t.MO.OPEN,"⟪":t.MO.OPEN,"⟬":t.MO.OPEN,"⟮":t.MO.OPEN,"⦀":[0,0,r.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"⦃":t.MO.OPEN,"⦅":t.MO.OPEN,"⦇":t.MO.OPEN,"⦉":t.MO.OPEN,"⦋":t.MO.OPEN,"⦍":t.MO.OPEN,"⦏":t.MO.OPEN,"⦑":t.MO.OPEN,"⦓":t.MO.OPEN,"⦕":t.MO.OPEN,"⦗":t.MO.OPEN,"⧼":t.MO.OPEN,"⨀":t.MO.OP,"⨁":t.MO.OP,"⨂":t.MO.OP,"⨃":t.MO.OP,"⨄":t.MO.OP,"⨅":t.MO.OP,"⨆":t.MO.OP,"⨇":t.MO.OP,"⨈":t.MO.OP,"⨉":t.MO.OP,"⨊":t.MO.OP,"⨋":t.MO.INTEGRAL2,"⨌":t.MO.INTEGRAL,"⨍":t.MO.INTEGRAL2,"⨎":t.MO.INTEGRAL2,"⨏":t.MO.INTEGRAL2,"⨐":t.MO.OP,"⨑":t.MO.OP,"⨒":t.MO.OP,"⨓":t.MO.OP,"⨔":t.MO.OP,"⨕":t.MO.INTEGRAL2,"⨖":t.MO.INTEGRAL2,"⨗":t.MO.INTEGRAL2,"⨘":t.MO.INTEGRAL2,"⨙":t.MO.INTEGRAL2,"⨚":t.MO.INTEGRAL2,"⨛":t.MO.INTEGRAL2,"⨜":t.MO.INTEGRAL2,"⫼":t.MO.OP,"⫿":t.MO.OP},postfix:{"!!":n(1,0),"!":[1,0,r.TEXCLASS.CLOSE,null],'"':t.MO.ACCENT,"&":t.MO.ORD,")":t.MO.CLOSE,"++":n(0,0),"--":n(0,0),"..":n(0,0),"...":t.MO.ORD,"'":t.MO.ACCENT,"]":t.MO.CLOSE,"^":t.MO.WIDEACCENT,_:t.MO.WIDEACCENT,"`":t.MO.ACCENT,"|":t.MO.CLOSE,"}":t.MO.CLOSE,"~":t.MO.WIDEACCENT,"||":[0,0,r.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,r.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"¨":t.MO.ACCENT,"ª":t.MO.ACCENT,"¯":t.MO.WIDEACCENT,"°":t.MO.ORD,"²":t.MO.ACCENT,"³":t.MO.ACCENT,"´":t.MO.ACCENT,"¸":t.MO.ACCENT,"¹":t.MO.ACCENT,"º":t.MO.ACCENT,"ˆ":t.MO.WIDEACCENT,"ˇ":t.MO.WIDEACCENT,"ˉ":t.MO.WIDEACCENT,"ˊ":t.MO.ACCENT,"ˋ":t.MO.ACCENT,"ˍ":t.MO.WIDEACCENT,"˘":t.MO.ACCENT,"˙":t.MO.ACCENT,"˚":t.MO.ACCENT,"˜":t.MO.WIDEACCENT,"˝":t.MO.ACCENT,"˷":t.MO.WIDEACCENT,"̂":t.MO.WIDEACCENT,"̑":t.MO.ACCENT,"϶":t.MO.REL,"‖":[0,0,r.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"’":[0,0,r.TEXCLASS.CLOSE,{fence:!0}],"‚":t.MO.ACCENT,"‛":t.MO.ACCENT,"”":[0,0,r.TEXCLASS.CLOSE,{fence:!0}],"„":t.MO.ACCENT,"‟":t.MO.ACCENT,"′":t.MO.ORD,"″":t.MO.ACCENT,"‴":t.MO.ACCENT,"‵":t.MO.ACCENT,"‶":t.MO.ACCENT,"‷":t.MO.ACCENT,"‾":t.MO.WIDEACCENT,"⁗":t.MO.ACCENT,"⃛":t.MO.ACCENT,"⃜":t.MO.ACCENT,"⌉":t.MO.CLOSE,"⌋":t.MO.CLOSE,"〉":t.MO.CLOSE,"⎴":t.MO.WIDEACCENT,"⎵":t.MO.WIDEACCENT,"⏜":t.MO.WIDEACCENT,"⏝":t.MO.WIDEACCENT,"⏞":t.MO.WIDEACCENT,"⏟":t.MO.WIDEACCENT,"⏠":t.MO.WIDEACCENT,"⏡":t.MO.WIDEACCENT,"■":t.MO.BIN3,"□":t.MO.BIN3,"▪":t.MO.BIN3,"▫":t.MO.BIN3,"▭":t.MO.BIN3,"▮":t.MO.BIN3,"▯":t.MO.BIN3,"▰":t.MO.BIN3,"▱":t.MO.BIN3,"▲":t.MO.BIN4,"▴":t.MO.BIN4,"▶":t.MO.BIN4,"▷":t.MO.BIN4,"▸":t.MO.BIN4,"▼":t.MO.BIN4,"▾":t.MO.BIN4,"◀":t.MO.BIN4,"◁":t.MO.BIN4,"◂":t.MO.BIN4,"◄":t.MO.BIN4,"◅":t.MO.BIN4,"◆":t.MO.BIN4,"◇":t.MO.BIN4,"◈":t.MO.BIN4,"◉":t.MO.BIN4,"◌":t.MO.BIN4,"◍":t.MO.BIN4,"◎":t.MO.BIN4,"●":t.MO.BIN4,"◖":t.MO.BIN4,"◗":t.MO.BIN4,"◦":t.MO.BIN4,"♭":t.MO.ORD02,"♮":t.MO.ORD02,"♯":t.MO.ORD02,"❳":t.MO.CLOSE,"⟧":t.MO.CLOSE,"⟩":t.MO.CLOSE,"⟫":t.MO.CLOSE,"⟭":t.MO.CLOSE,"⟯":t.MO.CLOSE,"⦀":[0,0,r.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"⦄":t.MO.CLOSE,"⦆":t.MO.CLOSE,"⦈":t.MO.CLOSE,"⦊":t.MO.CLOSE,"⦌":t.MO.CLOSE,"⦎":t.MO.CLOSE,"⦐":t.MO.CLOSE,"⦒":t.MO.CLOSE,"⦔":t.MO.CLOSE,"⦖":t.MO.CLOSE,"⦘":t.MO.CLOSE,"⧽":t.MO.CLOSE},infix:{"!=":t.MO.BIN4,"#":t.MO.ORD,$:t.MO.ORD,"%":[3,3,r.TEXCLASS.ORD,null],"&&":t.MO.BIN4,"":t.MO.ORD,"*":t.MO.BIN3,"**":n(1,1),"*=":t.MO.BIN4,"+":t.MO.BIN4,"+=":t.MO.BIN4,",":[0,3,r.TEXCLASS.PUNCT,{linebreakstyle:"after",separator:!0}],"-":t.MO.BIN4,"-=":t.MO.BIN4,"->":t.MO.BIN5,".":[0,3,r.TEXCLASS.PUNCT,{separator:!0}],"/":t.MO.ORD11,"//":n(1,1),"/=":t.MO.BIN4,":":[1,2,r.TEXCLASS.REL,null],":=":t.MO.BIN4,";":[0,3,r.TEXCLASS.PUNCT,{linebreakstyle:"after",separator:!0}],"<":t.MO.REL,"<=":t.MO.BIN5,"<>":n(1,1),"=":t.MO.REL,"==":t.MO.BIN4,">":t.MO.REL,">=":t.MO.BIN5,"?":[1,1,r.TEXCLASS.CLOSE,null],"@":t.MO.ORD11,"\\":t.MO.ORD,"^":t.MO.ORD11,_:t.MO.ORD11,"|":[2,2,r.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"||":[2,2,r.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[2,2,r.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"±":t.MO.BIN4,"·":t.MO.BIN4,"×":t.MO.BIN4,"÷":t.MO.BIN4,"ʹ":t.MO.ORD,"̀":t.MO.ACCENT,"́":t.MO.ACCENT,"̃":t.MO.WIDEACCENT,"̄":t.MO.ACCENT,"̆":t.MO.ACCENT,"̇":t.MO.ACCENT,"̈":t.MO.ACCENT,"̌":t.MO.ACCENT,"̲":t.MO.WIDEACCENT,"̸":t.MO.REL4,"―":[0,0,r.TEXCLASS.ORD,{stretchy:!0}],"‗":[0,0,r.TEXCLASS.ORD,{stretchy:!0}],"†":t.MO.BIN3,"‡":t.MO.BIN3,"•":t.MO.BIN4,"…":t.MO.INNER,"⁃":t.MO.BIN4,"⁄":t.MO.TALLBIN,"⁡":t.MO.NONE,"⁢":t.MO.NONE,"⁣":[0,0,r.TEXCLASS.NONE,{linebreakstyle:"after",separator:!0}],"⁤":t.MO.NONE,"⃗":t.MO.ACCENT,"ℑ":t.MO.ORD,"ℓ":t.MO.ORD,"℘":t.MO.ORD,"ℜ":t.MO.ORD,"←":t.MO.WIDEREL,"↑":t.MO.RELSTRETCH,"→":t.MO.WIDEREL,"↓":t.MO.RELSTRETCH,"↔":t.MO.WIDEREL,"↕":t.MO.RELSTRETCH,"↖":t.MO.RELSTRETCH,"↗":t.MO.RELSTRETCH,"↘":t.MO.RELSTRETCH,"↙":t.MO.RELSTRETCH,"↚":t.MO.RELACCENT,"↛":t.MO.RELACCENT,"↜":t.MO.WIDEREL,"↝":t.MO.WIDEREL,"↞":t.MO.WIDEREL,"↟":t.MO.WIDEREL,"↠":t.MO.WIDEREL,"↡":t.MO.RELSTRETCH,"↢":t.MO.WIDEREL,"↣":t.MO.WIDEREL,"↤":t.MO.WIDEREL,"↥":t.MO.RELSTRETCH,"↦":t.MO.WIDEREL,"↧":t.MO.RELSTRETCH,"↨":t.MO.RELSTRETCH,"↩":t.MO.WIDEREL,"↪":t.MO.WIDEREL,"↫":t.MO.WIDEREL,"↬":t.MO.WIDEREL,"↭":t.MO.WIDEREL,"↮":t.MO.RELACCENT,"↯":t.MO.RELSTRETCH,"↰":t.MO.RELSTRETCH,"↱":t.MO.RELSTRETCH,"↲":t.MO.RELSTRETCH,"↳":t.MO.RELSTRETCH,"↴":t.MO.RELSTRETCH,"↵":t.MO.RELSTRETCH,"↶":t.MO.RELACCENT,"↷":t.MO.RELACCENT,"↸":t.MO.REL,"↹":t.MO.WIDEREL,"↺":t.MO.REL,"↻":t.MO.REL,"↼":t.MO.WIDEREL,"↽":t.MO.WIDEREL,"↾":t.MO.RELSTRETCH,"↿":t.MO.RELSTRETCH,"⇀":t.MO.WIDEREL,"⇁":t.MO.WIDEREL,"⇂":t.MO.RELSTRETCH,"⇃":t.MO.RELSTRETCH,"⇄":t.MO.WIDEREL,"⇅":t.MO.RELSTRETCH,"⇆":t.MO.WIDEREL,"⇇":t.MO.WIDEREL,"⇈":t.MO.RELSTRETCH,"⇉":t.MO.WIDEREL,"⇊":t.MO.RELSTRETCH,"⇋":t.MO.WIDEREL,"⇌":t.MO.WIDEREL,"⇍":t.MO.RELACCENT,"⇎":t.MO.RELACCENT,"⇏":t.MO.RELACCENT,"⇐":t.MO.WIDEREL,"⇑":t.MO.RELSTRETCH,"⇒":t.MO.WIDEREL,"⇓":t.MO.RELSTRETCH,"⇔":t.MO.WIDEREL,"⇕":t.MO.RELSTRETCH,"⇖":t.MO.RELSTRETCH,"⇗":t.MO.RELSTRETCH,"⇘":t.MO.RELSTRETCH,"⇙":t.MO.RELSTRETCH,"⇚":t.MO.WIDEREL,"⇛":t.MO.WIDEREL,"⇜":t.MO.WIDEREL,"⇝":t.MO.WIDEREL,"⇞":t.MO.REL,"⇟":t.MO.REL,"⇠":t.MO.WIDEREL,"⇡":t.MO.RELSTRETCH,"⇢":t.MO.WIDEREL,"⇣":t.MO.RELSTRETCH,"⇤":t.MO.WIDEREL,"⇥":t.MO.WIDEREL,"⇦":t.MO.WIDEREL,"⇧":t.MO.RELSTRETCH,"⇨":t.MO.WIDEREL,"⇩":t.MO.RELSTRETCH,"⇪":t.MO.RELSTRETCH,"⇫":t.MO.RELSTRETCH,"⇬":t.MO.RELSTRETCH,"⇭":t.MO.RELSTRETCH,"⇮":t.MO.RELSTRETCH,"⇯":t.MO.RELSTRETCH,"⇰":t.MO.WIDEREL,"⇱":t.MO.REL,"⇲":t.MO.REL,"⇳":t.MO.RELSTRETCH,"⇴":t.MO.RELACCENT,"⇵":t.MO.RELSTRETCH,"⇶":t.MO.WIDEREL,"⇷":t.MO.RELACCENT,"⇸":t.MO.RELACCENT,"⇹":t.MO.RELACCENT,"⇺":t.MO.RELACCENT,"⇻":t.MO.RELACCENT,"⇼":t.MO.RELACCENT,"⇽":t.MO.WIDEREL,"⇾":t.MO.WIDEREL,"⇿":t.MO.WIDEREL,"∁":n(1,2,r.TEXCLASS.ORD),"∅":t.MO.ORD,"∆":t.MO.BIN3,"∈":t.MO.REL,"∉":t.MO.REL,"∊":t.MO.REL,"∋":t.MO.REL,"∌":t.MO.REL,"∍":t.MO.REL,"∎":t.MO.BIN3,"−":t.MO.BIN4,"∓":t.MO.BIN4,"∔":t.MO.BIN4,"∕":t.MO.TALLBIN,"∖":t.MO.BIN4,"∗":t.MO.BIN4,"∘":t.MO.BIN4,"∙":t.MO.BIN4,"∝":t.MO.REL,"∞":t.MO.ORD,"∟":t.MO.REL,"∣":t.MO.REL,"∤":t.MO.REL,"∥":t.MO.REL,"∦":t.MO.REL,"∧":t.MO.BIN4,"∨":t.MO.BIN4,"∩":t.MO.BIN4,"∪":t.MO.BIN4,"∴":t.MO.REL,"∵":t.MO.REL,"∶":t.MO.REL,"∷":t.MO.REL,"∸":t.MO.BIN4,"∹":t.MO.REL,"∺":t.MO.BIN4,"∻":t.MO.REL,"∼":t.MO.REL,"∽":t.MO.REL,"∽̱":t.MO.BIN3,"∾":t.MO.REL,"∿":t.MO.BIN3,"≀":t.MO.BIN4,"≁":t.MO.REL,"≂":t.MO.REL,"≂̸":t.MO.REL,"≃":t.MO.REL,"≄":t.MO.REL,"≅":t.MO.REL,"≆":t.MO.REL,"≇":t.MO.REL,"≈":t.MO.REL,"≉":t.MO.REL,"≊":t.MO.REL,"≋":t.MO.REL,"≌":t.MO.REL,"≍":t.MO.REL,"≎":t.MO.REL,"≎̸":t.MO.REL,"≏":t.MO.REL,"≏̸":t.MO.REL,"≐":t.MO.REL,"≑":t.MO.REL,"≒":t.MO.REL,"≓":t.MO.REL,"≔":t.MO.REL,"≕":t.MO.REL,"≖":t.MO.REL,"≗":t.MO.REL,"≘":t.MO.REL,"≙":t.MO.REL,"≚":t.MO.REL,"≛":t.MO.REL,"≜":t.MO.REL,"≝":t.MO.REL,"≞":t.MO.REL,"≟":t.MO.REL,"≠":t.MO.REL,"≡":t.MO.REL,"≢":t.MO.REL,"≣":t.MO.REL,"≤":t.MO.REL,"≥":t.MO.REL,"≦":t.MO.REL,"≦̸":t.MO.REL,"≧":t.MO.REL,"≨":t.MO.REL,"≩":t.MO.REL,"≪":t.MO.REL,"≪̸":t.MO.REL,"≫":t.MO.REL,"≫̸":t.MO.REL,"≬":t.MO.REL,"≭":t.MO.REL,"≮":t.MO.REL,"≯":t.MO.REL,"≰":t.MO.REL,"≱":t.MO.REL,"≲":t.MO.REL,"≳":t.MO.REL,"≴":t.MO.REL,"≵":t.MO.REL,"≶":t.MO.REL,"≷":t.MO.REL,"≸":t.MO.REL,"≹":t.MO.REL,"≺":t.MO.REL,"≻":t.MO.REL,"≼":t.MO.REL,"≽":t.MO.REL,"≾":t.MO.REL,"≿":t.MO.REL,"≿̸":t.MO.REL,"⊀":t.MO.REL,"⊁":t.MO.REL,"⊂":t.MO.REL,"⊂⃒":t.MO.REL,"⊃":t.MO.REL,"⊃⃒":t.MO.REL,"⊄":t.MO.REL,"⊅":t.MO.REL,"⊆":t.MO.REL,"⊇":t.MO.REL,"⊈":t.MO.REL,"⊉":t.MO.REL,"⊊":t.MO.REL,"⊋":t.MO.REL,"⊌":t.MO.BIN4,"⊍":t.MO.BIN4,"⊎":t.MO.BIN4,"⊏":t.MO.REL,"⊏̸":t.MO.REL,"⊐":t.MO.REL,"⊐̸":t.MO.REL,"⊑":t.MO.REL,"⊒":t.MO.REL,"⊓":t.MO.BIN4,"⊔":t.MO.BIN4,"⊕":t.MO.BIN4,"⊖":t.MO.BIN4,"⊗":t.MO.BIN4,"⊘":t.MO.BIN4,"⊙":t.MO.BIN4,"⊚":t.MO.BIN4,"⊛":t.MO.BIN4,"⊜":t.MO.BIN4,"⊝":t.MO.BIN4,"⊞":t.MO.BIN4,"⊟":t.MO.BIN4,"⊠":t.MO.BIN4,"⊡":t.MO.BIN4,"⊢":t.MO.REL,"⊣":t.MO.REL,"⊤":t.MO.ORD55,"⊥":t.MO.REL,"⊦":t.MO.REL,"⊧":t.MO.REL,"⊨":t.MO.REL,"⊩":t.MO.REL,"⊪":t.MO.REL,"⊫":t.MO.REL,"⊬":t.MO.REL,"⊭":t.MO.REL,"⊮":t.MO.REL,"⊯":t.MO.REL,"⊰":t.MO.REL,"⊱":t.MO.REL,"⊲":t.MO.REL,"⊳":t.MO.REL,"⊴":t.MO.REL,"⊵":t.MO.REL,"⊶":t.MO.REL,"⊷":t.MO.REL,"⊸":t.MO.REL,"⊹":t.MO.REL,"⊺":t.MO.BIN4,"⊻":t.MO.BIN4,"⊼":t.MO.BIN4,"⊽":t.MO.BIN4,"⊾":t.MO.BIN3,"⊿":t.MO.BIN3,"⋄":t.MO.BIN4,"⋅":t.MO.BIN4,"⋆":t.MO.BIN4,"⋇":t.MO.BIN4,"⋈":t.MO.REL,"⋉":t.MO.BIN4,"⋊":t.MO.BIN4,"⋋":t.MO.BIN4,"⋌":t.MO.BIN4,"⋍":t.MO.REL,"⋎":t.MO.BIN4,"⋏":t.MO.BIN4,"⋐":t.MO.REL,"⋑":t.MO.REL,"⋒":t.MO.BIN4,"⋓":t.MO.BIN4,"⋔":t.MO.REL,"⋕":t.MO.REL,"⋖":t.MO.REL,"⋗":t.MO.REL,"⋘":t.MO.REL,"⋙":t.MO.REL,"⋚":t.MO.REL,"⋛":t.MO.REL,"⋜":t.MO.REL,"⋝":t.MO.REL,"⋞":t.MO.REL,"⋟":t.MO.REL,"⋠":t.MO.REL,"⋡":t.MO.REL,"⋢":t.MO.REL,"⋣":t.MO.REL,"⋤":t.MO.REL,"⋥":t.MO.REL,"⋦":t.MO.REL,"⋧":t.MO.REL,"⋨":t.MO.REL,"⋩":t.MO.REL,"⋪":t.MO.REL,"⋫":t.MO.REL,"⋬":t.MO.REL,"⋭":t.MO.REL,"⋮":t.MO.ORD55,"⋯":t.MO.INNER,"⋰":t.MO.REL,"⋱":[5,5,r.TEXCLASS.INNER,null],"⋲":t.MO.REL,"⋳":t.MO.REL,"⋴":t.MO.REL,"⋵":t.MO.REL,"⋶":t.MO.REL,"⋷":t.MO.REL,"⋸":t.MO.REL,"⋹":t.MO.REL,"⋺":t.MO.REL,"⋻":t.MO.REL,"⋼":t.MO.REL,"⋽":t.MO.REL,"⋾":t.MO.REL,"⋿":t.MO.REL,"⌅":t.MO.BIN3,"⌆":t.MO.BIN3,"⌢":t.MO.REL4,"⌣":t.MO.REL4,"〈":t.MO.OPEN,"〉":t.MO.CLOSE,"⎪":t.MO.ORD,"⎯":[0,0,r.TEXCLASS.ORD,{stretchy:!0}],"⎰":t.MO.OPEN,"⎱":t.MO.CLOSE,"─":t.MO.ORD,"△":t.MO.BIN4,"▵":t.MO.BIN4,"▹":t.MO.BIN4,"▽":t.MO.BIN4,"▿":t.MO.BIN4,"◃":t.MO.BIN4,"◯":t.MO.BIN3,"♠":t.MO.ORD,"♡":t.MO.ORD,"♢":t.MO.ORD,"♣":t.MO.ORD,"❘":t.MO.REL,"⟰":t.MO.RELSTRETCH,"⟱":t.MO.RELSTRETCH,"⟵":t.MO.WIDEREL,"⟶":t.MO.WIDEREL,"⟷":t.MO.WIDEREL,"⟸":t.MO.WIDEREL,"⟹":t.MO.WIDEREL,"⟺":t.MO.WIDEREL,"⟻":t.MO.WIDEREL,"⟼":t.MO.WIDEREL,"⟽":t.MO.WIDEREL,"⟾":t.MO.WIDEREL,"⟿":t.MO.WIDEREL,"⤀":t.MO.RELACCENT,"⤁":t.MO.RELACCENT,"⤂":t.MO.RELACCENT,"⤃":t.MO.RELACCENT,"⤄":t.MO.RELACCENT,"⤅":t.MO.RELACCENT,"⤆":t.MO.RELACCENT,"⤇":t.MO.RELACCENT,"⤈":t.MO.REL,"⤉":t.MO.REL,"⤊":t.MO.RELSTRETCH,"⤋":t.MO.RELSTRETCH,"⤌":t.MO.WIDEREL,"⤍":t.MO.WIDEREL,"⤎":t.MO.WIDEREL,"⤏":t.MO.WIDEREL,"⤐":t.MO.WIDEREL,"⤑":t.MO.RELACCENT,"⤒":t.MO.RELSTRETCH,"⤓":t.MO.RELSTRETCH,"⤔":t.MO.RELACCENT,"⤕":t.MO.RELACCENT,"⤖":t.MO.RELACCENT,"⤗":t.MO.RELACCENT,"⤘":t.MO.RELACCENT,"⤙":t.MO.RELACCENT,"⤚":t.MO.RELACCENT,"⤛":t.MO.RELACCENT,"⤜":t.MO.RELACCENT,"⤝":t.MO.RELACCENT,"⤞":t.MO.RELACCENT,"⤟":t.MO.RELACCENT,"⤠":t.MO.RELACCENT,"⤡":t.MO.RELSTRETCH,"⤢":t.MO.RELSTRETCH,"⤣":t.MO.REL,"⤤":t.MO.REL,"⤥":t.MO.REL,"⤦":t.MO.REL,"⤧":t.MO.REL,"⤨":t.MO.REL,"⤩":t.MO.REL,"⤪":t.MO.REL,"⤫":t.MO.REL,"⤬":t.MO.REL,"⤭":t.MO.REL,"⤮":t.MO.REL,"⤯":t.MO.REL,"⤰":t.MO.REL,"⤱":t.MO.REL,"⤲":t.MO.REL,"⤳":t.MO.RELACCENT,"⤴":t.MO.REL,"⤵":t.MO.REL,"⤶":t.MO.REL,"⤷":t.MO.REL,"⤸":t.MO.REL,"⤹":t.MO.REL,"⤺":t.MO.RELACCENT,"⤻":t.MO.RELACCENT,"⤼":t.MO.RELACCENT,"⤽":t.MO.RELACCENT,"⤾":t.MO.REL,"⤿":t.MO.REL,"⥀":t.MO.REL,"⥁":t.MO.REL,"⥂":t.MO.RELACCENT,"⥃":t.MO.RELACCENT,"⥄":t.MO.RELACCENT,"⥅":t.MO.RELACCENT,"⥆":t.MO.RELACCENT,"⥇":t.MO.RELACCENT,"⥈":t.MO.RELACCENT,"⥉":t.MO.REL,"⥊":t.MO.RELACCENT,"⥋":t.MO.RELACCENT,"⥌":t.MO.REL,"⥍":t.MO.REL,"⥎":t.MO.WIDEREL,"⥏":t.MO.RELSTRETCH,"⥐":t.MO.WIDEREL,"⥑":t.MO.RELSTRETCH,"⥒":t.MO.WIDEREL,"⥓":t.MO.WIDEREL,"⥔":t.MO.RELSTRETCH,"⥕":t.MO.RELSTRETCH,"⥖":t.MO.RELSTRETCH,"⥗":t.MO.RELSTRETCH,"⥘":t.MO.RELSTRETCH,"⥙":t.MO.RELSTRETCH,"⥚":t.MO.WIDEREL,"⥛":t.MO.WIDEREL,"⥜":t.MO.RELSTRETCH,"⥝":t.MO.RELSTRETCH,"⥞":t.MO.WIDEREL,"⥟":t.MO.WIDEREL,"⥠":t.MO.RELSTRETCH,"⥡":t.MO.RELSTRETCH,"⥢":t.MO.RELACCENT,"⥣":t.MO.REL,"⥤":t.MO.RELACCENT,"⥥":t.MO.REL,"⥦":t.MO.RELACCENT,"⥧":t.MO.RELACCENT,"⥨":t.MO.RELACCENT,"⥩":t.MO.RELACCENT,"⥪":t.MO.RELACCENT,"⥫":t.MO.RELACCENT,"⥬":t.MO.RELACCENT,"⥭":t.MO.RELACCENT,"⥮":t.MO.RELSTRETCH,"⥯":t.MO.RELSTRETCH,"⥰":t.MO.RELACCENT,"⥱":t.MO.RELACCENT,"⥲":t.MO.RELACCENT,"⥳":t.MO.RELACCENT,"⥴":t.MO.RELACCENT,"⥵":t.MO.RELACCENT,"⥶":t.MO.RELACCENT,"⥷":t.MO.RELACCENT,"⥸":t.MO.RELACCENT,"⥹":t.MO.RELACCENT,"⥺":t.MO.RELACCENT,"⥻":t.MO.RELACCENT,"⥼":t.MO.RELACCENT,"⥽":t.MO.RELACCENT,"⥾":t.MO.REL,"⥿":t.MO.REL,"⦁":t.MO.BIN3,"⦂":t.MO.BIN3,"⦙":t.MO.BIN3,"⦚":t.MO.BIN3,"⦛":t.MO.BIN3,"⦜":t.MO.BIN3,"⦝":t.MO.BIN3,"⦞":t.MO.BIN3,"⦟":t.MO.BIN3,"⦠":t.MO.BIN3,"⦡":t.MO.BIN3,"⦢":t.MO.BIN3,"⦣":t.MO.BIN3,"⦤":t.MO.BIN3,"⦥":t.MO.BIN3,"⦦":t.MO.BIN3,"⦧":t.MO.BIN3,"⦨":t.MO.BIN3,"⦩":t.MO.BIN3,"⦪":t.MO.BIN3,"⦫":t.MO.BIN3,"⦬":t.MO.BIN3,"⦭":t.MO.BIN3,"⦮":t.MO.BIN3,"⦯":t.MO.BIN3,"⦰":t.MO.BIN3,"⦱":t.MO.BIN3,"⦲":t.MO.BIN3,"⦳":t.MO.BIN3,"⦴":t.MO.BIN3,"⦵":t.MO.BIN3,"⦶":t.MO.BIN4,"⦷":t.MO.BIN4,"⦸":t.MO.BIN4,"⦹":t.MO.BIN4,"⦺":t.MO.BIN4,"⦻":t.MO.BIN4,"⦼":t.MO.BIN4,"⦽":t.MO.BIN4,"⦾":t.MO.BIN4,"⦿":t.MO.BIN4,"⧀":t.MO.REL,"⧁":t.MO.REL,"⧂":t.MO.BIN3,"⧃":t.MO.BIN3,"⧄":t.MO.BIN4,"⧅":t.MO.BIN4,"⧆":t.MO.BIN4,"⧇":t.MO.BIN4,"⧈":t.MO.BIN4,"⧉":t.MO.BIN3,"⧊":t.MO.BIN3,"⧋":t.MO.BIN3,"⧌":t.MO.BIN3,"⧍":t.MO.BIN3,"⧎":t.MO.REL,"⧏":t.MO.REL,"⧏̸":t.MO.REL,"⧐":t.MO.REL,"⧐̸":t.MO.REL,"⧑":t.MO.REL,"⧒":t.MO.REL,"⧓":t.MO.REL,"⧔":t.MO.REL,"⧕":t.MO.REL,"⧖":t.MO.BIN4,"⧗":t.MO.BIN4,"⧘":t.MO.BIN3,"⧙":t.MO.BIN3,"⧛":t.MO.BIN3,"⧜":t.MO.BIN3,"⧝":t.MO.BIN3,"⧞":t.MO.REL,"⧟":t.MO.BIN3,"⧠":t.MO.BIN3,"⧡":t.MO.REL,"⧢":t.MO.BIN4,"⧣":t.MO.REL,"⧤":t.MO.REL,"⧥":t.MO.REL,"⧦":t.MO.REL,"⧧":t.MO.BIN3,"⧨":t.MO.BIN3,"⧩":t.MO.BIN3,"⧪":t.MO.BIN3,"⧫":t.MO.BIN3,"⧬":t.MO.BIN3,"⧭":t.MO.BIN3,"⧮":t.MO.BIN3,"⧯":t.MO.BIN3,"⧰":t.MO.BIN3,"⧱":t.MO.BIN3,"⧲":t.MO.BIN3,"⧳":t.MO.BIN3,"⧴":t.MO.REL,"⧵":t.MO.BIN4,"⧶":t.MO.BIN4,"⧷":t.MO.BIN4,"⧸":t.MO.BIN3,"⧹":t.MO.BIN3,"⧺":t.MO.BIN3,"⧻":t.MO.BIN3,"⧾":t.MO.BIN4,"⧿":t.MO.BIN4,"⨝":t.MO.BIN3,"⨞":t.MO.BIN3,"⨟":t.MO.BIN3,"⨠":t.MO.BIN3,"⨡":t.MO.BIN3,"⨢":t.MO.BIN4,"⨣":t.MO.BIN4,"⨤":t.MO.BIN4,"⨥":t.MO.BIN4,"⨦":t.MO.BIN4,"⨧":t.MO.BIN4,"⨨":t.MO.BIN4,"⨩":t.MO.BIN4,"⨪":t.MO.BIN4,"⨫":t.MO.BIN4,"⨬":t.MO.BIN4,"⨭":t.MO.BIN4,"⨮":t.MO.BIN4,"⨯":t.MO.BIN4,"⨰":t.MO.BIN4,"⨱":t.MO.BIN4,"⨲":t.MO.BIN4,"⨳":t.MO.BIN4,"⨴":t.MO.BIN4,"⨵":t.MO.BIN4,"⨶":t.MO.BIN4,"⨷":t.MO.BIN4,"⨸":t.MO.BIN4,"⨹":t.MO.BIN4,"⨺":t.MO.BIN4,"⨻":t.MO.BIN4,"⨼":t.MO.BIN4,"⨽":t.MO.BIN4,"⨾":t.MO.BIN4,"⨿":t.MO.BIN4,"⩀":t.MO.BIN4,"⩁":t.MO.BIN4,"⩂":t.MO.BIN4,"⩃":t.MO.BIN4,"⩄":t.MO.BIN4,"⩅":t.MO.BIN4,"⩆":t.MO.BIN4,"⩇":t.MO.BIN4,"⩈":t.MO.BIN4,"⩉":t.MO.BIN4,"⩊":t.MO.BIN4,"⩋":t.MO.BIN4,"⩌":t.MO.BIN4,"⩍":t.MO.BIN4,"⩎":t.MO.BIN4,"⩏":t.MO.BIN4,"⩐":t.MO.BIN4,"⩑":t.MO.BIN4,"⩒":t.MO.BIN4,"⩓":t.MO.BIN4,"⩔":t.MO.BIN4,"⩕":t.MO.BIN4,"⩖":t.MO.BIN4,"⩗":t.MO.BIN4,"⩘":t.MO.BIN4,"⩙":t.MO.REL,"⩚":t.MO.BIN4,"⩛":t.MO.BIN4,"⩜":t.MO.BIN4,"⩝":t.MO.BIN4,"⩞":t.MO.BIN4,"⩟":t.MO.BIN4,"⩠":t.MO.BIN4,"⩡":t.MO.BIN4,"⩢":t.MO.BIN4,"⩣":t.MO.BIN4,"⩤":t.MO.BIN4,"⩥":t.MO.BIN4,"⩦":t.MO.REL,"⩧":t.MO.REL,"⩨":t.MO.REL,"⩩":t.MO.REL,"⩪":t.MO.REL,"⩫":t.MO.REL,"⩬":t.MO.REL,"⩭":t.MO.REL,"⩮":t.MO.REL,"⩯":t.MO.REL,"⩰":t.MO.REL,"⩱":t.MO.BIN4,"⩲":t.MO.BIN4,"⩳":t.MO.REL,"⩴":t.MO.REL,"⩵":t.MO.REL,"⩶":t.MO.REL,"⩷":t.MO.REL,"⩸":t.MO.REL,"⩹":t.MO.REL,"⩺":t.MO.REL,"⩻":t.MO.REL,"⩼":t.MO.REL,"⩽":t.MO.REL,"⩽̸":t.MO.REL,"⩾":t.MO.REL,"⩾̸":t.MO.REL,"⩿":t.MO.REL,"⪀":t.MO.REL,"⪁":t.MO.REL,"⪂":t.MO.REL,"⪃":t.MO.REL,"⪄":t.MO.REL,"⪅":t.MO.REL,"⪆":t.MO.REL,"⪇":t.MO.REL,"⪈":t.MO.REL,"⪉":t.MO.REL,"⪊":t.MO.REL,"⪋":t.MO.REL,"⪌":t.MO.REL,"⪍":t.MO.REL,"⪎":t.MO.REL,"⪏":t.MO.REL,"⪐":t.MO.REL,"⪑":t.MO.REL,"⪒":t.MO.REL,"⪓":t.MO.REL,"⪔":t.MO.REL,"⪕":t.MO.REL,"⪖":t.MO.REL,"⪗":t.MO.REL,"⪘":t.MO.REL,"⪙":t.MO.REL,"⪚":t.MO.REL,"⪛":t.MO.REL,"⪜":t.MO.REL,"⪝":t.MO.REL,"⪞":t.MO.REL,"⪟":t.MO.REL,"⪠":t.MO.REL,"⪡":t.MO.REL,"⪡̸":t.MO.REL,"⪢":t.MO.REL,"⪢̸":t.MO.REL,"⪣":t.MO.REL,"⪤":t.MO.REL,"⪥":t.MO.REL,"⪦":t.MO.REL,"⪧":t.MO.REL,"⪨":t.MO.REL,"⪩":t.MO.REL,"⪪":t.MO.REL,"⪫":t.MO.REL,"⪬":t.MO.REL,"⪭":t.MO.REL,"⪮":t.MO.REL,"⪯":t.MO.REL,"⪯̸":t.MO.REL,"⪰":t.MO.REL,"⪰̸":t.MO.REL,"⪱":t.MO.REL,"⪲":t.MO.REL,"⪳":t.MO.REL,"⪴":t.MO.REL,"⪵":t.MO.REL,"⪶":t.MO.REL,"⪷":t.MO.REL,"⪸":t.MO.REL,"⪹":t.MO.REL,"⪺":t.MO.REL,"⪻":t.MO.REL,"⪼":t.MO.REL,"⪽":t.MO.REL,"⪾":t.MO.REL,"⪿":t.MO.REL,"⫀":t.MO.REL,"⫁":t.MO.REL,"⫂":t.MO.REL,"⫃":t.MO.REL,"⫄":t.MO.REL,"⫅":t.MO.REL,"⫆":t.MO.REL,"⫇":t.MO.REL,"⫈":t.MO.REL,"⫉":t.MO.REL,"⫊":t.MO.REL,"⫋":t.MO.REL,"⫌":t.MO.REL,"⫍":t.MO.REL,"⫎":t.MO.REL,"⫏":t.MO.REL,"⫐":t.MO.REL,"⫑":t.MO.REL,"⫒":t.MO.REL,"⫓":t.MO.REL,"⫔":t.MO.REL,"⫕":t.MO.REL,"⫖":t.MO.REL,"⫗":t.MO.REL,"⫘":t.MO.REL,"⫙":t.MO.REL,"⫚":t.MO.REL,"⫛":t.MO.REL,"⫝":t.MO.REL,"⫝̸":t.MO.REL,"⫞":t.MO.REL,"⫟":t.MO.REL,"⫠":t.MO.REL,"⫡":t.MO.REL,"⫢":t.MO.REL,"⫣":t.MO.REL,"⫤":t.MO.REL,"⫥":t.MO.REL,"⫦":t.MO.REL,"⫧":t.MO.REL,"⫨":t.MO.REL,"⫩":t.MO.REL,"⫪":t.MO.REL,"⫫":t.MO.REL,"⫬":t.MO.REL,"⫭":t.MO.REL,"⫮":t.MO.REL,"⫯":t.MO.REL,"⫰":t.MO.REL,"⫱":t.MO.REL,"⫲":t.MO.REL,"⫳":t.MO.REL,"⫴":t.MO.BIN4,"⫵":t.MO.BIN4,"⫶":t.MO.BIN4,"⫷":t.MO.REL,"⫸":t.MO.REL,"⫹":t.MO.REL,"⫺":t.MO.REL,"⫻":t.MO.BIN4,"⫽":t.MO.BIN4,"⫾":t.MO.BIN3,"⭅":t.MO.RELSTRETCH,"⭆":t.MO.RELSTRETCH,"〈":t.MO.OPEN,"〉":t.MO.CLOSE,"︷":t.MO.WIDEACCENT,"︸":t.MO.WIDEACCENT}},t.OPTABLE.infix["^"]=t.MO.WIDEREL,t.OPTABLE.infix._=t.MO.WIDEREL,t.OPTABLE.infix["⫝̸"]=t.MO.REL}(OperatorDictionary),getDefaultExportFromCjs(OperatorDictionary);var string={},__read$Z=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$x=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};function sortLength(t,e){return t.length!==e.length?e.length-t.length:t===e?0:t<e?-1:1}function quotePattern(t){return t.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")}function unicodeChars(t){return Array.from(t).map((function(t){return t.codePointAt(0)}))}function unicodeString(t){return String.fromCodePoint.apply(String,__spreadArray$x([],__read$Z(t),!1))}function isPercent(t){return!!t.match(/%\s*$/)}function split(t){return t.trim().split(/\s+/)}Object.defineProperty(string,"__esModule",{value:!0}),string.split=string.isPercent=string.unicodeString=string.unicodeChars=string.quotePattern=string.sortLength=void 0,string.sortLength=sortLength,string.quotePattern=quotePattern,string.unicodeChars=unicodeChars,string.unicodeString=unicodeString,string.isPercent=isPercent,string.split=split;var __extends$2c=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$F=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$F=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$F.apply(this,arguments)},__read$Y=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$W=commonjsGlobal&&commonjsGlobal.__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(mo$2,"__esModule",{value:!0}),mo$2.MmlMo=void 0;var MmlNode_js_1$M=MmlNode,OperatorDictionary_js_1$1=OperatorDictionary,string_js_1$a=string,MmlMo=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 __extends$2c(e,t),Object.defineProperty(e.prototype,"texClass",{get:function(){if(null===this._texClass){var t=this.getText(),e=__read$Y(this.handleExplicitForm(this.getForms()),3),r=e[0],n=e[1],o=e[2],i=this.constructor.OPTABLE,a=i[r][t]||i[n][t]||i[o][t];return a?a[2]:MmlNode_js_1$M.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!==MmlNode_js_1$M.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===MmlNode_js_1$M.TEXCLASS.REL&&("prefix"===r&&(this.texClass=MmlNode_js_1$M.TEXCLASS.OPEN),"postfix"===r&&(this.texClass=MmlNode_js_1$M.TEXCLASS.CLOSE)),this.adjustTeXclass(t))},e.prototype.adjustTeXclass=function(t){var e=this.texClass,r=this.prevClass;if(e===MmlNode_js_1$M.TEXCLASS.NONE)return t;if(t?(!t.getProperty("autoOP")||e!==MmlNode_js_1$M.TEXCLASS.BIN&&e!==MmlNode_js_1$M.TEXCLASS.REL||(r=t.texClass=MmlNode_js_1$M.TEXCLASS.ORD),r=this.prevClass=t.texClass||MmlNode_js_1$M.TEXCLASS.ORD,this.prevLevel=this.attributes.getInherited("scriptlevel")):r=this.prevClass=MmlNode_js_1$M.TEXCLASS.NONE,e!==MmlNode_js_1$M.TEXCLASS.BIN||r!==MmlNode_js_1$M.TEXCLASS.NONE&&r!==MmlNode_js_1$M.TEXCLASS.BIN&&r!==MmlNode_js_1$M.TEXCLASS.OP&&r!==MmlNode_js_1$M.TEXCLASS.REL&&r!==MmlNode_js_1$M.TEXCLASS.OPEN&&r!==MmlNode_js_1$M.TEXCLASS.PUNCT)if(r!==MmlNode_js_1$M.TEXCLASS.BIN||e!==MmlNode_js_1$M.TEXCLASS.REL&&e!==MmlNode_js_1$M.TEXCLASS.CLOSE&&e!==MmlNode_js_1$M.TEXCLASS.PUNCT){if(e===MmlNode_js_1$M.TEXCLASS.BIN){for(var n=this,o=this.parent;o&&o.parent&&o.isEmbellished&&(1===o.childNodes.length||!o.isKind("mrow")&&o.core()===n);)n=o,o=o.parent;o.childNodes[o.childNodes.length-1]===n&&(this.texClass=MmlNode_js_1$M.TEXCLASS.ORD)}}else t.texClass=this.prevClass=MmlNode_js_1$M.TEXCLASS.ORD;else this.texClass=MmlNode_js_1$M.TEXCLASS.ORD;return this},e.prototype.setInheritedAttributes=function(e,r,n,o){void 0===e&&(e={}),void 0===r&&(r=!1),void 0===n&&(n=0),void 0===o&&(o=!1),t.prototype.setInheritedAttributes.call(this,e,r,n,o);var i=this.getText();this.checkOperatorTable(i),this.checkPseudoScripts(i),this.checkPrimes(i),this.checkMathAccent(i)},e.prototype.checkOperatorTable=function(t){var e,r,n=__read$Y(this.handleExplicitForm(this.getForms()),3),o=n[0],i=n[1],a=n[2];this.attributes.setInherited("form",o);var s=this.constructor.OPTABLE,l=s[o][t]||s[i][t]||s[a][t];if(l){void 0===this.getProperty("texClass")&&(this.texClass=l[2]);try{for(var c=__values$W(Object.keys(l[3]||{})),u=c.next();!u.done;u=c.next()){var d=u.value;this.attributes.setInherited(d,l[3][d])}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}this.lspace=(l[0]+1)/18,this.rspace=(l[1]+1)/18}else{var p=(0,OperatorDictionary_js_1$1.getRange)(t);if(p){void 0===this.getProperty("texClass")&&(this.texClass=p[2]);var m=this.constructor.MMLSPACING[p[2]];this.lspace=(m[0]+1)/18,this.rspace=(m[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,string_js_1$a.unicodeString)((0,string_js_1$a.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=__assign$F(__assign$F({},MmlNode_js_1$M.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=OperatorDictionary_js_1$1.MMLSPACING,e.OPTABLE=OperatorDictionary_js_1$1.OPTABLE,e.pseudoScripts=new RegExp(["^[\"'*`","ª","°","²-´","¹","º","‘-‟","′-‷⁗","⁰ⁱ","⁴-ⁿ","₀-₎","]+$"].join("")),e.primes=new RegExp(["^[\"'`","‘-‟","]+$"].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(["^[","´́ˊ","`̀ˋ","¨̈","~̃˜","¯̄ˉ","˘̆","ˇ̌","^̂ˆ","→⃗","˙̇","˚̊","⃛","⃜","]$"].join("")),e}(MmlNode_js_1$M.AbstractMmlTokenNode);mo$2.MmlMo=MmlMo;var mtext$2={},__extends$2b=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$E=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$E=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$E.apply(this,arguments)};Object.defineProperty(mtext$2,"__esModule",{value:!0}),mtext$2.MmlMtext=void 0;var MmlNode_js_1$L=MmlNode,MmlMtext=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$L.TEXCLASS.ORD,e}return __extends$2b(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mtext"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return!0},enumerable:!1,configurable:!0}),e.defaults=__assign$E({},MmlNode_js_1$L.AbstractMmlTokenNode.defaults),e}(MmlNode_js_1$L.AbstractMmlTokenNode);mtext$2.MmlMtext=MmlMtext;var mspace$2={},__extends$2a=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$D=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$D=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$D.apply(this,arguments)};Object.defineProperty(mspace$2,"__esModule",{value:!0}),mspace$2.MmlMspace=void 0;var MmlNode_js_1$K=MmlNode,MmlMspace=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$K.TEXCLASS.NONE,e}return __extends$2a(e,t),e.prototype.setTeXclass=function(t){return t},Object.defineProperty(e.prototype,"kind",{get:function(){return"mspace"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasNewline",{get:function(){var t=this.attributes;return null==t.getExplicit("width")&&null==t.getExplicit("height")&&null==t.getExplicit("depth")&&"newline"===t.get("linebreak")},enumerable:!1,configurable:!0}),e.defaults=__assign$D(__assign$D({},MmlNode_js_1$K.AbstractMmlTokenNode.defaults),{width:"0em",height:"0ex",depth:"0ex",linebreak:"auto"}),e}(MmlNode_js_1$K.AbstractMmlTokenNode);mspace$2.MmlMspace=MmlMspace;var ms$2={},__extends$29=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$C=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$C=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$C.apply(this,arguments)};Object.defineProperty(ms$2,"__esModule",{value:!0}),ms$2.MmlMs=void 0;var MmlNode_js_1$J=MmlNode,MmlMs=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$J.TEXCLASS.ORD,e}return __extends$29(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"ms"},enumerable:!1,configurable:!0}),e.defaults=__assign$C(__assign$C({},MmlNode_js_1$J.AbstractMmlTokenNode.defaults),{lquote:'"',rquote:'"'}),e}(MmlNode_js_1$J.AbstractMmlTokenNode);ms$2.MmlMs=MmlMs;var mrow$2={},__extends$28=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$B=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$B=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$B.apply(this,arguments)},__values$V=commonjsGlobal&&commonjsGlobal.__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(mrow$2,"__esModule",{value:!0}),mrow$2.MmlInferredMrow=mrow$2.MmlMrow=void 0;var MmlNode_js_1$I=MmlNode,MmlMrow=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._core=null,e}return __extends$28(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=__values$V(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 o=__values$V(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;if(a)if(a.isEmbellished){if(r)return!1;r=!0,this._core=n}else if(!a.isSpacelike)return!1;n++}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}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=__values$V(this.childNodes),o=n.next();!o.done;o=n.next()){var i=o.value;i&&!i.isSpacelike&&r++}}catch(e){t={error:e}}finally{try{o&&!o.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=__values$V(this.childNodes),n=r.next();!n.done;n=r.next()){var o=n.value;if(o&&!o.isSpacelike)return o}}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,o;if(null!=this.getProperty("open")||null!=this.getProperty("close")){this.getPrevClass(t),t=null;try{for(var i=__values$V(this.childNodes),a=i.next();!a.done;a=i.next()){t=a.value.setTeXclass(t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}null==this.texClass&&(this.texClass=MmlNode_js_1$I.TEXCLASS.INNER)}else{try{for(var s=__values$V(this.childNodes),l=s.next();!l.done;l=s.next()){t=l.value.setTeXclass(t)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}this.childNodes[0]&&this.updateTeXclass(this.childNodes[0])}return t},e.defaults=__assign$B({},MmlNode_js_1$I.AbstractMmlNode.defaults),e}(MmlNode_js_1$I.AbstractMmlNode);mrow$2.MmlMrow=MmlMrow;var MmlInferredMrow=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$28(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=MmlMrow.defaults,e}(MmlMrow);mrow$2.MmlInferredMrow=MmlInferredMrow;var mfrac$2={},__extends$27=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$A=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$A=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$A.apply(this,arguments)},__values$U=commonjsGlobal&&commonjsGlobal.__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(mfrac$2,"__esModule",{value:!0}),mfrac$2.MmlMfrac=void 0;var MmlNode_js_1$H=MmlNode,MmlMfrac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$27(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=__values$U(this.childNodes),o=n.next();!o.done;o=n.next()){o.value.setTeXclass(null)}}catch(t){e={error:t}}finally{try{o&&!o.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=__assign$A(__assign$A({},MmlNode_js_1$H.AbstractMmlBaseNode.defaults),{linethickness:"medium",numalign:"center",denomalign:"center",bevelled:!1}),e}(MmlNode_js_1$H.AbstractMmlBaseNode);mfrac$2.MmlMfrac=MmlMfrac;var msqrt$2={},__extends$26=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$z=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$z=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$z.apply(this,arguments)};Object.defineProperty(msqrt$2,"__esModule",{value:!0}),msqrt$2.MmlMsqrt=void 0;var MmlNode_js_1$G=MmlNode,MmlMsqrt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$G.TEXCLASS.ORD,e}return __extends$26(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"msqrt"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this},e.prototype.setChildInheritedAttributes=function(t,e,r,n){this.childNodes[0].setInheritedAttributes(t,e,r,!0)},e.defaults=__assign$z({},MmlNode_js_1$G.AbstractMmlNode.defaults),e}(MmlNode_js_1$G.AbstractMmlNode);msqrt$2.MmlMsqrt=MmlMsqrt;var mroot$2={},__extends$25=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$y=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$y=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$y.apply(this,arguments)};Object.defineProperty(mroot$2,"__esModule",{value:!0}),mroot$2.MmlMroot=void 0;var MmlNode_js_1$F=MmlNode,MmlMroot=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$F.TEXCLASS.ORD,e}return __extends$25(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mroot"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this.childNodes[1].setTeXclass(null),this},e.prototype.setChildInheritedAttributes=function(t,e,r,n){this.childNodes[0].setInheritedAttributes(t,e,r,!0),this.childNodes[1].setInheritedAttributes(t,!1,r+2,n)},e.defaults=__assign$y({},MmlNode_js_1$F.AbstractMmlNode.defaults),e}(MmlNode_js_1$F.AbstractMmlNode);mroot$2.MmlMroot=MmlMroot;var mstyle={},__extends$24=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$x=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$x=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$x.apply(this,arguments)};Object.defineProperty(mstyle,"__esModule",{value:!0}),mstyle.MmlMstyle=void 0;var MmlNode_js_1$E=MmlNode,Attributes_js_1$3=Attributes,MmlMstyle=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$24(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mstyle"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notParent",{get:function(){return this.childNodes[0]&&1===this.childNodes[0].childNodes.length},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(t,e,r,n){var o=this.attributes.getExplicit("scriptlevel");null!=o&&((o=o.toString()).match(/^\s*[-+]/)?r+=parseInt(o):r=parseInt(o),n=!1);var i=this.attributes.getExplicit("displaystyle");null!=i&&(e=!0===i,n=!1);var a=this.attributes.getExplicit("data-cramped");null!=a&&(n=a),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),this.childNodes[0].setInheritedAttributes(t,e,r,n)},e.defaults=__assign$x(__assign$x({},MmlNode_js_1$E.AbstractMmlLayoutNode.defaults),{scriptlevel:Attributes_js_1$3.INHERIT,displaystyle:Attributes_js_1$3.INHERIT,scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:"8px",mathbackground:Attributes_js_1$3.INHERIT,mathcolor:Attributes_js_1$3.INHERIT,dir:Attributes_js_1$3.INHERIT,infixlinebreakstyle:"before"}),e}(MmlNode_js_1$E.AbstractMmlLayoutNode);mstyle.MmlMstyle=MmlMstyle;var merror={},__extends$23=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$w=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$w=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$w.apply(this,arguments)};Object.defineProperty(merror,"__esModule",{value:!0}),merror.MmlMerror=void 0;var MmlNode_js_1$D=MmlNode,MmlMerror=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$D.TEXCLASS.ORD,e}return __extends$23(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"merror"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.defaults=__assign$w({},MmlNode_js_1$D.AbstractMmlNode.defaults),e}(MmlNode_js_1$D.AbstractMmlNode);merror.MmlMerror=MmlMerror;var mpadded$2={},__extends$22=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$v=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$v=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$v.apply(this,arguments)};Object.defineProperty(mpadded$2,"__esModule",{value:!0}),mpadded$2.MmlMpadded=void 0;var MmlNode_js_1$C=MmlNode,MmlMpadded=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$22(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mpadded"},enumerable:!1,configurable:!0}),e.defaults=__assign$v(__assign$v({},MmlNode_js_1$C.AbstractMmlLayoutNode.defaults),{width:"",height:"",depth:"",lspace:0,voffset:0}),e}(MmlNode_js_1$C.AbstractMmlLayoutNode);mpadded$2.MmlMpadded=MmlMpadded;var mphantom={},__extends$21=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$u=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$u.apply(this,arguments)};Object.defineProperty(mphantom,"__esModule",{value:!0}),mphantom.MmlMphantom=void 0;var MmlNode_js_1$B=MmlNode,MmlMphantom=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$B.TEXCLASS.ORD,e}return __extends$21(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mphantom"},enumerable:!1,configurable:!0}),e.defaults=__assign$u({},MmlNode_js_1$B.AbstractMmlLayoutNode.defaults),e}(MmlNode_js_1$B.AbstractMmlLayoutNode);mphantom.MmlMphantom=MmlMphantom;var mfenced$2={},__extends$20=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$t=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$t.apply(this,arguments)},__values$T=commonjsGlobal&&commonjsGlobal.__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(mfenced$2,"__esModule",{value:!0}),mfenced$2.MmlMfenced=void 0;var MmlNode_js_1$A=MmlNode,MmlMfenced=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$A.TEXCLASS.INNER,e.separators=[],e.open=null,e.close=null,e}return __extends$20(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<r;e++)this.separators[e-1]&&(t=this.separators[e-1].setTeXclass(t)),this.childNodes[e]&&(t=this.childNodes[e].setTeXclass(t));return this.close&&(t=this.close.setTeXclass(t)),this.updateTeXclass(this.open),t},e.prototype.setChildInheritedAttributes=function(e,r,n,o){var i,a;this.addFakeNodes();try{for(var s=__values$T([this.open,this.close].concat(this.separators)),l=s.next();!l.done;l=s.next()){var c=l.value;c&&c.setInheritedAttributes(e,r,n,o)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}t.prototype.setChildInheritedAttributes.call(this,e,r,n,o)},e.prototype.addFakeNodes=function(){var t,e,r=this.attributes.getList("open","close","separators"),n=r.open,o=r.close,i=r.separators;if(n=n.replace(/[ \t\n\r]/g,""),o=o.replace(/[ \t\n\r]/g,""),i=i.replace(/[ \t\n\r]/g,""),n&&(this.open=this.fakeNode(n,{fence:!0,form:"prefix"},MmlNode_js_1$A.TEXCLASS.OPEN)),i){for(;i.length<this.childNodes.length-1;)i+=i.charAt(i.length-1);var a=0;try{for(var s=__values$T(this.childNodes.slice(1)),l=s.next();!l.done;l=s.next()){l.value&&this.separators.push(this.fakeNode(i.charAt(a++)))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}o&&(this.close=this.fakeNode(o,{fence:!0,form:"postfix"},MmlNode_js_1$A.TEXCLASS.CLOSE))},e.prototype.fakeNode=function(t,e,r){void 0===e&&(e={}),void 0===r&&(r=null);var n=this.factory.create("text").setText(t),o=this.factory.create("mo",e,[n]);return o.texClass=r,o.parent=this,o},e.defaults=__assign$t(__assign$t({},MmlNode_js_1$A.AbstractMmlNode.defaults),{open:"(",close:")",separators:","}),e}(MmlNode_js_1$A.AbstractMmlNode);mfenced$2.MmlMfenced=MmlMfenced;var menclose$2={},__extends$1$=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$s=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$s.apply(this,arguments)};Object.defineProperty(menclose$2,"__esModule",{value:!0}),menclose$2.MmlMenclose=void 0;var MmlNode_js_1$z=MmlNode,MmlMenclose=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$z.TEXCLASS.ORD,e}return __extends$1$(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"menclose"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContininer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t},e.defaults=__assign$s(__assign$s({},MmlNode_js_1$z.AbstractMmlNode.defaults),{notation:"longdiv"}),e}(MmlNode_js_1$z.AbstractMmlNode);menclose$2.MmlMenclose=MmlMenclose;var maction$2={},__extends$1_=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$r=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$r.apply(this,arguments)};Object.defineProperty(maction$2,"__esModule",{value:!0}),maction$2.MmlMaction=void 0;var MmlNode_js_1$y=MmlNode,MmlMaction=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1_(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"maction"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){var t=this.attributes.get("selection"),e=Math.max(1,Math.min(this.childNodes.length,t))-1;return this.childNodes[e]||this.factory.create("mrow")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmbellished",{get:function(){return this.selected.isEmbellished},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return this.selected.isSpacelike},enumerable:!1,configurable:!0}),e.prototype.core=function(){return this.selected.core()},e.prototype.coreMO=function(){return this.selected.coreMO()},e.prototype.verifyAttributes=function(e){(t.prototype.verifyAttributes.call(this,e),"toggle"!==this.attributes.get("actiontype")&&void 0!==this.attributes.getExplicit("selection"))&&delete this.attributes.getAllAttributes().selection},e.prototype.setTeXclass=function(t){"tooltip"===this.attributes.get("actiontype")&&this.childNodes[1]&&this.childNodes[1].setTeXclass(null);var e=this.selected;return t=e.setTeXclass(t),this.updateTeXclass(e),t},e.prototype.nextToggleSelection=function(){var t=Math.max(1,this.attributes.get("selection")+1);t>this.childNodes.length&&(t=1),this.attributes.set("selection",t)},e.defaults=__assign$r(__assign$r({},MmlNode_js_1$y.AbstractMmlNode.defaults),{actiontype:"toggle",selection:1}),e}(MmlNode_js_1$y.AbstractMmlNode);maction$2.MmlMaction=MmlMaction;var msubsup$2={},__extends$1Z=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$q=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$q=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$q.apply(this,arguments)};Object.defineProperty(msubsup$2,"__esModule",{value:!0}),msubsup$2.MmlMsup=msubsup$2.MmlMsub=msubsup$2.MmlMsubsup=void 0;var MmlNode_js_1$x=MmlNode,MmlMsubsup=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Z(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"msubsup"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"base",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sub",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sup",{get:function(){return 2},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(t,e,r,n){var o=this.childNodes;o[0].setInheritedAttributes(t,e,r,n),o[1].setInheritedAttributes(t,!1,r+1,n||1===this.sub),o[2]&&o[2].setInheritedAttributes(t,!1,r+1,n||2===this.sub)},e.defaults=__assign$q(__assign$q({},MmlNode_js_1$x.AbstractMmlBaseNode.defaults),{subscriptshift:"",superscriptshift:""}),e}(MmlNode_js_1$x.AbstractMmlBaseNode);msubsup$2.MmlMsubsup=MmlMsubsup;var MmlMsub=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Z(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"msub"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),e.defaults=__assign$q({},MmlMsubsup.defaults),e}(MmlMsubsup);msubsup$2.MmlMsub=MmlMsub;var MmlMsup=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Z(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"msup"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sup",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sub",{get:function(){return 2},enumerable:!1,configurable:!0}),e.defaults=__assign$q({},MmlMsubsup.defaults),e}(MmlMsubsup);msubsup$2.MmlMsup=MmlMsup;var munderover$2={},__extends$1Y=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$p=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$p.apply(this,arguments)};Object.defineProperty(munderover$2,"__esModule",{value:!0}),munderover$2.MmlMover=munderover$2.MmlMunder=munderover$2.MmlMunderover=void 0;var MmlNode_js_1$w=MmlNode,MmlMunderover=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Y(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"munderover"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"base",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"under",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"over",{get:function(){return 2},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 o=this.childNodes;o[0].setInheritedAttributes(t,e,r,n||!!o[this.over]);var i=!(e||!o[0].coreMO().attributes.get("movablelimits")),a=this.constructor.ACCENTS;o[1].setInheritedAttributes(t,!1,this.getScriptlevel(a[1],i,r),n||1===this.under),this.setInheritedAccent(1,a[1],e,r,n,i),o[2]&&(o[2].setInheritedAttributes(t,!1,this.getScriptlevel(a[2],i,r),n||2===this.under),this.setInheritedAccent(2,a[2],e,r,n,i))},e.prototype.getScriptlevel=function(t,e,r){return!e&&this.attributes.get(t)||r++,r},e.prototype.setInheritedAccent=function(t,e,r,n,o,i){var a=this.childNodes[t];if(null==this.attributes.getExplicit(e)&&a.isEmbellished){var s=a.coreMO().attributes.get("accent");this.attributes.setInherited(e,s),s!==this.attributes.getDefault(e)&&a.setInheritedAttributes({},r,this.getScriptlevel(e,i,n),o)}},e.defaults=__assign$p(__assign$p({},MmlNode_js_1$w.AbstractMmlBaseNode.defaults),{accent:!1,accentunder:!1,align:"center"}),e.ACCENTS=["","accentunder","accent"],e}(MmlNode_js_1$w.AbstractMmlBaseNode);munderover$2.MmlMunderover=MmlMunderover;var MmlMunder=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Y(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"munder"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),e.defaults=__assign$p({},MmlMunderover.defaults),e}(MmlMunderover);munderover$2.MmlMunder=MmlMunder;var MmlMover=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Y(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mover"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"over",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"under",{get:function(){return 2},enumerable:!1,configurable:!0}),e.defaults=__assign$p({},MmlMunderover.defaults),e.ACCENTS=["","accent","accentunder"],e}(MmlMunderover);munderover$2.MmlMover=MmlMover;var mmultiscripts$2={},__extends$1X=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$o=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$o.apply(this,arguments)};Object.defineProperty(mmultiscripts$2,"__esModule",{value:!0}),mmultiscripts$2.MmlNone=mmultiscripts$2.MmlMprescripts=mmultiscripts$2.MmlMmultiscripts=void 0;var MmlNode_js_1$v=MmlNode,msubsup_js_1$5=msubsup$2,MmlMmultiscripts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1X(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mmultiscripts"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 1},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(t,e,r,n){this.childNodes[0].setInheritedAttributes(t,e,r,n);for(var o=!1,i=1,a=0;i<this.childNodes.length;i++){var s=this.childNodes[i];if(s.isKind("mprescripts")){if(!o&&(o=!0,i%2==0)){var l=this.factory.create("mrow");this.childNodes.splice(i,0,l),l.parent=this,i++}}else{var c=n||a%2==0;s.setInheritedAttributes(t,!1,r+1,c),a++}}this.childNodes.length%2==(o?1:0)&&(this.appendChild(this.factory.create("mrow")),this.childNodes[this.childNodes.length-1].setInheritedAttributes(t,!1,r+1,n))},e.prototype.verifyChildren=function(e){for(var r=!1,n=e.fixMmultiscripts,o=0;o<this.childNodes.length;o++){var i=this.childNodes[o];i.isKind("mprescripts")&&(r?i.mError(i.kind+" can only appear once in "+this.kind,e,!0):(r=!0,o%2!=0||n||this.mError("There must be an equal number of prescripts of each type",e)))}this.childNodes.length%2!=(r?1:0)||n||this.mError("There must be an equal number of scripts of each type",e),t.prototype.verifyChildren.call(this,e)},e.defaults=__assign$o({},msubsup_js_1$5.MmlMsubsup.defaults),e}(msubsup_js_1$5.MmlMsubsup);mmultiscripts$2.MmlMmultiscripts=MmlMmultiscripts;var MmlMprescripts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1X(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mprescripts"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),e.prototype.verifyTree=function(e){t.prototype.verifyTree.call(this,e),this.parent&&!this.parent.isKind("mmultiscripts")&&this.mError(this.kind+" must be a child of mmultiscripts",e,!0)},e.defaults=__assign$o({},MmlNode_js_1$v.AbstractMmlNode.defaults),e}(MmlNode_js_1$v.AbstractMmlNode);mmultiscripts$2.MmlMprescripts=MmlMprescripts;var MmlNone$1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1X(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"none"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),e.prototype.verifyTree=function(e){t.prototype.verifyTree.call(this,e),this.parent&&!this.parent.isKind("mmultiscripts")&&this.mError(this.kind+" must be a child of mmultiscripts",e,!0)},e.defaults=__assign$o({},MmlNode_js_1$v.AbstractMmlNode.defaults),e}(MmlNode_js_1$v.AbstractMmlNode);mmultiscripts$2.MmlNone=MmlNone$1;var mtable$2={},__extends$1W=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$n=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$n.apply(this,arguments)},__values$S=commonjsGlobal&&commonjsGlobal.__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(mtable$2,"__esModule",{value:!0}),mtable$2.MmlMtable=void 0;var MmlNode_js_1$u=MmlNode,string_js_1$9=string,MmlMtable=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.properties={useHeight:!0},e.texclass=MmlNode_js_1$u.TEXCLASS.ORD,e}return __extends$1W(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,o){var i,a;try{for(var s=__values$S(MmlNode_js_1$u.indentAttributes),l=s.next();!l.done;l=s.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){i={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}t.prototype.setInheritedAttributes.call(this,e,r,n,o)},e.prototype.setChildInheritedAttributes=function(t,e,r,n){var o,i,a,s;try{for(var l=__values$S(this.childNodes),c=l.next();!c.done;c=l.next()){(h=c.value).isKind("mtr")||this.replaceChild(this.factory.create("mtr"),h).appendChild(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.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"),d=(0,string_js_1$9.split)(this.attributes.get("rowalign"));try{for(var p=__values$S(this.childNodes),m=p.next();!m.done;m=p.next()){var h=m.value;t.rowalign[1]=d.shift()||t.rowalign[1],h.setInheritedAttributes(t,e,r,!!u)}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}},e.prototype.verifyChildren=function(e){for(var r=null,n=this.factory,o=0;o<this.childNodes.length;o++){var i=this.childNodes[o];if(i.isKind("mtr"))r=null;else{var a=i.isKind("mtd");if(r?(this.removeChild(i),o--):r=this.replaceChild(n.create("mtr"),i),r.appendChild(a?i:n.create("mtd",{},[i])),!e.fixMtables){i.parent.removeChild(i),i.parent=this,a&&r.appendChild(n.create("mtd"));var s=i.mError("Children of "+this.kind+" must be mtr or mlabeledtr",e,a);r.childNodes[r.childNodes.length-1].appendChild(s)}}}t.prototype.verifyChildren.call(this,e)},e.prototype.setTeXclass=function(t){var e,r;this.getPrevClass(t);try{for(var n=__values$S(this.childNodes),o=n.next();!o.done;o=n.next()){o.value.setTeXclass(null)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.defaults=__assign$n(__assign$n({},MmlNode_js_1$u.AbstractMmlNode.defaults),{align:"axis",rowalign:"baseline",columnalign:"center",groupalign:"{left}",alignmentscope:!0,columnwidth:"auto",width:"auto",rowspacing:"1ex",columnspacing:".8em",rowlines:"none",columnlines:"none",frame:"none",framespacing:"0.4em 0.5ex",equalrows:!1,equalcolumns:!1,displaystyle:!1,side:"right",minlabelspacing:"0.8em"}),e}(MmlNode_js_1$u.AbstractMmlNode);mtable$2.MmlMtable=MmlMtable;var mtr$2={},__extends$1V=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$m=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$m.apply(this,arguments)},__values$R=commonjsGlobal&&commonjsGlobal.__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(mtr$2,"__esModule",{value:!0}),mtr$2.MmlMlabeledtr=mtr$2.MmlMtr=void 0;var MmlNode_js_1$t=MmlNode,Attributes_js_1$2=Attributes,string_js_1$8=string,MmlMtr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1V(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 o,i,a,s;try{for(var l=__values$R(this.childNodes),c=l.next();!c.done;c=l.next()){(m=c.value).isKind("mtd")||this.replaceChild(this.factory.create("mtd"),m).appendChild(m)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var u=(0,string_js_1$8.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 d=__values$R(this.childNodes),p=d.next();!p.done;p=d.next()){var m=p.value;t.columnalign[1]=u.shift()||t.columnalign[1],m.setInheritedAttributes(t,e,r,n)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}},e.prototype.verifyChildren=function(e){var r,n;if(!this.parent||this.parent.isKind("mtable")){try{for(var o=__values$R(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;if(!a.isKind("mtd"))this.replaceChild(this.factory.create("mtd"),a).appendChild(a),e.fixMtables||a.mError("Children of "+this.kind+" must be mtd",e)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}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=__values$R(this.childNodes),o=n.next();!o.done;o=n.next()){o.value.setTeXclass(null)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.defaults=__assign$m(__assign$m({},MmlNode_js_1$t.AbstractMmlNode.defaults),{rowalign:Attributes_js_1$2.INHERIT,columnalign:Attributes_js_1$2.INHERIT,groupalign:Attributes_js_1$2.INHERIT}),e}(MmlNode_js_1$t.AbstractMmlNode);mtr$2.MmlMtr=MmlMtr;var MmlMlabeledtr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1V(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}(MmlMtr);mtr$2.MmlMlabeledtr=MmlMlabeledtr;var mtd$2={},__extends$1U=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$l=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$l=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$l.apply(this,arguments)};Object.defineProperty(mtd$2,"__esModule",{value:!0}),mtd$2.MmlMtd=void 0;var MmlNode_js_1$s=MmlNode,Attributes_js_1$1=Attributes,MmlMtd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1U(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mtd"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.verifyChildren=function(e){!this.parent||this.parent.isKind("mtr")?t.prototype.verifyChildren.call(this,e):this.mError(this.kind+" can only be a child of an mtr or mlabeledtr",e,!0)},e.prototype.setTeXclass=function(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this},e.defaults=__assign$l(__assign$l({},MmlNode_js_1$s.AbstractMmlBaseNode.defaults),{rowspan:1,columnspan:1,rowalign:Attributes_js_1$1.INHERIT,columnalign:Attributes_js_1$1.INHERIT,groupalign:Attributes_js_1$1.INHERIT}),e}(MmlNode_js_1$s.AbstractMmlBaseNode);mtd$2.MmlMtd=MmlMtd;var maligngroup={},__extends$1T=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$k=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$k=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$k.apply(this,arguments)};Object.defineProperty(maligngroup,"__esModule",{value:!0}),maligngroup.MmlMaligngroup=void 0;var MmlNode_js_1$r=MmlNode,Attributes_js_1=Attributes,MmlMaligngroup=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1T(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"maligngroup"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(e,r,n,o){e=this.addInheritedAttributes(e,this.attributes.getAllAttributes()),t.prototype.setChildInheritedAttributes.call(this,e,r,n,o)},e.defaults=__assign$k(__assign$k({},MmlNode_js_1$r.AbstractMmlLayoutNode.defaults),{groupalign:Attributes_js_1.INHERIT}),e}(MmlNode_js_1$r.AbstractMmlLayoutNode);maligngroup.MmlMaligngroup=MmlMaligngroup;var malignmark={},__extends$1S=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$j=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$j=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$j.apply(this,arguments)};Object.defineProperty(malignmark,"__esModule",{value:!0}),malignmark.MmlMalignmark=void 0;var MmlNode_js_1$q=MmlNode,MmlMalignmark=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1S(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"malignmark"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return!0},enumerable:!1,configurable:!0}),e.defaults=__assign$j(__assign$j({},MmlNode_js_1$q.AbstractMmlNode.defaults),{edge:"left"}),e}(MmlNode_js_1$q.AbstractMmlNode);malignmark.MmlMalignmark=MmlMalignmark;var mglyph$2={},__extends$1R=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$i=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$i.apply(this,arguments)};Object.defineProperty(mglyph$2,"__esModule",{value:!0}),mglyph$2.MmlMglyph=void 0;var MmlNode_js_1$p=MmlNode,MmlMglyph=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=MmlNode_js_1$p.TEXCLASS.ORD,e}return __extends$1R(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mglyph"},enumerable:!1,configurable:!0}),e.prototype.verifyAttributes=function(e){var r=this.attributes.getList("src","fontfamily","index"),n=r.src,o=r.fontfamily,i=r.index;""!==n||""!==o&&""!==i?t.prototype.verifyAttributes.call(this,e):this.mError("mglyph must have either src or fontfamily and index attributes",e,!0)},e.defaults=__assign$i(__assign$i({},MmlNode_js_1$p.AbstractMmlTokenNode.defaults),{alt:"",src:"",index:"",width:"auto",height:"auto",valign:"0em"}),e}(MmlNode_js_1$p.AbstractMmlTokenNode);mglyph$2.MmlMglyph=MmlMglyph;var semantics$2={},__extends$1Q=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$h=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$h=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$h.apply(this,arguments)};Object.defineProperty(semantics$2,"__esModule",{value:!0}),semantics$2.MmlAnnotation=semantics$2.MmlAnnotationXML=semantics$2.MmlSemantics=void 0;var MmlNode_js_1$o=MmlNode,MmlSemantics=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"semantics"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notParent",{get:function(){return!0},enumerable:!1,configurable:!0}),e.defaults=__assign$h(__assign$h({},MmlNode_js_1$o.AbstractMmlBaseNode.defaults),{definitionUrl:null,encoding:null}),e}(MmlNode_js_1$o.AbstractMmlBaseNode);semantics$2.MmlSemantics=MmlSemantics;var MmlAnnotationXML=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"annotation-xml"},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(){},e.defaults=__assign$h(__assign$h({},MmlNode_js_1$o.AbstractMmlNode.defaults),{definitionUrl:null,encoding:null,cd:"mathmlkeys",name:"",src:null}),e}(MmlNode_js_1$o.AbstractMmlNode);semantics$2.MmlAnnotationXML=MmlAnnotationXML;var MmlAnnotation=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.properties={isChars:!0},e}return __extends$1Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"annotation"},enumerable:!1,configurable:!0}),e.defaults=__assign$h({},MmlAnnotationXML.defaults),e}(MmlAnnotationXML);semantics$2.MmlAnnotation=MmlAnnotation;var TeXAtom$3={},__extends$1P=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$g=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$g=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$g.apply(this,arguments)};Object.defineProperty(TeXAtom$3,"__esModule",{value:!0}),TeXAtom$3.TeXAtom=void 0;var MmlNode_js_1$n=MmlNode,mo_js_1$4=mo$2,TeXAtom$2=function(t){function e(e,r,n){var o=t.call(this,e,r,n)||this;return o.texclass=MmlNode_js_1$n.TEXCLASS.ORD,o.setProperty("texClass",o.texClass),o}return __extends$1P(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"TeXAtom"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notParent",{get:function(){return this.childNodes[0]&&1===this.childNodes[0].childNodes.length},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){return this.childNodes[0].setTeXclass(null),this.adjustTeXclass(t)},e.prototype.adjustTeXclass=function(t){return t},e.defaults=__assign$g({},MmlNode_js_1$n.AbstractMmlBaseNode.defaults),e}(MmlNode_js_1$n.AbstractMmlBaseNode);TeXAtom$3.TeXAtom=TeXAtom$2,TeXAtom$2.prototype.adjustTeXclass=mo_js_1$4.MmlMo.prototype.adjustTeXclass;var mathchoice={},__extends$1O=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$f=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$f.apply(this,arguments)};Object.defineProperty(mathchoice,"__esModule",{value:!0}),mathchoice.MathChoice=void 0;var MmlNode_js_1$m=MmlNode,MathChoice=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1O(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"MathChoice"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 4},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notParent",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setInheritedAttributes=function(t,e,r,n){var o=e?0:Math.max(0,Math.min(r,2))+1,i=this.childNodes[o]||this.factory.create("mrow");this.parent.replaceChild(i,this),i.setInheritedAttributes(t,e,r,n)},e.defaults=__assign$f({},MmlNode_js_1$m.AbstractMmlBaseNode.defaults),e}(MmlNode_js_1$m.AbstractMmlBaseNode),_a$b;mathchoice.MathChoice=MathChoice,Object.defineProperty(MML,"__esModule",{value:!0}),MML.MML=void 0;var MmlNode_js_1$l=MmlNode,math_js_1$2=math$2,mi_js_1$2=mi$2,mn_js_1$2=mn$2,mo_js_1$3=mo$2,mtext_js_1$2=mtext$2,mspace_js_1$2=mspace$2,ms_js_1$2=ms$2,mrow_js_1$2=mrow$2,mfrac_js_1$2=mfrac$2,msqrt_js_1$3=msqrt$2,mroot_js_1$2=mroot$2,mstyle_js_1=mstyle,merror_js_1=merror,mpadded_js_1$2=mpadded$2,mphantom_js_1=mphantom,mfenced_js_1$2=mfenced$2,menclose_js_1$2=menclose$2,maction_js_1$2=maction$2,msubsup_js_1$4=msubsup$2,munderover_js_1$2=munderover$2,mmultiscripts_js_1$2=mmultiscripts$2,mtable_js_1$2=mtable$2,mtr_js_1$2=mtr$2,mtd_js_1$2=mtd$2,maligngroup_js_1=maligngroup,malignmark_js_1=malignmark,mglyph_js_1$2=mglyph$2,semantics_js_1$2=semantics$2,TeXAtom_js_1$2=TeXAtom$3,mathchoice_js_1=mathchoice;MML.MML=(_a$b={},_a$b[math_js_1$2.MmlMath.prototype.kind]=math_js_1$2.MmlMath,_a$b[mi_js_1$2.MmlMi.prototype.kind]=mi_js_1$2.MmlMi,_a$b[mn_js_1$2.MmlMn.prototype.kind]=mn_js_1$2.MmlMn,_a$b[mo_js_1$3.MmlMo.prototype.kind]=mo_js_1$3.MmlMo,_a$b[mtext_js_1$2.MmlMtext.prototype.kind]=mtext_js_1$2.MmlMtext,_a$b[mspace_js_1$2.MmlMspace.prototype.kind]=mspace_js_1$2.MmlMspace,_a$b[ms_js_1$2.MmlMs.prototype.kind]=ms_js_1$2.MmlMs,_a$b[mrow_js_1$2.MmlMrow.prototype.kind]=mrow_js_1$2.MmlMrow,_a$b[mrow_js_1$2.MmlInferredMrow.prototype.kind]=mrow_js_1$2.MmlInferredMrow,_a$b[mfrac_js_1$2.MmlMfrac.prototype.kind]=mfrac_js_1$2.MmlMfrac,_a$b[msqrt_js_1$3.MmlMsqrt.prototype.kind]=msqrt_js_1$3.MmlMsqrt,_a$b[mroot_js_1$2.MmlMroot.prototype.kind]=mroot_js_1$2.MmlMroot,_a$b[mstyle_js_1.MmlMstyle.prototype.kind]=mstyle_js_1.MmlMstyle,_a$b[merror_js_1.MmlMerror.prototype.kind]=merror_js_1.MmlMerror,_a$b[mpadded_js_1$2.MmlMpadded.prototype.kind]=mpadded_js_1$2.MmlMpadded,_a$b[mphantom_js_1.MmlMphantom.prototype.kind]=mphantom_js_1.MmlMphantom,_a$b[mfenced_js_1$2.MmlMfenced.prototype.kind]=mfenced_js_1$2.MmlMfenced,_a$b[menclose_js_1$2.MmlMenclose.prototype.kind]=menclose_js_1$2.MmlMenclose,_a$b[maction_js_1$2.MmlMaction.prototype.kind]=maction_js_1$2.MmlMaction,_a$b[msubsup_js_1$4.MmlMsub.prototype.kind]=msubsup_js_1$4.MmlMsub,_a$b[msubsup_js_1$4.MmlMsup.prototype.kind]=msubsup_js_1$4.MmlMsup,_a$b[msubsup_js_1$4.MmlMsubsup.prototype.kind]=msubsup_js_1$4.MmlMsubsup,_a$b[munderover_js_1$2.MmlMunder.prototype.kind]=munderover_js_1$2.MmlMunder,_a$b[munderover_js_1$2.MmlMover.prototype.kind]=munderover_js_1$2.MmlMover,_a$b[munderover_js_1$2.MmlMunderover.prototype.kind]=munderover_js_1$2.MmlMunderover,_a$b[mmultiscripts_js_1$2.MmlMmultiscripts.prototype.kind]=mmultiscripts_js_1$2.MmlMmultiscripts,_a$b[mmultiscripts_js_1$2.MmlMprescripts.prototype.kind]=mmultiscripts_js_1$2.MmlMprescripts,_a$b[mmultiscripts_js_1$2.MmlNone.prototype.kind]=mmultiscripts_js_1$2.MmlNone,_a$b[mtable_js_1$2.MmlMtable.prototype.kind]=mtable_js_1$2.MmlMtable,_a$b[mtr_js_1$2.MmlMlabeledtr.prototype.kind]=mtr_js_1$2.MmlMlabeledtr,_a$b[mtr_js_1$2.MmlMtr.prototype.kind]=mtr_js_1$2.MmlMtr,_a$b[mtd_js_1$2.MmlMtd.prototype.kind]=mtd_js_1$2.MmlMtd,_a$b[maligngroup_js_1.MmlMaligngroup.prototype.kind]=maligngroup_js_1.MmlMaligngroup,_a$b[malignmark_js_1.MmlMalignmark.prototype.kind]=malignmark_js_1.MmlMalignmark,_a$b[mglyph_js_1$2.MmlMglyph.prototype.kind]=mglyph_js_1$2.MmlMglyph,_a$b[semantics_js_1$2.MmlSemantics.prototype.kind]=semantics_js_1$2.MmlSemantics,_a$b[semantics_js_1$2.MmlAnnotation.prototype.kind]=semantics_js_1$2.MmlAnnotation,_a$b[semantics_js_1$2.MmlAnnotationXML.prototype.kind]=semantics_js_1$2.MmlAnnotationXML,_a$b[TeXAtom_js_1$2.TeXAtom.prototype.kind]=TeXAtom_js_1$2.TeXAtom,_a$b[mathchoice_js_1.MathChoice.prototype.kind]=mathchoice_js_1.MathChoice,_a$b[MmlNode_js_1$l.TextNode.prototype.kind]=MmlNode_js_1$l.TextNode,_a$b[MmlNode_js_1$l.XMLNode.prototype.kind]=MmlNode_js_1$l.XMLNode,_a$b);var __extends$1N=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(MmlFactory$1,"__esModule",{value:!0});var MmlFactory_2=MmlFactory$1.MmlFactory=void 0,NodeFactory_js_1$2=NodeFactory$2,MML_js_1=MML,MmlFactory=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1N(e,t),Object.defineProperty(e.prototype,"MML",{get:function(){return this.node},enumerable:!1,configurable:!0}),e.defaultNodes=MML_js_1.MML,e}(NodeFactory_js_1$2.AbstractNodeFactory);MmlFactory_2=MmlFactory$1.MmlFactory=MmlFactory;var Visitor={},__values$Q=commonjsGlobal&&commonjsGlobal.__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.")},__read$X=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$w=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(Visitor,"__esModule",{value:!0}),Visitor.AbstractVisitor=void 0;var Node_js_1=Node,AbstractVisitor=function(){function t(e){var r,n;this.nodeHandlers=new Map;try{for(var o=__values$Q(e.getKinds()),i=o.next();!i.done;i=o.next()){var a=i.value,s=this[t.methodName(a)];s&&this.nodeHandlers.set(a,s)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}return t.methodName=function(t){return"visit"+(t.charAt(0).toUpperCase()+t.substr(1)).replace(/[^a-z0-9_]/gi,"_")+"Node"},t.prototype.visitTree=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.visitNode.apply(this,__spreadArray$w([t],__read$X(e),!1))},t.prototype.visitNode=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=this.nodeHandlers.get(t.kind)||this.visitDefault;return n.call.apply(n,__spreadArray$w([this,t],__read$X(e),!1))},t.prototype.visitDefault=function(t){for(var e,r,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(t instanceof Node_js_1.AbstractNode)try{for(var i=__values$Q(t.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;this.visitNode.apply(this,__spreadArray$w([s],__read$X(n),!1))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},t.prototype.setNodeHandler=function(t,e){this.nodeHandlers.set(t,e)},t.prototype.removeNodeHandler=function(t){this.nodeHandlers.delete(t)},t}();Visitor.AbstractVisitor=AbstractVisitor;var __extends$1M=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(MmlVisitor$3,"__esModule",{value:!0}),MmlVisitor$3.MmlVisitor=void 0;var MmlFactory_js_1=MmlFactory$1,Visitor_js_1=Visitor,MmlVisitor$2=function(t){function e(e){return void 0===e&&(e=null),e||(e=new MmlFactory_js_1.MmlFactory),t.call(this,e)||this}return __extends$1M(e,t),e.prototype.visitTextNode=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r]},e.prototype.visitXMLNode=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r]},e}(Visitor_js_1.AbstractVisitor);MmlVisitor$3.MmlVisitor=MmlVisitor$2,function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.SerializedMmlVisitor=t.toEntity=t.DATAMJX=void 0;var o=MmlVisitor$3,i=MmlNode,a=mi$2;t.DATAMJX="data-mjx-";t.toEntity=function(t){return"&#x"+t.codePointAt(0).toString(16).toUpperCase()+";"};var s=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return e(s,o),s.prototype.visitTree=function(t){return this.visitNode(t,"")},s.prototype.visitTextNode=function(t,e){return this.quoteHTML(t.getText())},s.prototype.visitXMLNode=function(t,e){return e+t.getSerializedXML()},s.prototype.visitInferredMrowNode=function(t,e){var n,o,i=[];try{for(var a=r(t.childNodes),s=a.next();!s.done;s=a.next()){var l=s.value;i.push(this.visitNode(l,e))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i.join("\n")},s.prototype.visitTeXAtomNode=function(t,e){var r=this.childNodeMml(t,e+" ","\n");return e+"<mrow"+this.getAttributes(t)+">"+(r.match(/\S/)?"\n"+r+e:"")+"</mrow>"},s.prototype.visitAnnotationNode=function(t,e){return e+"<annotation"+this.getAttributes(t)+">"+this.childNodeMml(t,"","")+"</annotation>"},s.prototype.visitDefault=function(t,e){var r=t.kind,o=n(t.isToken||0===t.childNodes.length?["",""]:["\n",e],2),i=o[0],a=o[1],s=this.childNodeMml(t,e+" ",i);return e+"<"+r+this.getAttributes(t)+">"+(s.match(/\S/)?i+s+a:"")+"</"+r+">"},s.prototype.childNodeMml=function(t,e,n){var o,i,a="";try{for(var s=r(t.childNodes),l=s.next();!l.done;l=s.next()){var c=l.value;a+=this.visitNode(c,e)+n}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a},s.prototype.getAttributes=function(t){var e,n,o=[],i=this.constructor.defaultAttributes[t.kind]||{},a=Object.assign({},i,this.getDataAttributes(t),t.attributes.getAllAttributes()),s=this.constructor.variants;a.hasOwnProperty("mathvariant")&&s.hasOwnProperty(a.mathvariant)&&(a.mathvariant=s[a.mathvariant]);try{for(var l=r(Object.keys(a)),c=l.next();!c.done;c=l.next()){var u=c.value,d=String(a[u]);void 0!==d&&o.push(u+'="'+this.quoteHTML(d)+'"')}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return o.length?" "+o.join(" "):""},s.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 o=t.getProperty("scriptalign");o&&this.setDataAttribute(e,"script-align",o);var s=t.getProperty("texClass");if(void 0!==s){var l=!0;if(s===i.TEXCLASS.OP&&t.isKind("mi")){var c=t.getText();l=!(c.length>1&&c.match(a.MmlMi.operatorName))}l&&this.setDataAttribute(e,"texclass",s<0?"NONE":i.TEXCLASSNAMES[s])}return t.getProperty("scriptlevel")&&!1===t.getProperty("useHeight")&&this.setDataAttribute(e,"smallmatrix","true"),e},s.prototype.setDataAttribute=function(e,r,n){e[t.DATAMJX+r]=n},s.prototype.quoteHTML=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/[\uD800-\uDBFF]./g,t.toEntity).replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g,t.toEntity)},s.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},s.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}},s}(o.MmlVisitor);t.SerializedMmlVisitor=s}(SerializedMmlVisitor),getDefaultExportFromCjs(SerializedMmlVisitor);var Options={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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.")},r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookup=t.separateOptions=t.selectOptionsFromKeys=t.selectOptions=t.userOptions=t.defaultOptions=t.insert=t.copy=t.keys=t.makeArray=t.expandable=t.Expandable=t.OPTIONS=t.REMOVE=t.APPEND=t.isObject=void 0;var o={}.constructor;function i(t){return"object"==typeof t&&null!==t&&(t.constructor===o||t.constructor===a)}t.isObject=i,t.APPEND="[+]",t.REMOVE="[-]",t.OPTIONS={invalidOption:"warn",optionError:function(e,r){if("fatal"===t.OPTIONS.invalidOption)throw new Error(e);console.warn("MathJax: "+e)}};var a=function(){};function s(t){return Object.assign(Object.create(a.prototype),t)}function l(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function c(t){var r,n,o={};try{for(var d=e(l(t)),p=d.next();!p.done;p=d.next()){var m=p.value,h=Object.getOwnPropertyDescriptor(t,m),f=h.value;Array.isArray(f)?h.value=u([],f,!1):i(f)&&(h.value=c(f)),h.enumerable&&(o[m]=h)}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}return Object.defineProperties(t.constructor===a?s({}):{},o)}function u(o,s,d){var p,m;void 0===d&&(d=!0);var h=function(e){if(d&&void 0===o[e]&&o.constructor!==a)return"symbol"==typeof e&&(e=e.toString()),t.OPTIONS.optionError('Invalid option "'.concat(e,'" (no default value).'),e),"continue";var p=s[e],m=o[e];if(!i(p)||null===m||"object"!=typeof m&&"function"!=typeof m)Array.isArray(p)?(o[e]=[],u(o[e],p,!1)):i(p)?o[e]=c(p):o[e]=p;else{var h=l(p);Array.isArray(m)&&(1===h.length&&(h[0]===t.APPEND||h[0]===t.REMOVE)&&Array.isArray(p[h[0]])||2===h.length&&h.sort().join(",")===t.APPEND+","+t.REMOVE&&Array.isArray(p[t.APPEND])&&Array.isArray(p[t.REMOVE]))?(p[t.REMOVE]&&(m=o[e]=m.filter((function(e){return p[t.REMOVE].indexOf(e)<0}))),p[t.APPEND]&&(o[e]=n(n([],r(m),!1),r(p[t.APPEND]),!1))):u(m,p,d)}};try{for(var f=e(l(s)),_=f.next();!_.done;_=f.next()){h(_.value)}}catch(t){p={error:t}}finally{try{_&&!_.done&&(m=f.return)&&m.call(f)}finally{if(p)throw p.error}}return o}function d(t){for(var r,n,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var a={};try{for(var s=e(o),l=s.next();!l.done;l=s.next()){var c=l.value;t.hasOwnProperty(c)&&(a[c]=t[c])}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return a}t.Expandable=a,t.expandable=s,t.makeArray=function(t){return Array.isArray(t)?t:[t]},t.keys=l,t.copy=c,t.insert=u,t.defaultOptions=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.forEach((function(e){return u(t,e,!1)})),t},t.userOptions=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.forEach((function(e){return u(t,e,!0)})),t},t.selectOptions=d,t.selectOptionsFromKeys=function(t,e){return d.apply(void 0,n([t],r(Object.keys(e)),!1))},t.separateOptions=function(t){for(var r,n,o,i,a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];var l=[];try{for(var c=e(a),u=c.next();!u.done;u=c.next()){var d=u.value,p={},m={};try{for(var h=(o=void 0,e(Object.keys(t||{}))),f=h.next();!f.done;f=h.next()){var _=f.value;(void 0===d[_]?m:p)[_]=t[_]}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}l.push(p),t=m}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return l.unshift(t),l},t.lookup=function(t,e,r){return void 0===r&&(r=null),e.hasOwnProperty(t)?e[t]:r}}(Options),getDefaultExportFromCjs(Options);var __extends$1L=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$e=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$e.apply(this,arguments)},__read$W=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$v=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$P=commonjsGlobal&&commonjsGlobal.__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(assistiveMml,"__esModule",{value:!0});var AssistiveMmlHandler_1=assistiveMml.AssistiveMmlHandler=assistiveMml.AssistiveMmlMathDocumentMixin=assistiveMml.AssistiveMmlMathItemMixin=assistiveMml.LimitedMmlVisitor=void 0,MathItem_js_1$7=MathItem,SerializedMmlVisitor_js_1$2=SerializedMmlVisitor,Options_js_1$i=Options,LimitedMmlVisitor=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1L(e,t),e.prototype.getAttributes=function(e){return t.prototype.getAttributes.call(this,e).replace(/ ?id=".*?"/,"")},e}(SerializedMmlVisitor_js_1$2.SerializedMmlVisitor);function AssistiveMmlMathItemMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1L(e,t),e.prototype.assistiveMml=function(t,e){if(void 0===e&&(e=!1),!(this.state()>=MathItem_js_1$7.STATE.ASSISTIVEMML)){if(!this.isEscaped&&(t.options.enableAssistiveMml||e)){var r=t.adaptor,n=t.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),o=r.firstChild(r.body(r.parse(n,"text/html"))),i=r.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[o]);r.setAttribute(r.firstChild(this.typesetRoot),"aria-hidden","true"),r.setStyle(this.typesetRoot,"position","relative"),r.append(this.typesetRoot,i)}this.state(MathItem_js_1$7.STATE.ASSISTIVEMML)}},e}(t)}function AssistiveMmlMathDocumentMixin(t){var e;return e=function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$v([],__read$W(e),!1))||this,o=n.constructor,i=o.ProcessBits;return i.has("assistive-mml")||i.allocate("assistive-mml"),n.visitor=new LimitedMmlVisitor(n.mmlFactory),n.options.MathItem=AssistiveMmlMathItemMixin(n.options.MathItem),"addStyles"in n&&n.addStyles(o.assistiveStyles),n}return __extends$1L(e,t),e.prototype.toMML=function(t){return this.visitor.visitTree(t)},e.prototype.assistiveMml=function(){var t,e;if(!this.processed.isSet("assistive-mml")){try{for(var r=__values$P(this.math),n=r.next();!n.done;n=r.next()){n.value.assistiveMml(this)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("assistive-mml")}return this},e.prototype.state=function(e,r){return void 0===r&&(r=!1),t.prototype.state.call(this,e,r),e<MathItem_js_1$7.STATE.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this},e}(t),e.OPTIONS=__assign$e(__assign$e({},t.OPTIONS),{enableAssistiveMml:!0,renderActions:(0,Options_js_1$i.expandable)(__assign$e(__assign$e({},t.OPTIONS.renderActions),{assistiveMml:[MathItem_js_1$7.STATE.ASSISTIVEMML]}))}),e.assistiveStyles={"mjx-assistive-mml":{position:"absolute !important",top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)",padding:"1px 0px 0px 0px !important",border:"0px !important",display:"block !important",width:"auto !important",overflow:"hidden !important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},'mjx-assistive-mml[display="block"]':{width:"100% !important"}},e}function AssistiveMmlHandler(t){return t.documentClass=AssistiveMmlMathDocumentMixin(t.documentClass),t}assistiveMml.LimitedMmlVisitor=LimitedMmlVisitor,(0,MathItem_js_1$7.newState)("ASSISTIVEMML",153),assistiveMml.AssistiveMmlMathItemMixin=AssistiveMmlMathItemMixin,assistiveMml.AssistiveMmlMathDocumentMixin=AssistiveMmlMathDocumentMixin,AssistiveMmlHandler_1=assistiveMml.AssistiveMmlHandler=AssistiveMmlHandler;var semanticEnrich={},sre={},system={},engine={},dynamic_cstr={};!function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultComparator=t.DynamicCstrParser=t.DynamicCstr=t.DynamicProperties=t.Axis=void 0,function(t){t.DOMAIN="domain",t.STYLE="style",t.LOCALE="locale",t.TOPIC="topic",t.MODALITY="modality"}(e=t.Axis||(t.Axis={}));class r{constructor(t,e=Object.keys(t)){this.properties=t,this.order=e}static createProp(...t){const e=n.DEFAULT_ORDER,o={};for(let r=0,n=t.length,i=e.length;r<n&&r<i;r++)o[e[r]]=t[r];return new r(o)}getProperties(){return this.properties}getOrder(){return this.order}getAxes(){return this.order}getProperty(t){return this.properties[t]}updateProperties(t){this.properties=t}allProperties(){const t=[];return this.order.forEach((e=>t.push(this.getProperty(e).slice()))),t}toString(){const t=[];return this.order.forEach((e=>t.push(e+": "+this.getProperty(e).toString()))),t.join("\n")}}t.DynamicProperties=r;class n extends r{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=n.DEFAULT_ORDER,r={};for(let n=0,o=t.length,i=e.length;n<o&&n<i;n++)r[e[n]]=t[n];return new n(r)}static defaultCstr(){return n.createCstr.apply(null,n.DEFAULT_ORDER.map((function(t){return n.DEFAULT_VALUES[t]})))}static validOrder(t){const e=n.DEFAULT_ORDER.slice();return t.every((t=>{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}}t.DynamicCstr=n,n.DEFAULT_ORDER=[e.LOCALE,e.MODALITY,e.DOMAIN,e.STYLE,e.TOPIC],n.BASE_LOCALE="base",n.DEFAULT_VALUE="default",n.DEFAULT_VALUES={[e.LOCALE]:"en",[e.DOMAIN]:n.DEFAULT_VALUE,[e.STYLE]:n.DEFAULT_VALUE,[e.TOPIC]:n.DEFAULT_VALUE,[e.MODALITY]:"speech"};t.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 o=0;for(let t,n=0;t=this.order[n],e.length;n++,o++){const n=e.shift();r[t]=n}return new n(r,this.order.slice(0,o))}};t.DefaultComparator=class{constructor(t,e=new r(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 r(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 a=this.fallback.getProperty(n),s=a.indexOf(o),l=a.indexOf(i);if(s<l)return-1;if(l<s)return 1}return 0}toString(){return this.reference.toString()+"\n"+this.fallback.toString()}}}(dynamic_cstr),getDefaultExportFromCjs(dynamic_cstr);var engine_const={},exports,Mode,personalityProps,Speech,Markup;exports=engine_const,Object.defineProperty(exports,"__esModule",{value:!0}),exports.DOMAIN_TO_STYLES=exports.Markup=exports.Speech=exports.personalityPropList=exports.personalityProps=exports.Mode=void 0,(Mode=exports.Mode||(exports.Mode={})).SYNC="sync",Mode.ASYNC="async",Mode.HTTP="http",function(t){t.PITCH="pitch",t.RATE="rate",t.VOLUME="volume",t.PAUSE="pause",t.JOIN="join",t.LAYOUT="layout"}(personalityProps=exports.personalityProps||(exports.personalityProps={})),exports.personalityPropList=[personalityProps.PITCH,personalityProps.RATE,personalityProps.VOLUME,personalityProps.PAUSE,personalityProps.JOIN],(Speech=exports.Speech||(exports.Speech={})).NONE="none",Speech.SHALLOW="shallow",Speech.DEEP="deep",(Markup=exports.Markup||(exports.Markup={})).NONE="none",Markup.LAYOUT="layout",Markup.PUNCTUATION="punctuation",Markup.SSML="ssml",Markup.SSML_STEP="ssml_step",Markup.ACSS="acss",Markup.SABLE="sable",Markup.VOICEXML="voicexml",exports.DOMAIN_TO_STYLES={mathspeak:"default",clearspeak:"default"},getDefaultExportFromCjs(engine_const);var _debugger={},system_external={},variables={};Object.defineProperty(variables,"__esModule",{value:!0}),variables.Variables=void 0;class Variables{static ensureLocale(t,e){return Variables.LOCALES.get(t)?t:(console.error(`Locale ${t} does not exist! Using ${Variables.LOCALES.get(e)} instead.`),e)}}variables.Variables=Variables,Variables.VERSION="4.0.6",Variables.LOCALES=new Map([["ca","Catalan"],["da","Danish"],["de","German"],["en","English"],["es","Spanish"],["fr","French"],["hi","Hindi"],["it","Italian"],["nb","Bokmål"],["nn","Nynorsk"],["sv","Swedish"],["nemeth","Nemeth"]]),Variables.mathjaxVersion="3.2.1",Variables.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+Variables.VERSION+"/lib/mathmaps",Variables.WGXpath="https://cdn.jsdelivr.net/npm/wicked-good-xpath@1.3.0/dist/wgxpath.install.js",Object.defineProperty(system_external,"__esModule",{value:!0});const variables_1$1=variables;class SystemExternal{static extRequire(library){if("undefined"!=typeof process&&void 0!==commonjsRequire){const nodeRequire=eval("require");return nodeRequire(library)}return null}}system_external.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$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$1.Variables.url,SystemExternal.jsonPath=(SystemExternal.documentSupported?SystemExternal.url:process.env.SRE_JSON_PATH||commonjsGlobal.SRE_JSON_PATH||("undefined"!=typeof __dirname?__dirname+"/mathmaps":process.cwd()))+"/",SystemExternal.WGXpath=variables_1$1.Variables.WGXpath,SystemExternal.wgxpath=null,Object.defineProperty(_debugger,"__esModule",{value:!0}),_debugger.Debugger=void 0;const system_external_1$4=system_external;class Debugger{constructor(){this.isActive_=!1,this.outputFunction_=console.info,this.fileHandle=Promise.resolve(),this.stream_=null}static getInstance(){return Debugger.instance=Debugger.instance||new Debugger,Debugger.instance}init(t){return t&&this.startDebugFile_(t),this.isActive_=!0,this.fileHandle}output(...t){this.isActive_&&this.output_(t)}generateOutput(t){this.isActive_&&this.output_(t.apply(t,[]))}exit(t=(()=>{})){this.fileHandle.then((()=>{this.isActive_&&this.stream_&&this.stream_.end("","",t)}))}startDebugFile_(t){this.fileHandle=system_external_1$4.default.fs.promises.open(t,"w"),this.fileHandle=this.fileHandle.then((e=>{this.stream_=e.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){console.info!==this.outputFunction_?this.fileHandle.then((()=>this.outputFunction_.apply(this.outputFunction_,["Speech Rule Engine Debugger:"].concat(t)))):this.outputFunction_.apply(console,["Speech Rule Engine Debugger:"].concat(t))}}_debugger.Debugger=Debugger,Object.defineProperty(engine,"__esModule",{value:!0}),engine.EnginePromise=engine.SREError=void 0;const Dcstr=dynamic_cstr,EngineConst$d=engine_const,debugger_1$7=_debugger,variables_1=variables;class SREError extends Error{constructor(t=""){super(),this.message=t,this.name="SRE Error"}}engine.SREError=SREError;class Engine{constructor(){this.customLoader=null,this.parsers={},this.comparator=null,this.mode=EngineConst$d.Mode.SYNC,this.init=!0,this.delay=!1,this.comparators={},this.domain="mathspeak",this.style=Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.STYLE],this._defaultLocale=Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.LOCALE],this.locale=this.defaultLocale,this.subiso="",this.modality=Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.MODALITY],this.speech=EngineConst$d.Speech.NONE,this.markup=EngineConst$d.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=Engine.defaultEvaluator,this.defaultParser=new Dcstr.DynamicCstrParser(Dcstr.DynamicCstr.DEFAULT_ORDER),this.parser=this.defaultParser,this.dynamicCstr=Dcstr.DynamicCstr.defaultCstr()}set defaultLocale(t){this._defaultLocale=variables_1.Variables.ensureLocale(t,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return Engine.instance=Engine.instance||new Engine,Engine.instance}static defaultEvaluator(t,e){return t}static evaluateNode(t){return Engine.nodeEvaluator(t)}getRate(){const t=parseInt(this.rate,10);return isNaN(t)?100:t}setDynamicCstr(t){if(this.defaultLocale&&(Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.LOCALE]=this.defaultLocale),t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(-1!==Dcstr.DynamicCstr.DEFAULT_ORDER.indexOf(n)){const e=t[n];this[n]=e}}}EngineConst$d.DOMAIN_TO_STYLES[this.domain]=this.style;const e=[this.locale,this.modality,this.domain,this.style].join("."),r=Dcstr.DynamicProperties.createProp([Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.LOCALE]],[Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.MODALITY]],[Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.DOMAIN]],[Dcstr.DynamicCstr.DEFAULT_VALUES[Dcstr.Axis.STYLE]]),n=this.comparators[this.domain],o=this.parsers[this.domain];this.parser=o||this.defaultParser,this.dynamicCstr=this.parser.parse(e),this.dynamicCstr.updateProperties(r.getProperties()),this.comparator=n?n():new Dcstr.DefaultComparator(this.dynamicCstr)}configurate(t){this.mode!==EngineConst$d.Mode.HTTP||this.config||(configBlocks(t),this.config=!0),configFeature(t)}setCustomLoader(t){t&&(this.customLoader=t)}}function configFeature(t){if("undefined"!=typeof SREfeature)for(const[e,r]of Object.entries(SREfeature))t[e]=r}function configBlocks(t){const e=document.documentElement.querySelectorAll('script[type="text/x-sre-config"]');for(let r=0,n=e.length;r<n;r++){let n;try{n=e[r].innerHTML;const o=JSON.parse(n);for(const e in o)t[e]=o[e]}catch(t){debugger_1$7.Debugger.getInstance().output("Illegal configuration ",n)}}}engine.default=Engine,Engine.BINARY_FEATURES=["strict","structure","pprint"],Engine.STRING_FEATURES=["markup","style","domain","speech","walker","defaultLocale","locale","delay","modality","rate","rules","subiso","prune"],Engine.nodeEvaluator=function(t){return[]};class EnginePromise{static get(t=Engine.getInstance().locale){return EnginePromise.promises[t]||Promise.resolve("")}static getall(){return Promise.all(Object.values(EnginePromise.promises))}}engine.EnginePromise=EnginePromise,EnginePromise.loaded={},EnginePromise.promises={};var engine_setup={},l10n={},grammar={},dom_util={},xpath_util={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.updateEvaluator=t.evaluateString=t.evaluateBoolean=t.getLeafNodes=t.evalXPath=t.resolveNameSpace=t.xpath=void 0;const e=engine,r=engine_const,n=system_external;function o(){return"undefined"!=typeof XPathResult}t.xpath={currentDocument:null,evaluate:o()?document.evaluate:n.default.xpath.evaluate,result:o()?XPathResult:n.default.xpath.XPathResult,createNSResolver:o()?document.createNSResolver:n.default.xpath.createNSResolver};const i={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 a(t){return i[t]||null}t.resolveNameSpace=a;class s{constructor(){this.lookupNamespaceURI=a}}function l(n,o,i){return e.default.getInstance().mode!==r.Mode.HTTP||e.default.getInstance().isIE||e.default.getInstance().isEdge?t.xpath.evaluate(n,o,new s,i,null):t.xpath.currentDocument.evaluate(n,o,a,i,null)}function c(e,r){let n;try{n=l(e,r,t.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}t.evalXPath=c,t.getLeafNodes=function(t){return c(".//*[count(*)=0]",t)},t.evaluateBoolean=function(e,r){let n;try{n=l(e,r,t.xpath.result.BOOLEAN_TYPE)}catch(t){return!1}return n.booleanValue},t.evaluateString=function(e,r){let n;try{n=l(e,r,t.xpath.result.STRING_TYPE)}catch(t){return""}return n.stringValue},t.updateEvaluator=function(n){if(e.default.getInstance().mode!==r.Mode.HTTP)return;let o=n;for(;o&&!o.evaluate;)o=o.parentNode;o&&o.evaluate?t.xpath.currentDocument=o:n.ownerDocument&&(t.xpath.currentDocument=n.ownerDocument)}}(xpath_util),getDefaultExportFromCjs(xpath_util),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeXml=t.cloneNode=t.tagName=t.querySelectorAll=t.querySelectorAllByAttrValue=t.querySelectorAllByAttr=t.formatXml=t.createTextNode=t.createElementNS=t.createElement=t.replaceNode=t.NodeType=t.parseInput=t.XML_ENTITIES=t.trimInput_=t.toArray=void 0;const e=engine,r=engine_const,n=system_external,o=xpath_util;function i(t){const e=[];for(let r=0,n=t.length;r<n;r++)e.push(t[r]);return e}function a(t){return(t=t.replace(/&nbsp;/g," ")).replace(/>[ \f\n\r\t\v\u200b]+</g,"><").trim()}var s;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,""]}t.toArray=i,t.trimInput_=a,t.XML_ENTITIES={"&lt;":!0,"&gt;":!0,"&amp;":!0,"&quot;":!0,"&apos;":!0},t.parseInput=function(t){const i=new n.default.xmldom.DOMParser,s=a(t),l=!!s.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!s)throw new Error("Empty input!");try{const t=i.parseFromString(s,l?"text/html":"text/xml");return e.default.getInstance().mode===r.Mode.HTTP?(o.xpath.currentDocument=t,l?t.body.childNodes[0]:t.documentElement):t.documentElement}catch(t){throw new e.SREError("Illegal input: "+t.message)}},(s=t.NodeType||(t.NodeType={}))[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s[s.NOTATION_NODE=12]="NOTATION_NODE",t.replaceNode=function(t,e){t.parentNode&&(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t))},t.createElement=function(t){return n.default.document.createElement(t)},t.createElementNS=function(t,e){return n.default.document.createElementNS(t,e)},t.createTextNode=function(t){return n.default.document.createTextNode(t)},t.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},t.querySelectorAllByAttr=function(t,e){return t.querySelectorAll?i(t.querySelectorAll(`[${e}]`)):o.evalXPath(`.//*[@${e}]`,t)},t.querySelectorAllByAttrValue=function(t,e,r){return t.querySelectorAll?i(t.querySelectorAll(`[${e}="${r}"]`)):o.evalXPath(`.//*[@${e}="${r}"]`,t)},t.querySelectorAll=function(t,e){return t.querySelectorAll?i(t.querySelectorAll(e)):o.evalXPath(`.//${e}`,t)},t.tagName=function(t){return t.tagName.toUpperCase()},t.cloneNode=function(t){return t.cloneNode(!0)},t.serializeXml=function(t){return(new n.default.xmldom.XMLSerializer).serializeToString(t)}}(dom_util),getDefaultExportFromCjs(dom_util);var locale_util={},locale$d={},messages={},transformers={};!function(t){function e(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(t,"__esModule",{value:!0}),t.vulgarFractionSmall=t.convertVulgarFraction=t.Combiners=t.siCombiner=t.identityTransformer=t.pluralCase=void 0,t.pluralCase=function(t,e){return t.toString()},t.identityTransformer=function(t){return t.toString()},t.siCombiner=function(t,e){return t+e.toLowerCase()},t.Combiners={},t.Combiners.identityCombiner=function(t,e,r){return t+e+r},t.Combiners.prefixCombiner=function(t,e,r){return t=r?r+" "+t:t,e?e+" "+t:t},t.Combiners.postfixCombiner=function(t,e,r){return t=r?r+" "+t:t,e?t+" "+e:t},t.Combiners.romanceCombiner=function(t,e,r){return t=r?t+" "+r:t,e?t+" "+e:t},t.convertVulgarFraction=e,t.vulgarFractionSmall=function(t,r,n){const o=e(t);if(o.convertible){const t=o.enumerator,e=o.denominator;return t>0&&t<r&&e>0&&e<n}return!1}}(transformers),getDefaultExportFromCjs(transformers),Object.defineProperty(messages,"__esModule",{value:!0}),messages.SUBISO=messages.FUNCTIONS=messages.ALPHABETS=messages.NUMBERS=messages.MESSAGES=void 0;const tr$5=transformers;function MESSAGES(){return{MS:{},MSroots:{},font:{},embellish:{},role:{},enclose:{},navigate:{},regexp:{},unitTimes:""}}function NUMBERS$b(){return{zero:"zero",ones:[],tens:[],large:[],special:{},wordOrdinal:tr$5.identityTransformer,numericOrdinal:tr$5.identityTransformer,numberToWords:tr$5.identityTransformer,numberToOrdinal:tr$5.pluralCase,vulgarSep:" ",numSep:" "}}function ALPHABETS(){return{latinSmall:[],latinCap:[],greekSmall:[],greekCap:[],capPrefix:{default:""},smallPrefix:{default:""},digitPrefix:{default:""},languagePrefix:{},digitTrans:{default:tr$5.identityTransformer,mathspeak:tr$5.identityTransformer,clearspeak:tr$5.identityTransformer},letterTrans:{default:tr$5.identityTransformer},combiner:(t,e,r)=>t}}function FUNCTIONS(){return{fracNestDepth:t=>tr$5.vulgarFractionSmall(t,10,100),radicalNestDepth:t=>"",combineRootIndex:function(t,e){return t},combineNestedFraction:tr$5.Combiners.identityCombiner,combineNestedRadical:tr$5.Combiners.identityCombiner,fontRegexp:function(t){return new RegExp("^"+t.split(/ |-/).join("( |-)")+"( |-)")},si:tr$5.siCombiner,plural:tr$5.identityTransformer}}function SUBISO(){return{default:"",current:"",all:[]}}messages.MESSAGES=MESSAGES,messages.NUMBERS=NUMBERS$b,messages.ALPHABETS=ALPHABETS,messages.FUNCTIONS=FUNCTIONS,messages.SUBISO=SUBISO,Object.defineProperty(locale$d,"__esModule",{value:!0}),locale$d.createLocale=locale$d.LOCALE=void 0;const messages_1$b=messages;function createLocale(){return{FUNCTIONS:(0,messages_1$b.FUNCTIONS)(),MESSAGES:(0,messages_1$b.MESSAGES)(),ALPHABETS:(0,messages_1$b.ALPHABETS)(),NUMBERS:(0,messages_1$b.NUMBERS)(),COMBINERS:{},CORRECTIONS:{},SUBISO:(0,messages_1$b.SUBISO)()}}locale$d.LOCALE=createLocale(),locale$d.createLocale=createLocale,Object.defineProperty(locale_util,"__esModule",{value:!0}),locale_util.localeFontCombiner=locale_util.extractString=locale_util.localEnclose=locale_util.localRole=locale_util.localFont=locale_util.combinePostfixIndex=locale_util.nestingToString=void 0;const locale_1$h=locale$d,transformers_1$7=transformers;function nestingToString(t){switch(t){case 1:return locale_1$h.LOCALE.MESSAGES.MS.ONCE||"";case 2:return locale_1$h.LOCALE.MESSAGES.MS.TWICE;default:return t.toString()}}function combinePostfixIndex(t,e){return t===locale_1$h.LOCALE.MESSAGES.MS.ROOTINDEX||t===locale_1$h.LOCALE.MESSAGES.MS.INDEX?t:t+" "+e}function localFont(t){return extractString(locale_1$h.LOCALE.MESSAGES.font[t],t)}function localRole(t){return extractString(locale_1$h.LOCALE.MESSAGES.role[t],t)}function localEnclose(t){return extractString(locale_1$h.LOCALE.MESSAGES.enclose[t],t)}function extractString(t,e){return void 0===t?e:"string"==typeof t?t:t[0]}function localeFontCombiner(t){return"string"==typeof t?{font:t,combiner:locale_1$h.LOCALE.ALPHABETS.combiner}:{font:t[0],combiner:locale_1$h.LOCALE.COMBINERS[t[1]]||transformers_1$7.Combiners[t[1]]||locale_1$h.LOCALE.ALPHABETS.combiner}}locale_util.nestingToString=nestingToString,locale_util.combinePostfixIndex=combinePostfixIndex,locale_util.localFont=localFont,locale_util.localRole=localRole,locale_util.localEnclose=localEnclose,locale_util.extractString=extractString,locale_util.localeFontCombiner=localeFontCombiner,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.numbersToAlpha=t.Grammar=t.ATTRIBUTE=void 0;const e=dom_util,r=engine,n=locale_util,o=locale$d;t.ATTRIBUTE="grammar";class i{constructor(){this.currentFlags={},this.parameters_={},this.corrections_={},this.preprocessors_={},this.stateStack_=[]}static getInstance(){return i.instance=i.instance||new i,i.instance}static parseInput(t){const e={},r=t.split(":");for(let t=0,n=r.length;t<n;t++){const n=r[t].split("="),o=n[0].trim();n[1]?e[o]=n[1].trim():o.match(/^!/)?e[o.slice(1)]=!1:e[o]=!0}return e}static parseState(t){const e={},r=t.split(" ");for(let t=0,n=r.length;t<n;t++){const n=r[t].split(":"),o=n[0],i=n[1];e[o]=i||!0}return e}static translateString_(t){if(t.match(/:unit$/))return i.translateUnit_(t);const e=r.default.getInstance();let n=e.evaluator(t,e.dynamicCstr);return n=null===n?t:n,i.getInstance().getParameter("plural")&&(n=o.LOCALE.FUNCTIONS.plural(n)),n}static translateUnit_(t){t=i.prepareUnit_(t);const e=r.default.getInstance(),n=i.getInstance().getParameter("plural"),a=e.strict,s=`${e.locale}.${e.modality}.default`;let l,c;return e.strict=!0,n&&(l=e.defaultParser.parse(s+".plural"),c=e.evaluator(t,l)),c?(e.strict=a,c):(l=e.defaultParser.parse(s+".default"),c=e.evaluator(t,l),e.strict=a,c?(n&&(c=o.LOCALE.FUNCTIONS.plural(c)),c):i.cleanUnit_(t))}static prepareUnit_(t){const e=t.match(/:unit$/);return e?t.slice(0,e.index).replace(/\s+/g," ")+t.slice(e.index):t}static cleanUnit_(t){return t.match(/:unit$/)?t.replace(/:unit$/,""):t}clear(){this.parameters_={},this.stateStack_=[]}setParameter(t,e){const r=this.parameters_[t];return e?this.parameters_[t]=e:delete this.parameters_[t],r}getParameter(t){return this.parameters_[t]}setCorrection(t,e){this.corrections_[t]=e}setPreprocessor(t,e){this.preprocessors_[t]=e}getCorrection(t){return this.corrections_[t]}getState(){const t=[];for(const e in this.parameters_){const r=this.parameters_[e];t.push("string"==typeof r?e+":"+r:e)}return t.join(" ")}pushState(t){for(const e in t)t[e]=this.setParameter(e,t[e]);this.stateStack_.push(t)}popState(){const t=this.stateStack_.pop();for(const e in t)this.setParameter(e,t[e])}setAttribute(r){if(r&&r.nodeType===e.NodeType.ELEMENT_NODE){const e=this.getState();e&&r.setAttribute(t.ATTRIBUTE,e)}}preprocess(t){return this.runProcessors_(t,this.preprocessors_)}correct(t){return this.runProcessors_(t,this.corrections_)}apply(t,e){return this.currentFlags=e||{},t=this.currentFlags.adjust||this.currentFlags.preprocess?i.getInstance().preprocess(t):t,(this.parameters_.translate||this.currentFlags.translate)&&(t=i.translateString_(t)),t=this.currentFlags.adjust||this.currentFlags.correct?i.getInstance().correct(t):t,this.currentFlags={},t}runProcessors_(t,e){for(const r in this.parameters_){const n=e[r];if(!n)continue;const o=this.parameters_[r];t=!0===o?n(t):n(t,o)}return t}}function a(t,e){if(!e||!t)return t;const r=o.LOCALE.FUNCTIONS.fontRegexp(n.localFont(e));return t.replace(r,"")}function s(t){return t.match(/\d+/)?o.LOCALE.NUMBERS.numberToWords(parseInt(t,10)):t}t.Grammar=i,t.numbersToAlpha=s,i.getInstance().setCorrection("localFont",n.localFont),i.getInstance().setCorrection("localRole",n.localRole),i.getInstance().setCorrection("localEnclose",n.localEnclose),i.getInstance().setCorrection("ignoreFont",a),i.getInstance().setPreprocessor("annotation",(function(t,e){return t+":"+e})),i.getInstance().setPreprocessor("noTranslateText",(function(t){return t.match(new RegExp("^["+o.LOCALE.MESSAGES.regexp.TEXT+"]+$"))&&(i.getInstance().currentFlags.translate=!1),t})),i.getInstance().setCorrection("ignoreCaps",(function(t){let e=o.LOCALE.ALPHABETS.capPrefix[r.default.getInstance().domain];return void 0===e&&(e=o.LOCALE.ALPHABETS.capPrefix.default),a(t,e)})),i.getInstance().setPreprocessor("numbers2alpha",s)}(grammar),getDefaultExportFromCjs(grammar);var locale_ca={},numbers_ca={};Object.defineProperty(numbers_ca,"__esModule",{value:!0});const grammar_1$b=grammar,messages_1$a=messages;function tensToWords_$1(t){const e=t%100;if(e<20)return NUMBERS$a.ones[e];const r=Math.floor(e/10),n=NUMBERS$a.tens[r],o=NUMBERS$a.ones[e%10];return n&&o?n+(2===r?"-i-":"-")+o:n||o}function hundredsToWords_$8(t){const e=t%1e3,r=Math.floor(e/100),n=r?1===r?"cent":NUMBERS$a.ones[r]+"-cents":"",o=tensToWords_$1(e%100);return n&&o?n+NUMBERS$a.numSep+o:n||o}function numberToWords$a(t){if(0===t)return NUMBERS$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=NUMBERS$a.large[e];if(e)if(1===e)r=(1===n?"":hundredsToWords_$8(n)+NUMBERS$a.numSep)+t+(r?NUMBERS$a.numSep+r:"");else{const e=numberToWords$a(n);t=1===n?t:t.replace(/\u00f3$/,"ons"),r=e+NUMBERS$a.numSep+t+(r?NUMBERS$a.numSep+r:"")}else r=hundredsToWords_$8(n)}t=Math.floor(t/(e>1?1e6:1e3)),e++}return r}function numberToOrdinal$9(t,e){if(t>1999)return numericOrdinal$9(t);if(t<=10)return NUMBERS$a.special.onesOrdinals[t-1];const r=numberToWords$a(t);return r.match(/mil$/)?r.replace(/mil$/,"mil·lèsima"):r.match(/u$/)?r.replace(/u$/,"vena"):r.match(/a$/)?r.replace(/a$/,"ena"):r+(r.match(/e$/)?"na":"ena")}function numericOrdinal$9(t){const e=grammar_1$b.Grammar.getInstance().getParameter("gender");return t.toString()+("f"===e?"a":"n")}const NUMBERS$a=(0,messages_1$a.NUMBERS)();NUMBERS$a.numericOrdinal=numericOrdinal$9,NUMBERS$a.numberToWords=numberToWords$a,NUMBERS$a.numberToOrdinal=numberToOrdinal$9,numbers_ca.default=NUMBERS$a,Object.defineProperty(locale_ca,"__esModule",{value:!0}),locale_ca.ca=void 0;const locale_1$g=locale$d,locale_util_1$a=locale_util,numbers_ca_1=numbers_ca,transformers_1$6=transformers,sansserifCombiner$1=function(t,e,r){return t="sans serif "+(r?r+" "+t:t),e?t+" "+e:t};let locale$c=null;function ca(){return locale$c||(locale$c=create$b()),locale$c}function create$b(){const t=(0,locale_1$g.createLocale)();return t.NUMBERS=numbers_ca_1.default,t.COMBINERS.sansserif=sansserifCombiner$1,t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.combineRootIndex=locale_util_1$a.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":/.*ça$/.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ües":/.*a$/.test(t)?t.slice(0,-1)+"es":/.*(e|i)$/.test(t)?t+"ns":/.*í$/.test(t)?t.slice(0,-1)+"ins":t+"s",t.FUNCTIONS.si=(t,e)=>(e.match(/^metre/)&&(t=t.replace(/a$/,"à").replace(/o$/,"ò").replace(/i$/,"í")),t+e),t.ALPHABETS.combiner=transformers_1$6.Combiners.prefixCombiner,t}locale_ca.ca=ca;var locale_da={},numbers_da={};Object.defineProperty(numbers_da,"__esModule",{value:!0});const messages_1$9=messages;function onePrefix_$2(t,e=!1){return t===NUMBERS$9.ones[1]?e?"et":"en":t}function hundredsToWords_$7(t,e=!1){let r=t%1e3,n="",o=NUMBERS$9.ones[Math.floor(r/100)];if(n+=o?onePrefix_$2(o,!0)+" hundrede":"",r%=100,r)if(n+=n?" og ":"",o=e?NUMBERS$9.special.smallOrdinals[r]:NUMBERS$9.ones[r],o)n+=o;else{const t=e?NUMBERS$9.special.tensOrdinals[Math.floor(r/10)]:NUMBERS$9.tens[Math.floor(r/10)];o=NUMBERS$9.ones[r%10],n+=o?onePrefix_$2(o)+"og"+t:t}return n}function numberToWords$9(t,e=!1){if(0===t)return NUMBERS$9.zero;if(t>=Math.pow(10,36))return t.toString();let r=0,n="";for(;t>0;){const o=t%1e3;if(o){const t=hundredsToWords_$7(o,e&&!r);if(r){const e=NUMBERS$9.large[r],i=o>1?"er":"";n=onePrefix_$2(t,r<=1)+" "+e+i+(n?" og ":"")+n}else n=onePrefix_$2(t)+n}t=Math.floor(t/1e3),r++}return n}function numberToOrdinal$8(t,e){return 1===t?e?"hel":"hele":2===t?e?"halv":"halve":wordOrdinal$7(t)+(e?"dele":"del")}function wordOrdinal$7(t){if(t%100)return numberToWords$9(t,!0);const e=numberToWords$9(t);return e.match(/e$/)?e:e+"e"}function numericOrdinal$8(t){return t.toString()+"."}const NUMBERS$9=(0,messages_1$9.NUMBERS)();NUMBERS$9.wordOrdinal=wordOrdinal$7,NUMBERS$9.numericOrdinal=numericOrdinal$8,NUMBERS$9.numberToWords=numberToWords$9,NUMBERS$9.numberToOrdinal=numberToOrdinal$8,numbers_da.default=NUMBERS$9,Object.defineProperty(locale_da,"__esModule",{value:!0}),locale_da.da=void 0;const locale_1$f=locale$d,locale_util_1$9=locale_util,numbers_da_1=numbers_da,tr$4=transformers;let locale$b=null;function da(){return locale$b||(locale$b=create$a()),locale$b}function create$a(){const t=(0,locale_1$f.createLocale)();return t.NUMBERS=numbers_da_1.default,t.FUNCTIONS.radicalNestDepth=locale_util_1$9.nestingToString,t.FUNCTIONS.fontRegexp=e=>e===t.ALPHABETS.capPrefix.default?RegExp("^"+e+" "):RegExp(" "+e+"$"),t.ALPHABETS.combiner=tr$4.Combiners.postfixCombiner,t.ALPHABETS.digitTrans.default=numbers_da_1.default.numberToWords,t}locale_da.da=da;var locale_de={},numbers_de={};Object.defineProperty(numbers_de,"__esModule",{value:!0});const messages_1$8=messages;function onePrefix_$1(t,e=!1){return t===NUMBERS$8.ones[1]?e?"eine":"ein":t}function hundredsToWords_$6(t){let e=t%1e3,r="",n=NUMBERS$8.ones[Math.floor(e/100)];if(r+=n?onePrefix_$1(n)+"hundert":"",e%=100,e)if(r+=r?NUMBERS$8.numSep:"",n=NUMBERS$8.ones[e],n)r+=n;else{const t=NUMBERS$8.tens[Math.floor(e/10)];n=NUMBERS$8.ones[e%10],r+=n?onePrefix_$1(n)+"und"+t:t}return r}function numberToWords$8(t){if(0===t)return NUMBERS$8.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;t>0;){const n=t%1e3;if(n){const o=hundredsToWords_$6(t%1e3);if(e){const t=NUMBERS$8.large[e],i=e>1&&n>1?t.match(/e$/)?"n":"en":"";r=onePrefix_$1(o,e>1)+t+i+r}else r=onePrefix_$1(o,e>1)+r}t=Math.floor(t/1e3),e++}return r.replace(/ein$/,"eins")}function numberToOrdinal$7(t,e){return 1===t?"eintel":2===t?e?"halbe":"halb":wordOrdinal$6(t)+"l"}function wordOrdinal$6(t){if(1===t)return"erste";if(3===t)return"dritte";if(7===t)return"siebte";if(8===t)return"achte";return numberToWords$8(t)+(t<19?"te":"ste")}function numericOrdinal$7(t){return t.toString()+"."}const NUMBERS$8=(0,messages_1$8.NUMBERS)();NUMBERS$8.wordOrdinal=wordOrdinal$6,NUMBERS$8.numericOrdinal=numericOrdinal$7,NUMBERS$8.numberToWords=numberToWords$8,NUMBERS$8.numberToOrdinal=numberToOrdinal$7,numbers_de.default=NUMBERS$8,Object.defineProperty(locale_de,"__esModule",{value:!0}),locale_de.de=void 0;const grammar_1$a=grammar,locale_util_1$8=locale_util,locale_1$e=locale$d,numbers_de_1=numbers_de,germanPrefixCombiner=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},germanPostfixCombiner=function(t,e,r){return t=r&&"s"!==r?r+" "+t:t,e?t+" "+e:t};let locale$a=null;function de(){return locale$a||(locale$a=create$9()),locale$a}function create$9(){const t=(0,locale_1$e.createLocale)();return t.NUMBERS=numbers_de_1.default,t.COMBINERS.germanPostfix=germanPostfixCombiner,t.ALPHABETS.combiner=germanPrefixCombiner,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,locale_util_1$8.localFont)(t).split(" ").map((function(t){return t.replace(/s$/,"")})).join(" "),t.CORRECTIONS.lowercase=t=>t.toLowerCase(),t.CORRECTIONS.article=t=>{const e=grammar_1$a.Grammar.getInstance().getParameter("case"),r=grammar_1$a.Grammar.getInstance().getParameter("plural");return"dative"===e?{der:"dem",die:r?"den":"der",das:"dem"}[t]:t},t.CORRECTIONS.masculine=t=>"dative"===grammar_1$a.Grammar.getInstance().getParameter("case")?t+"n":t,t}locale_de.de=de;var locale_en={},numbers_en={};Object.defineProperty(numbers_en,"__esModule",{value:!0});const messages_1$7=messages;function hundredsToWords_$5(t){let e=t%1e3,r="";return r+=NUMBERS$7.ones[Math.floor(e/100)]?NUMBERS$7.ones[Math.floor(e/100)]+NUMBERS$7.numSep+"hundred":"",e%=100,e&&(r+=r?NUMBERS$7.numSep:"",r+=NUMBERS$7.ones[e]||NUMBERS$7.tens[Math.floor(e/10)]+(e%10?NUMBERS$7.numSep+NUMBERS$7.ones[e%10]:"")),r}function numberToWords$7(t){if(0===t)return NUMBERS$7.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;t>0;){t%1e3&&(r=hundredsToWords_$5(t%1e3)+(e?"-"+NUMBERS$7.large[e]+"-":"")+r),t=Math.floor(t/1e3),e++}return r.replace(/-$/,"")}function numberToOrdinal$6(t,e){if(1===t)return e?"oneths":"oneth";if(2===t)return e?"halves":"half";const r=wordOrdinal$5(t);return e?r+"s":r}function wordOrdinal$5(t){let e=numberToWords$7(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}function numericOrdinal$6(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"}}const NUMBERS$7=(0,messages_1$7.NUMBERS)();NUMBERS$7.wordOrdinal=wordOrdinal$5,NUMBERS$7.numericOrdinal=numericOrdinal$6,NUMBERS$7.numberToWords=numberToWords$7,NUMBERS$7.numberToOrdinal=numberToOrdinal$6,numbers_en.default=NUMBERS$7,Object.defineProperty(locale_en,"__esModule",{value:!0}),locale_en.en=void 0;const grammar_1$9=grammar,locale_1$d=locale$d,locale_util_1$7=locale_util,numbers_en_1=numbers_en,tr$3=transformers;let locale$9=null;function en(){return locale$9||(locale$9=create$8()),locale$9}function create$8(){const t=(0,locale_1$d.createLocale)();return t.NUMBERS=numbers_en_1.default,t.FUNCTIONS.radicalNestDepth=locale_util_1$7.nestingToString,t.FUNCTIONS.plural=t=>/.*s$/.test(t)?t:t+"s",t.ALPHABETS.combiner=tr$3.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=numbers_en_1.default.numberToWords,t.CORRECTIONS.article=t=>grammar_1$9.Grammar.getInstance().getParameter("noArticle")?"":t,t}locale_en.en=en;var locale_es={},numbers_es={};Object.defineProperty(numbers_es,"__esModule",{value:!0});const grammar_1$8=grammar,messages_1$6=messages;function tensToWords_(t){const e=t%100;if(e<30)return NUMBERS$6.ones[e];const r=NUMBERS$6.tens[Math.floor(e/10)],n=NUMBERS$6.ones[e%10];return r&&n?r+" y "+n:r||n}function hundredsToWords_$4(t){const e=t%1e3,r=Math.floor(e/100),n=NUMBERS$6.special.hundreds[r],o=tensToWords_(e%100);return 1===r?o?n+"to "+o:n:n&&o?n+" "+o:n||o}function numberToWords$6(t){if(0===t)return NUMBERS$6.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=NUMBERS$6.large[e];const o=hundredsToWords_$4(n);e?1===n?(t=t.match("/^mil( |$)/")?t:"un "+t,r=t+(r?" "+r:"")):(t=t.replace(/\u00f3n$/,"ones"),r=hundredsToWords_$4(n)+" "+t+(r?" "+r:"")):r=o}t=Math.floor(t/1e3),e++}return r}function numberToOrdinal$5(t,e){if(t>1999)return t.toString()+"a";if(t<=12)return NUMBERS$6.special.onesOrdinals[t-1];const r=[];if(t>=1e3&&(t-=1e3,r.push("milésima")),!t)return r.join(" ");let n=0;return n=Math.floor(t/100),n>0&&(r.push(NUMBERS$6.special.hundredsOrdinals[n-1]),t%=100),t<=12?r.push(NUMBERS$6.special.onesOrdinals[t-1]):(n=Math.floor(t/10),n>0&&(r.push(NUMBERS$6.special.tensOrdinals[n-1]),t%=10),t>0&&r.push(NUMBERS$6.special.onesOrdinals[t-1])),r.join(" ")}function numericOrdinal$5(t){const e=grammar_1$8.Grammar.getInstance().getParameter("gender");return t.toString()+("f"===e?"a":"o")}const NUMBERS$6=(0,messages_1$6.NUMBERS)();NUMBERS$6.numericOrdinal=numericOrdinal$5,NUMBERS$6.numberToWords=numberToWords$6,NUMBERS$6.numberToOrdinal=numberToOrdinal$5,numbers_es.default=NUMBERS$6,Object.defineProperty(locale_es,"__esModule",{value:!0}),locale_es.es=void 0;const locale_1$c=locale$d,locale_util_1$6=locale_util,numbers_es_1=numbers_es,transformers_1$5=transformers,sansserifCombiner=function(t,e,r){return t="sans serif "+(r?r+" "+t:t),e?t+" "+e:t};let locale$8=null;function es(){return locale$8||(locale$8=create$7()),locale$8}function create$7(){const t=(0,locale_1$c.createLocale)();return t.NUMBERS=numbers_es_1.default,t.COMBINERS.sansserif=sansserifCombiner,t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.combineRootIndex=locale_util_1$6.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$/,"á").replace(/o$/,"ó").replace(/i$/,"í")),t+e),t.ALPHABETS.combiner=transformers_1$5.Combiners.prefixCombiner,t}locale_es.es=es;var locale_fr={},numbers_fr={};Object.defineProperty(numbers_fr,"__esModule",{value:!0});const engine_1$f=engine,grammar_1$7=grammar,messages_1$5=messages;function hundredsToWords_$3(t){let e=t%1e3,r="";if(r+=NUMBERS$5.ones[Math.floor(e/100)]?NUMBERS$5.ones[Math.floor(e/100)]+"-cent":"",e%=100,e){r+=r?"-":"";let t=NUMBERS$5.ones[e];if(t)r+=t;else{const n=NUMBERS$5.tens[Math.floor(e/10)];n.match(/-dix$/)?(t=NUMBERS$5.ones[e%10+10],r+=n.replace(/-dix$/,"")+"-"+t):r+=n+(e%10?"-"+NUMBERS$5.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 numberToWords$5(t){if(0===t)return NUMBERS$5.zero;if(t>=Math.pow(10,36))return t.toString();NUMBERS$5.special["tens-"+engine_1$f.default.getInstance().subiso]&&(NUMBERS$5.tens=NUMBERS$5.special["tens-"+engine_1$f.default.getInstance().subiso]);let e=0,r="";for(;t>0;){const n=t%1e3;if(n){let t=NUMBERS$5.large[e];const o=hundredsToWords_$3(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 SMALL_ORDINAL={1:"unième",2:"demi",3:"tiers",4:"quart"};function numberToOrdinal$4(t,e){const r=SMALL_ORDINAL[t]||wordOrdinal$4(t);return 3===t?r:e?r+"s":r}function wordOrdinal$4(t){if(1===t)return"première";let e=numberToWords$5(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ème",e}function numericOrdinal$4(t){const e=grammar_1$7.Grammar.getInstance().getParameter("gender");return 1===t?t.toString()+("m"===e?"er":"re"):t.toString()+"e"}const NUMBERS$5=(0,messages_1$5.NUMBERS)();NUMBERS$5.wordOrdinal=wordOrdinal$4,NUMBERS$5.numericOrdinal=numericOrdinal$4,NUMBERS$5.numberToWords=numberToWords$5,NUMBERS$5.numberToOrdinal=numberToOrdinal$4,numbers_fr.default=NUMBERS$5,Object.defineProperty(locale_fr,"__esModule",{value:!0}),locale_fr.fr=void 0;const grammar_1$6=grammar,locale_1$b=locale$d,locale_util_1$5=locale_util,numbers_fr_1=numbers_fr,transformers_1$4=transformers;let locale$7=null;function fr(){return locale$7||(locale$7=create$6()),locale$7}function create$6(){const t=(0,locale_1$b.createLocale)();return t.NUMBERS=numbers_fr_1.default,t.FUNCTIONS.radicalNestDepth=locale_util_1$5.nestingToString,t.FUNCTIONS.combineRootIndex=locale_util_1$5.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=>grammar_1$6.Grammar.getInstance().getParameter("noArticle")?"":t,t.ALPHABETS.combiner=transformers_1$4.Combiners.romanceCombiner,t.SUBISO={default:"fr",current:"fr",all:["fr","be","ch"]},t}locale_fr.fr=fr;var locale_hi={},numbers_hi={};Object.defineProperty(numbers_hi,"__esModule",{value:!0});const grammar_1$5=grammar,messages_1$4=messages;function hundredsToWords_$2(t){let e=t%1e3,r="";return r+=NUMBERS$4.ones[Math.floor(e/100)]?NUMBERS$4.ones[Math.floor(e/100)]+NUMBERS$4.numSep+NUMBERS$4.special.hundred:"",e%=100,e&&(r+=r?NUMBERS$4.numSep:"",r+=NUMBERS$4.ones[e]),r}function numberToWords$4(t){if(0===t)return NUMBERS$4.zero;if(t>=Math.pow(10,32))return t.toString();let e=0,r="";const n=hundredsToWords_$2(t%1e3);if(!(t=Math.floor(t/1e3)))return n;for(;t>0;){const n=t%100;n&&(r=NUMBERS$4.ones[n]+NUMBERS$4.numSep+NUMBERS$4.large[e]+(r?NUMBERS$4.numSep+r:"")),t=Math.floor(t/100),e++}return n?r+NUMBERS$4.numSep+n:r}function numberToOrdinal$3(t,e){return t<=10?NUMBERS$4.special.smallDenominators[t]:wordOrdinal$3(t)+" अंश"}function wordOrdinal$3(t){const e=grammar_1$5.Grammar.getInstance().getParameter("gender");if(t<=0)return t.toString();if(t<10)return"f"===e?NUMBERS$4.special.ordinalsFeminine[t]:NUMBERS$4.special.ordinalsMasculine[t];return numberToWords$4(t)+("f"===e?"वीं":"वाँ")}function numericOrdinal$3(t){const e=grammar_1$5.Grammar.getInstance().getParameter("gender");if(t>0&&t<10)return"f"===e?NUMBERS$4.special.simpleSmallOrdinalsFeminine[t]:NUMBERS$4.special.simpleSmallOrdinalsMasculine[t];return t.toString().split("").map((function(t){const e=parseInt(t,10);return isNaN(e)?"":NUMBERS$4.special.simpleNumbers[e]})).join("")+("f"===e?"वीं":"वाँ")}const NUMBERS$4=(0,messages_1$4.NUMBERS)();NUMBERS$4.wordOrdinal=wordOrdinal$3,NUMBERS$4.numericOrdinal=numericOrdinal$3,NUMBERS$4.numberToWords=numberToWords$4,NUMBERS$4.numberToOrdinal=numberToOrdinal$3,numbers_hi.default=NUMBERS$4,Object.defineProperty(locale_hi,"__esModule",{value:!0}),locale_hi.hi=void 0;const locale_1$a=locale$d,numbers_hi_1=numbers_hi,transformers_1$3=transformers,locale_util_1$4=locale_util;let locale$6=null;function hi(){return locale$6||(locale$6=create$5()),locale$6}function create$5(){const t=(0,locale_1$a.createLocale)();return t.NUMBERS=numbers_hi_1.default,t.ALPHABETS.combiner=transformers_1$3.Combiners.prefixCombiner,t.FUNCTIONS.radicalNestDepth=locale_util_1$4.nestingToString,t}locale_hi.hi=hi;var locale_it={},numbers_it={};Object.defineProperty(numbers_it,"__esModule",{value:!0});const grammar_1$4=grammar,messages_1$3=messages;function hundredsToWords_$1(t){let e=t%1e3,r="";if(r+=NUMBERS$3.ones[Math.floor(e/100)]?NUMBERS$3.ones[Math.floor(e/100)]+NUMBERS$3.numSep+"cento":"",e%=100,e){r+=r?NUMBERS$3.numSep:"";const t=NUMBERS$3.ones[e];if(t)r+=t;else{let t=NUMBERS$3.tens[Math.floor(e/10)];const n=e%10;1!==n&&8!==n||(t=t.slice(0,-1)),r+=t,r+=n?NUMBERS$3.numSep+NUMBERS$3.ones[e%10]:""}}return r}function numberToWords$3(t){if(0===t)return NUMBERS$3.zero;if(t>=Math.pow(10,36))return t.toString();if(1===t&&grammar_1$4.Grammar.getInstance().getParameter("fraction"))return"un";let e=0,r="";for(;t>0;){t%1e3&&(r=hundredsToWords_$1(t%1e3)+(e?"-"+NUMBERS$3.large[e]+"-":"")+r),t=Math.floor(t/1e3),e++}return r.replace(/-$/,"")}function numberToOrdinal$2(t,e){if(2===t)return e?"mezzi":"mezzo";const r=wordOrdinal$2(t);if(!e)return r;const n=r.match(/o$/)?"i":"e";return r.slice(0,-1)+n}function wordOrdinal$2(t){const e="m"===grammar_1$4.Grammar.getInstance().getParameter("gender")?"o":"a";let r=NUMBERS$3.special.onesOrdinals[t];return r?r.slice(0,-1)+e:(r=numberToWords$3(t),r.slice(0,-1)+"esim"+e)}function numericOrdinal$2(t){const e=grammar_1$4.Grammar.getInstance().getParameter("gender");return t.toString()+("m"===e?"o":"a")}const NUMBERS$3=(0,messages_1$3.NUMBERS)();NUMBERS$3.wordOrdinal=wordOrdinal$2,NUMBERS$3.numericOrdinal=numericOrdinal$2,NUMBERS$3.numberToWords=numberToWords$3,NUMBERS$3.numberToOrdinal=numberToOrdinal$2,numbers_it.default=NUMBERS$3,Object.defineProperty(locale_it,"__esModule",{value:!0}),locale_it.it=void 0;const locale_util_1$3=locale_util,locale_1$9=locale$d,numbers_it_1=numbers_it,transformers_1$2=transformers,italianPostfixCombiner=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 locale$5=null;function it(){return locale$5||(locale$5=create$4()),locale$5}function create$4(){const t=(0,locale_1$9.createLocale)();return t.NUMBERS=numbers_it_1.default,t.COMBINERS.italianPostfix=italianPostfixCombiner,t.FUNCTIONS.radicalNestDepth=locale_util_1$3.nestingToString,t.FUNCTIONS.combineRootIndex=locale_util_1$3.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=transformers_1$2.Combiners.romanceCombiner,t}locale_it.it=it;var locale_nb={},numbers_nn={};Object.defineProperty(numbers_nn,"__esModule",{value:!0});const engine_1$e=engine,messages_1$2=messages;function hundredsToWordsRo_(t,e=!1){let r=t%1e3,n="";const o=Math.floor(r/100),i=NUMBERS$2.ones[o];if(n+=i?(1===o?"":i)+"hundre":"",r%=100,r){if(n+=n?"og":"",e){const t=NUMBERS$2.special.smallOrdinals[r];if(t)return n+t;if(r%10)return n+NUMBERS$2.tens[Math.floor(r/10)]+NUMBERS$2.special.smallOrdinals[r%10]}n+=NUMBERS$2.ones[r]||NUMBERS$2.tens[Math.floor(r/10)]+(r%10?NUMBERS$2.ones[r%10]:"")}return e?replaceOrdinal(n):n}function numberToWordsRo(t,e=!1){if(0===t)return e?NUMBERS$2.special.smallOrdinals[0]:NUMBERS$2.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=hundredsToWordsRo_(t%1e3,!r&&e);!r&&e&&(e=!e),n=i+(r?" "+NUMBERS$2.large[r]+(r>1&&o>1?"er":"")+(n?" ":""):"")+n}t=Math.floor(t/1e3),r++}return e?n+(n.match(/tusen$/)?"de":"te"):n}function numberToOrdinal$1(t,e){return wordOrdinal$1(t)}function replaceOrdinal(t){const e=NUMBERS$2.special.endOrdinal[0];return"a"===e&&t.match(/en$/)?t.slice(0,-2)+NUMBERS$2.special.endOrdinal:t.match(/(d|n)$/)||t.match(/hundre$/)?t+"de":t.match(/i$/)?t+NUMBERS$2.special.endOrdinal:"a"===e&&t.match(/e$/)?t.slice(0,-1)+NUMBERS$2.special.endOrdinal:(t.match(/e$/),t+"nde")}function wordOrdinal$1(t){return numberToWords$2(t,!0)}function numericOrdinal$1(t){return t.toString()+"."}const NUMBERS$2=(0,messages_1$2.NUMBERS)();function onePrefix_(t,e=!1){return t===NUMBERS$2.ones[1]?"ein"===t?"eitt ":e?"et":"ett":t}function hundredsToWordsGe_(t,e=!1){let r=t%1e3,n="",o=NUMBERS$2.ones[Math.floor(r/100)];if(n+=o?onePrefix_(o)+"hundre":"",r%=100,r){if(n+=n?"og":"",e){const t=NUMBERS$2.special.smallOrdinals[r];if(t)return n+t}if(o=NUMBERS$2.ones[r],o)n+=o;else{const t=NUMBERS$2.tens[Math.floor(r/10)];o=NUMBERS$2.ones[r%10],n+=o?o+"og"+t:t}}return e?replaceOrdinal(n):n}function numberToWordsGe(t,e=!1){if(0===t)return e?NUMBERS$2.special.smallOrdinals[0]:NUMBERS$2.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=hundredsToWordsGe_(t%1e3,!r&&e);!r&&e&&(e=!e),n=(1===r?onePrefix_(i,!0):i)+(r>1?NUMBERS$2.numSep:"")+(r?NUMBERS$2.large[r]+(r>1&&o>1?"er":""):"")+(r>1&&n?NUMBERS$2.numSep:"")+n}t=Math.floor(t/1e3),r++}return e?n+(n.match(/tusen$/)?"de":"te"):n}function numberToWords$2(t,e=!1){return"alt"===engine_1$e.default.getInstance().subiso?numberToWordsGe(t,e):numberToWordsRo(t,e)}NUMBERS$2.wordOrdinal=wordOrdinal$1,NUMBERS$2.numericOrdinal=numericOrdinal$1,NUMBERS$2.numberToWords=numberToWords$2,NUMBERS$2.numberToOrdinal=numberToOrdinal$1,numbers_nn.default=NUMBERS$2,Object.defineProperty(locale_nb,"__esModule",{value:!0}),locale_nb.nb=void 0;const locale_1$8=locale$d,locale_util_1$2=locale_util,numbers_nn_1$1=numbers_nn,tr$2=transformers;let locale$4=null;function nb(){return locale$4||(locale$4=create$3()),locale$4}function create$3(){const t=(0,locale_1$8.createLocale)();return t.NUMBERS=numbers_nn_1$1.default,t.ALPHABETS.combiner=tr$2.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=numbers_nn_1$1.default.numberToWords,t.FUNCTIONS.radicalNestDepth=locale_util_1$2.nestingToString,t}locale_nb.nb=nb;var locale_nemeth={},numbers_nemeth={};Object.defineProperty(numbers_nemeth,"__esModule",{value:!0});const messages_1$1=messages;function numberToWords$1(t){return t.toString().split("").map((function(t){return NUMBERS$1.ones[parseInt(t,10)]})).join("")}const NUMBERS$1=(0,messages_1$1.NUMBERS)();NUMBERS$1.numberToWords=numberToWords$1,NUMBERS$1.numberToOrdinal=numberToWords$1,numbers_nemeth.default=NUMBERS$1,Object.defineProperty(locale_nemeth,"__esModule",{value:!0}),locale_nemeth.nemeth=void 0;const locale_1$7=locale$d,numbers_nemeth_1=numbers_nemeth,transformers_1$1=transformers,simpleEnglish=function(t){return t.match(RegExp("^"+locale$3.ALPHABETS.languagePrefix.english))?t.slice(1):t},postfixCombiner=function(t,e,r){return t=simpleEnglish(t),e?t+e:t},germanCombiner=function(t,e,r){return e+simpleEnglish(t)},embellishCombiner=function(t,e,r){return e+(r||"")+(t=simpleEnglish(t))+"⠻"},doubleEmbellishCombiner=function(t,e,r){return e+(r||"")+(t=simpleEnglish(t))+"⠻⠻"},parensCombiner=function(t,e,r){return e+(t=simpleEnglish(t))+"⠾"};let locale$3=null;function nemeth(){return locale$3||(locale$3=create$2()),locale$3}function create$2(){const t=(0,locale_1$7.createLocale)();return t.NUMBERS=numbers_nemeth_1.default,t.COMBINERS={postfixCombiner:postfixCombiner,germanCombiner:germanCombiner,embellishCombiner:embellishCombiner,doubleEmbellishCombiner:doubleEmbellishCombiner,parensCombiner:parensCombiner},t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t),t.FUNCTIONS.si=transformers_1$1.identityTransformer,t.ALPHABETS.combiner=(t,e,r)=>e?e+r+t:simpleEnglish(t),t.ALPHABETS.digitTrans={default:numbers_nemeth_1.default.numberToWords},t}locale_nemeth.nemeth=nemeth;var locale_nn={};Object.defineProperty(locale_nn,"__esModule",{value:!0}),locale_nn.nn=void 0;const locale_1$6=locale$d,locale_util_1$1=locale_util,numbers_nn_1=numbers_nn,tr$1=transformers;let locale$2=null;function nn(){return locale$2||(locale$2=create$1()),locale$2}function create$1(){const t=(0,locale_1$6.createLocale)();return t.NUMBERS=numbers_nn_1.default,t.ALPHABETS.combiner=tr$1.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=numbers_nn_1.default.numberToWords,t.FUNCTIONS.radicalNestDepth=locale_util_1$1.nestingToString,t.SUBISO={default:"",current:"",all:["","alt"]},t}locale_nn.nn=nn;var locale_sv={},numbers_sv={};Object.defineProperty(numbers_sv,"__esModule",{value:!0});const messages_1=messages;function hundredsToWords_(t){let e=t%1e3,r="";const n=Math.floor(e/100);return r+=NUMBERS.ones[n]?(1===n?"":NUMBERS.ones[n]+NUMBERS.numSep)+"hundra":"",e%=100,e&&(r+=r?NUMBERS.numSep:"",r+=NUMBERS.ones[e]||NUMBERS.tens[Math.floor(e/10)]+(e%10?NUMBERS.numSep+NUMBERS.ones[e%10]:"")),r}function numberToWords(t,e=!1){if(0===t)return NUMBERS.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=NUMBERS.large[r],a=o>1&&r>1&&!e?"er":"";n=(1===r&&1===o?"":(r>1&&1===o?"en":hundredsToWords_(t%1e3))+(r>1?" ":""))+(r?i+a+(r>1?" ":""):"")+n}t=Math.floor(t/1e3),r++}return n.replace(/ $/,"")}function numberToOrdinal(t,e){if(1===t)return"hel";if(2===t)return e?"halva":"halv";let r=wordOrdinal(t);return r=r.match(/de$/)?r.replace(/de$/,""):r,r+(e?"delar":"del")}function wordOrdinal(t){let e=numberToWords(t,!0);return e.match(/^noll$/)?e="nollte":e.match(/ett$/)?e=e.replace(/ett$/,"första"):e.match(/två$/)?e=e.replace(/två$/,"andra"):e.match(/tre$/)?e=e.replace(/tre$/,"tredje"):e.match(/fyra$/)?e=e.replace(/fyra$/,"fjärde"):e.match(/fem$/)?e=e.replace(/fem$/,"femte"):e.match(/sex$/)?e=e.replace(/sex$/,"sjätte"):e.match(/sju$/)?e=e.replace(/sju$/,"sjunde"):e.match(/åtta$/)?e=e.replace(/åtta$/,"åttonde"):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}function numericOrdinal(t){const e=t.toString();return e.match(/11$|12$/)?e+":e":e+(e.match(/1$|2$/)?":a":":e")}const NUMBERS=(0,messages_1.NUMBERS)();NUMBERS.wordOrdinal=wordOrdinal,NUMBERS.numericOrdinal=numericOrdinal,NUMBERS.numberToWords=numberToWords,NUMBERS.numberToOrdinal=numberToOrdinal,numbers_sv.default=NUMBERS,Object.defineProperty(locale_sv,"__esModule",{value:!0}),locale_sv.sv=void 0;const locale_1$5=locale$d,locale_util_1=locale_util,numbers_sv_1=numbers_sv,tr=transformers;let locale$1=null;function sv(){return locale$1||(locale$1=create()),locale$1}function create(){const t=(0,locale_1$5.createLocale)();return t.NUMBERS=numbers_sv_1.default,t.FUNCTIONS.radicalNestDepth=locale_util_1.nestingToString,t.FUNCTIONS.fontRegexp=function(t){return new RegExp("((^"+t+" )|( "+t+"$))")},t.ALPHABETS.combiner=tr.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=numbers_sv_1.default.numberToWords,t.CORRECTIONS.correctOne=t=>t.replace(/^ett$/,"en"),t}locale_sv.sv=sv,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.completeLocale=t.getLocale=t.setLocale=t.locales=void 0;const e=engine,r=variables,n=grammar,o=locale_ca,i=locale_da,a=locale_de,s=locale_en,l=locale_es,c=locale_fr,u=locale_hi,d=locale_it,p=locale_nb,m=locale_nemeth,h=locale_nn,f=locale_sv,_=locale$d;function g(){const n=r.Variables.ensureLocale(e.default.getInstance().locale,e.default.getInstance().defaultLocale);return e.default.getInstance().locale=n,t.locales[n]()}t.locales={ca:o.ca,da:i.da,de:a.de,en:s.en,es:l.es,fr:c.fr,hi:u.hi,it:d.it,nb:p.nb,nn:h.nn,sv:f.sv,nemeth:m.nemeth},t.setLocale=function(){const t=g();if(function(t){const r=e.default.getInstance().subiso;-1===t.SUBISO.all.indexOf(r)&&(e.default.getInstance().subiso=t.SUBISO.default);t.SUBISO.current=e.default.getInstance().subiso}(t),t){for(const e of Object.getOwnPropertyNames(t))_.LOCALE[e]=t[e];for(const[e,r]of Object.entries(t.CORRECTIONS))n.Grammar.getInstance().setCorrection(e,r)}},t.getLocale=g,t.completeLocale=function(e){const r=t.locales[e.locale];if(!r)return void console.error("Locale "+e.locale+" does not exist!");const n=e.kind.toUpperCase(),o=e.messages;if(!o)return;const i=r();for(const[t,e]of Object.entries(o))i[n][t]=e}}(l10n),getDefaultExportFromCjs(l10n);var math_map={},browser_util={};Object.defineProperty(browser_util,"__esModule",{value:!0}),browser_util.loadScript=browser_util.loadMapsForIE_=browser_util.installWGXpath_=browser_util.loadWGXpath_=browser_util.mapsForIE=browser_util.detectEdge=browser_util.detectIE=void 0;const system_external_1$3=system_external,xpath_util_1$1=xpath_util;function detectIE(){return"undefined"!=typeof window&&"ActiveXObject"in window&&"clipboardData"in window&&(loadMapsForIE_(),loadWGXpath_(),!0)}function detectEdge(){var t;return"undefined"!=typeof window&&"MSGestureEvent"in window&&null===(null===(t=window.chrome)||void 0===t?void 0:t.loadTimes)&&(document.evaluate=null,loadWGXpath_(!0),!0)}function loadWGXpath_(t){loadScript(system_external_1$3.default.WGXpath),installWGXpath_(t)}function installWGXpath_(t,e){let r=e||1;"undefined"==typeof wgxpath&&r<10?setTimeout((function(){installWGXpath_(t,r++)}),200):r>=10||(system_external_1$3.default.wgxpath=wgxpath,t?system_external_1$3.default.wgxpath.install({document:document}):system_external_1$3.default.wgxpath.install(),xpath_util_1$1.xpath.evaluate=document.evaluate,xpath_util_1$1.xpath.result=XPathResult,xpath_util_1$1.xpath.createNSResolver=document.createNSResolver)}function loadMapsForIE_(){loadScript(system_external_1$3.default.mathmapsIePath)}function loadScript(t){const e=system_external_1$3.default.document.createElement("script");e.type="text/javascript",e.src=t,system_external_1$3.default.document.head?system_external_1$3.default.document.head.appendChild(e):system_external_1$3.default.document.body.appendChild(e)}browser_util.detectIE=detectIE,browser_util.detectEdge=detectEdge,browser_util.mapsForIE=null,browser_util.loadWGXpath_=loadWGXpath_,browser_util.installWGXpath_=installWGXpath_,browser_util.loadMapsForIE_=loadMapsForIE_,browser_util.loadScript=loadScript;var file_util={};Object.defineProperty(file_util,"__esModule",{value:!0}),file_util.localePath=file_util.makePath=void 0;const system_external_1$2=system_external;function makePath(t){return t.match("/$")?t:t+"/"}function localePath(t,e="json"){return makePath(system_external_1$2.default.jsonPath)+t+(e.match(/^\./)?e:"."+e)}file_util.makePath=makePath,file_util.localePath=localePath;var math_compound_store={},math_simple_store={};Object.defineProperty(math_simple_store,"__esModule",{value:!0}),math_simple_store.MathSimpleStore=void 0;const engine_1$d=engine,dynamic_cstr_1$8=dynamic_cstr;class MathSimpleStore{constructor(){this.category="",this.rules=new Map}static parseUnicode(t){const e=parseInt(t,16);return String.fromCodePoint(e)}static testDynamicConstraints_(t,e){return engine_1$d.default.getInstance().strict?e.cstr.equal(t):engine_1$d.default.getInstance().comparator.match(e.cstr)}defineRulesFromMappings(t,e,r,n,o){for(const i in o)for(const a in o[i]){const s=o[i][a];this.defineRuleFromStrings(t,e,r,i,a,n,s)}}getRules(t){let e=this.rules.get(t);return e||(e=[],this.rules.set(t,e)),e}defineRuleFromStrings(t,e,r,n,o,i,a){let s=this.getRules(e);const l=engine_1$d.default.getInstance().parsers[n]||engine_1$d.default.getInstance().defaultParser,c=engine_1$d.default.getInstance().comparators[n],u=`${e}.${r}.${n}.${o}`,d=l.parse(u),p=c?c():engine_1$d.default.getInstance().comparator,m=p.getReference();p.setReference(d);const h={cstr:d,action:a};s=s.filter((t=>!d.equal(t.cstr))),s.push(h),this.rules.set(e,s),p.setReference(m)}lookupRule(t,e){let r=this.getRules(e.getValue(dynamic_cstr_1$8.Axis.LOCALE));return r=r.filter((function(t){return MathSimpleStore.testDynamicConstraints_(e,t)})),1===r.length?r[0]:r.length?r.sort(((t,e)=>engine_1$d.default.getInstance().comparator.compare(t.cstr,e.cstr)))[0]:null}}math_simple_store.MathSimpleStore=MathSimpleStore,Object.defineProperty(math_compound_store,"__esModule",{value:!0}),math_compound_store.enumerate=math_compound_store.lookupString=math_compound_store.lookupCategory=math_compound_store.lookupRule=math_compound_store.addSiUnitRules=math_compound_store.addUnitRules=math_compound_store.addFunctionRules=math_compound_store.addSymbolRules=math_compound_store.defineRule=math_compound_store.defineRules=math_compound_store.setSiPrefixes=void 0;const debugger_1$6=_debugger,engine_1$c=engine,l10n_1$1=l10n,math_simple_store_1=math_simple_store,dynamic_cstr_1$7=dynamic_cstr;let locale=dynamic_cstr_1$7.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$7.Axis.LOCALE],modality=dynamic_cstr_1$7.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$7.Axis.MODALITY],siPrefixes={};function setSiPrefixes(t){siPrefixes=t}math_compound_store.setSiPrefixes=setSiPrefixes;const subStores_={};function defineRules(t,e,r,n){const o=getSubStore_(e);setupStore_(o,r),o.defineRulesFromMappings(t,locale,modality,e,n)}function defineRule(t,e,r,n,o,i){const a=getSubStore_(o);setupStore_(a,n),a.defineRuleFromStrings(t,locale,modality,e,r,o,i)}function addSymbolRules(t){if(changeLocale_(t))return;const e=math_simple_store_1.MathSimpleStore.parseUnicode(t.key);defineRules(t.key,e,t.category,t.mappings)}function addFunctionRules(t){if(changeLocale_(t))return;const e=t.names,r=t.mappings,n=t.category;for(let t,o=0;t=e[o];o++)defineRules(t,t,n,r)}function addUnitRules(t){changeLocale_(t)||(t.si?addSiUnitRules(t):addUnitRules_(t))}function addSiUnitRules(t){for(const e of Object.keys(siPrefixes)){const r=Object.assign({},t);r.mappings={};const n=siPrefixes[e];r.key=e+r.key,r.names=r.names.map((function(t){return e+t}));for(const e of Object.keys(t.mappings)){r.mappings[e]={};for(const o of Object.keys(t.mappings[e]))r.mappings[e][o]=l10n_1$1.locales[locale]().FUNCTIONS.si(n,t.mappings[e][o])}addUnitRules_(r)}addUnitRules_(t)}function lookupRule(t,e){const r=subStores_[t];return r?r.lookupRule(null,e):null}function lookupCategory(t){const e=subStores_[t];return e?e.category:""}function lookupString(t,e){const r=lookupRule(t,e);return r?r.action:null}function enumerate(t={}){for(const e of Object.values(subStores_))for(const[,r]of e.rules.entries())for(const{cstr:e}of r)t=enumerate_(e.getValues(),t);return t}function enumerate_(t,e){return e=e||{},t.length?(e[t[0]]=enumerate_(t.slice(1),e[t[0]]),e):e}function addUnitRules_(t){const e=t.names;e&&(t.names=e.map((function(t){return t+":unit"}))),addFunctionRules(t)}function changeLocale_(t){return!(!t.locale&&!t.modality)&&(locale=t.locale||locale,modality=t.modality||modality,!0)}function getSubStore_(t){let e=subStores_[t];return e?(debugger_1$6.Debugger.getInstance().output("Store exists! "+t),e):(e=new math_simple_store_1.MathSimpleStore,subStores_[t]=e,e)}function setupStore_(t,e){e&&(t.category=e)}math_compound_store.defineRules=defineRules,math_compound_store.defineRule=defineRule,math_compound_store.addSymbolRules=addSymbolRules,math_compound_store.addFunctionRules=addFunctionRules,math_compound_store.addUnitRules=addUnitRules,math_compound_store.addSiUnitRules=addSiUnitRules,math_compound_store.lookupRule=lookupRule,math_compound_store.lookupCategory=lookupCategory,math_compound_store.lookupString=lookupString,engine_1$c.default.getInstance().evaluator=lookupString,math_compound_store.enumerate=enumerate;var speech_rule_engine={},auditory_description={},span={};Object.defineProperty(span,"__esModule",{value:!0}),span.Span=void 0;class Span{constructor(t,e){this.speech=t,this.attributes=e}}span.Span=Span,Object.defineProperty(auditory_description,"__esModule",{value:!0}),auditory_description.AuditoryDescription=void 0;const grammar_1$3=grammar,span_1$3=span;class AuditoryDescription{constructor({context:t,text:e,userValue:r,annotation:n,attributes:o,personality:i,layout:a}){this.context=t||"",this.text=e||"",this.userValue=r||"",this.annotation=n||"",this.attributes=o||{},this.personality=i||{},this.layout=a||""}static create(t,e={}){return t.text=grammar_1$3.Grammar.getInstance().apply(t.text,e),new AuditoryDescription(t)}isEmpty(){return 0===this.context.length&&0===this.text.length&&0===this.userValue.length&&0===this.annotation.length}clone(){let t,e;if(this.personality){t={};for(const e in this.personality)t[e]=this.personality[e]}if(this.attributes){e={};for(const t in this.attributes)e[t]=this.attributes[t]}return new AuditoryDescription({context:this.context,text:this.text,userValue:this.userValue,annotation:this.annotation,personality:t,attributes:e,layout:this.layout})}toString(){return'AuditoryDescription(context="'+this.context+'" text="'+this.text+'" userValue="'+this.userValue+'" annotation="'+this.annotation+'")'}descriptionString(){return this.context&&this.text?this.context+" "+this.text:this.context||this.text}descriptionSpan(){return new span_1$3.Span(this.descriptionString(),this.attributes)}equals(t){return this.context===t.context&&this.text===t.text&&this.userValue===t.userValue&&this.annotation===t.annotation}}auditory_description.AuditoryDescription=AuditoryDescription;var speech_rules={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getStore=t.addStore=t.funcStore=void 0;const e=dynamic_cstr;t.funcStore=new Map,t.addStore=function(e,r,n){const o={};if(r){const e=t.funcStore.get(r)||{};Object.assign(o,e)}t.funcStore.set(e,Object.assign(o,n))},t.getStore=function(r,n,o){return t.funcStore.get([r,n,o].join("."))||t.funcStore.get([e.DynamicCstr.DEFAULT_VALUES[e.Axis.LOCALE],n,o].join("."))||t.funcStore.get([e.DynamicCstr.BASE_LOCALE,n,o].join("."))||{}}}(speech_rules),getDefaultExportFromCjs(speech_rules);var speech_rule_stores={},clearspeak_rules={},store_util={};Object.defineProperty(store_util,"__esModule",{value:!0}),store_util.contentIterator=store_util.pauseSeparator=store_util.nodeCounter=void 0;const auditory_description_1$4=auditory_description,XpathUtil$9=xpath_util,engine_1$b=engine;function nodeCounter(t,e){const r=t.length;let n=0,o=e;return e||(o=""),function(){return n<r&&(n+=1),o+" "+n}}function pauseSeparator(t,e){const r=parseFloat(e),n=isNaN(r)?e:r;return function(){return[auditory_description_1$4.AuditoryDescription.create({text:"",personality:{pause:n}})]}}function contentIterator(t,e){let r;return r=t.length>0?XpathUtil$9.evalXPath("../../content/*",t[0]):[],function(){const t=r.shift(),n=e?[auditory_description_1$4.AuditoryDescription.create({text:e},{translate:!0})]:[];if(!t)return n;const o=engine_1$b.default.evaluateNode(t);return n.concat(o)}}store_util.nodeCounter=nodeCounter,store_util.pauseSeparator=pauseSeparator,store_util.contentIterator=contentIterator;var clearspeak_util={},semantic_annotations={},semantic_annotator={};Object.defineProperty(semantic_annotator,"__esModule",{value:!0}),semantic_annotator.SemanticVisitor=semantic_annotator.SemanticAnnotator=void 0;class SemanticAnnotator{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))}}semantic_annotator.SemanticAnnotator=SemanticAnnotator;class SemanticVisitor{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}}semantic_annotator.SemanticVisitor=SemanticVisitor,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.annotate=t.activate=t.register=t.visitors=t.annotators=void 0;const e=semantic_annotator;t.annotators=new Map,t.visitors=new Map,t.register=function(r){const n=r.domain+":"+r.name;r instanceof e.SemanticAnnotator?t.annotators.set(n,r):t.visitors.set(n,r)},t.activate=function(e,r){const n=e+":"+r,o=t.annotators.get(n)||t.visitors.get(n);o&&(o.active=!0)},t.annotate=function(e){for(const r of t.annotators.values())r.active&&r.annotate(e);for(const r of t.visitors.values())r.active&&r.visit(e,Object.assign({},r.def))}}(semantic_annotations),getDefaultExportFromCjs(semantic_annotations);var semantic_attr={};Object.defineProperty(semantic_attr,"__esModule",{value:!0}),semantic_attr.lookupSecondary=semantic_attr.isEmbellishedType=semantic_attr.isMatchingFence=semantic_attr.functionApplication=semantic_attr.invisibleComma=semantic_attr.invisiblePlus=semantic_attr.invisibleTimes=semantic_attr.lookupMeaning=semantic_attr.lookupRole=semantic_attr.lookupType=semantic_attr.equal=semantic_attr.allLettersRegExp=void 0;const generalPunctuations=["!",'"',"#","%","&",";","?","@","\\","¡","§","¶","¿","‗","†","‡","•","‣","․","‥","‧","‰","‱","‸","※","‼","‽","‾","⁁","⁂","⁃","⁇","⁈","⁉","⁋","⁌","⁍","⁎","⁏","⁐","⁑","⁓","⁕","⁖","⁘","⁙","⁚","⁛","⁜","⁝","⁞","︐","︔","︕","︖","︰","﹅","﹆","﹉","﹊","﹋","﹌","﹔","﹖","﹗","﹟","﹠","﹡","﹨","﹪","﹫","!",""","#","%","&","'","*","/",";","?","@","\"],colons=["︓",":",":","﹕"],invisibleComma_=String.fromCodePoint(8291),commas=[",","﹐",",",invisibleComma_],ellipses=["…","⋮","⋯","⋰","⋱","︙"],fullStops=[".","﹒","."],dashes=["¯","‒","–","—","―","﹘","-","⁻","₋","−","➖","﹣","-","‐","‑","‾","_"],tildes=["~","̃","∼","˜","∽","˷","̴","̰"],primes=["'","′","″","‴","‵","‶","‷","⁗","ʹ","ʺ"],degrees=["°"],openClosePairs={"(":")","[":"]","{":"}","⁅":"⁆","〈":"〉","❨":"❩","❪":"❫","❬":"❭","❮":"❯","❰":"❱","❲":"❳","❴":"❵","⟅":"⟆","⟦":"⟧","⟨":"⟩","⟪":"⟫","⟬":"⟭","⟮":"⟯","⦃":"⦄","⦅":"⦆","⦇":"⦈","⦉":"⦊","⦋":"⦌","⦍":"⦎","⦏":"⦐","⦑":"⦒","⦓":"⦔","⦕":"⦖","⦗":"⦘","⧘":"⧙","⧚":"⧛","⧼":"⧽","⸢":"⸣","⸤":"⸥","⸦":"⸧","⸨":"⸩","〈":"〉","《":"》","「":"」","『":"』","【":"】","〔":"〕","〖":"〗","〘":"〙","〚":"〛","〝":"〞","﴾":"﴿","︗":"︘","﹙":"﹚","﹛":"﹜","﹝":"﹞","(":")","[":"]","{":"}","⦅":"⦆","「":"」","⌈":"⌉","⌊":"⌋","⌌":"⌍","⌎":"⌏","⌜":"⌝","⌞":"⌟","⎛":"⎞","⎜":"⎟","⎝":"⎠","⎡":"⎤","⎢":"⎥","⎣":"⎦","⎧":"⎫","⎨":"⎬","⎩":"⎭","⎰":"⎱","⎸":"⎹"},topBottomPairs={"⎴":"⎵","⏜":"⏝","⏞":"⏟","⏠":"⏡","︵":"︶","︷":"︸","︹":"︺","︻":"︼","︽":"︾","︿":"﹀","﹁":"﹂","﹃":"﹄","﹇":"﹈"},leftFences=Object.keys(openClosePairs),rightFences=Object.values(openClosePairs);rightFences.push("〟");const topFences=Object.keys(topBottomPairs),bottomFences=Object.values(topBottomPairs),neutralFences=["|","¦","∣","⏐","⎸","⎹","❘","|","¦","︱","︲"],metricFences=["‖","∥","⦀","⫴"],capitalLatin=["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"],smallLatin=["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","ı","ȷ"],capitalLatinFullWidth=["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"],smallLatinFullWidth=["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"],capitalLatinBold=["𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙"],smallLatinBold=["𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳"],capitalLatinItalic=["𝐴","𝐵","𝐶","𝐷","𝐸","𝐹","𝐺","𝐻","𝐼","𝐽","𝐾","𝐿","𝑀","𝑁","𝑂","𝑃","𝑄","𝑅","𝑆","𝑇","𝑈","𝑉","𝑊","𝑋","𝑌","𝑍"],smallLatinItalic=["𝑎","𝑏","𝑐","𝑑","𝑒","𝑓","𝑔","ℎ","𝑖","𝑗","𝑘","𝑙","𝑚","𝑛","𝑜","𝑝","𝑞","𝑟","𝑠","𝑡","𝑢","𝑣","𝑤","𝑥","𝑦","𝑧","𝚤","𝚥"],capitalLatinBoldItalic=["𝑨","𝑩","𝑪","𝑫","𝑬","𝑭","𝑮","𝑯","𝑰","𝑱","𝑲","𝑳","𝑴","𝑵","𝑶","𝑷","𝑸","𝑹","𝑺","𝑻","𝑼","𝑽","𝑾","𝑿","𝒀","𝒁"],smallLatinBoldItalic=["𝒂","𝒃","𝒄","𝒅","𝒆","𝒇","𝒈","𝒉","𝒊","𝒋","𝒌","𝒍","𝒎","𝒏","𝒐","𝒑","𝒒","𝒓","𝒔","𝒕","𝒖","𝒗","𝒘","𝒙","𝒚","𝒛"],capitalLatinScript=["𝒜","ℬ","𝒞","𝒟","ℰ","ℱ","𝒢","ℋ","ℐ","𝒥","𝒦","ℒ","ℳ","𝒩","𝒪","𝒫","𝒬","ℛ","𝒮","𝒯","𝒰","𝒱","𝒲","𝒳","𝒴","𝒵","℘"],smallLatinScript=["𝒶","𝒷","𝒸","𝒹","ℯ","𝒻","ℊ","𝒽","𝒾","𝒿","𝓀","𝓁","𝓂","𝓃","ℴ","𝓅","𝓆","𝓇","𝓈","𝓉","𝓊","𝓋","𝓌","𝓍","𝓎","𝓏","ℓ"],capitalLatinBoldScript=["𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩"],smallLatinBoldScript=["𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"],capitalLatinFraktur=["𝔄","𝔅","ℭ","𝔇","𝔈","𝔉","𝔊","ℌ","ℑ","𝔍","𝔎","𝔏","𝔐","𝔑","𝔒","𝔓","𝔔","ℜ","𝔖","𝔗","𝔘","𝔙","𝔚","𝔛","𝔜","ℨ"],smallLatinFraktur=["𝔞","𝔟","𝔠","𝔡","𝔢","𝔣","𝔤","𝔥","𝔦","𝔧","𝔨","𝔩","𝔪","𝔫","𝔬","𝔭","𝔮","𝔯","𝔰","𝔱","𝔲","𝔳","𝔴","𝔵","𝔶","𝔷"],capitalLatinDoubleStruck=["𝔸","𝔹","ℂ","𝔻","𝔼","𝔽","𝔾","ℍ","𝕀","𝕁","𝕂","𝕃","𝕄","ℕ","𝕆","ℙ","ℚ","ℝ","𝕊","𝕋","𝕌","𝕍","𝕎","𝕏","𝕐","ℤ"],smallLatinDoubleStruck=["𝕒","𝕓","𝕔","𝕕","𝕖","𝕗","𝕘","𝕙","𝕚","𝕛","𝕜","𝕝","𝕞","𝕟","𝕠","𝕡","𝕢","𝕣","𝕤","𝕥","𝕦","𝕧","𝕨","𝕩","𝕪","𝕫"],capitalLatinBoldFraktur=["𝕬","𝕭","𝕮","𝕯","𝕰","𝕱","𝕲","𝕳","𝕴","𝕵","𝕶","𝕷","𝕸","𝕹","𝕺","𝕻","𝕼","𝕽","𝕾","𝕿","𝖀","𝖁","𝖂","𝖃","𝖄","𝖅"],smallLatinBoldFraktur=["𝖆","𝖇","𝖈","𝖉","𝖊","𝖋","𝖌","𝖍","𝖎","𝖏","𝖐","𝖑","𝖒","𝖓","𝖔","𝖕","𝖖","𝖗","𝖘","𝖙","𝖚","𝖛","𝖜","𝖝","𝖞","𝖟"],capitalLatinSansSerif=["𝖠","𝖡","𝖢","𝖣","𝖤","𝖥","𝖦","𝖧","𝖨","𝖩","𝖪","𝖫","𝖬","𝖭","𝖮","𝖯","𝖰","𝖱","𝖲","𝖳","𝖴","𝖵","𝖶","𝖷","𝖸","𝖹"],smallLatinSansSerif=["𝖺","𝖻","𝖼","𝖽","𝖾","𝖿","𝗀","𝗁","𝗂","𝗃","𝗄","𝗅","𝗆","𝗇","𝗈","𝗉","𝗊","𝗋","𝗌","𝗍","𝗎","𝗏","𝗐","𝗑","𝗒","𝗓"],capitalLatinSansSerifBold=["𝗔","𝗕","𝗖","𝗗","𝗘","𝗙","𝗚","𝗛","𝗜","𝗝","𝗞","𝗟","𝗠","𝗡","𝗢","𝗣","𝗤","𝗥","𝗦","𝗧","𝗨","𝗩","𝗪","𝗫","𝗬","𝗭"],smallLatinSansSerifBold=["𝗮","𝗯","𝗰","𝗱","𝗲","𝗳","𝗴","𝗵","𝗶","𝗷","𝗸","𝗹","𝗺","𝗻","𝗼","𝗽","𝗾","𝗿","𝘀","𝘁","𝘂","𝘃","𝘄","𝘅","𝘆","𝘇"],capitalLatinSansSerifItalic=["𝘈","𝘉","𝘊","𝘋","𝘌","𝘍","𝘎","𝘏","𝘐","𝘑","𝘒","𝘓","𝘔","𝘕","𝘖","𝘗","𝘘","𝘙","𝘚","𝘛","𝘜","𝘝","𝘞","𝘟","𝘠","𝘡"],smallLatinSansSerifItalic=["𝘢","𝘣","𝘤","𝘥","𝘦","𝘧","𝘨","𝘩","𝘪","𝘫","𝘬","𝘭","𝘮","𝘯","𝘰","𝘱","𝘲","𝘳","𝘴","𝘵","𝘶","𝘷","𝘸","𝘹","𝘺","𝘻"],capitalLatinSansSerifBoldItalic=["𝘼","𝘽","𝘾","𝘿","𝙀","𝙁","𝙂","𝙃","𝙄","𝙅","𝙆","𝙇","𝙈","𝙉","𝙊","𝙋","𝙌","𝙍","𝙎","𝙏","𝙐","𝙑","𝙒","𝙓","𝙔","𝙕"],smallLatinSansSerifBoldItalic=["𝙖","𝙗","𝙘","𝙙","𝙚","𝙛","𝙜","𝙝","𝙞","𝙟","𝙠","𝙡","𝙢","𝙣","𝙤","𝙥","𝙦","𝙧","𝙨","𝙩","𝙪","𝙫","𝙬","𝙭","𝙮","𝙯"],capitalLatinMonospace=["𝙰","𝙱","𝙲","𝙳","𝙴","𝙵","𝙶","𝙷","𝙸","𝙹","𝙺","𝙻","𝙼","𝙽","𝙾","𝙿","𝚀","𝚁","𝚂","𝚃","𝚄","𝚅","𝚆","𝚇","𝚈","𝚉"],smallLatinMonospace=["𝚊","𝚋","𝚌","𝚍","𝚎","𝚏","𝚐","𝚑","𝚒","𝚓","𝚔","𝚕","𝚖","𝚗","𝚘","𝚙","𝚚","𝚛","𝚜","𝚝","𝚞","𝚟","𝚠","𝚡","𝚢","𝚣"],latinDoubleStruckItalic=["ⅅ","ⅆ","ⅇ","ⅈ","ⅉ"],capitalGreek=["Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω"],smallGreek=["α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω"],capitalGreekBold=["𝚨","𝚩","𝚪","𝚫","𝚬","𝚭","𝚮","𝚯","𝚰","𝚱","𝚲","𝚳","𝚴","𝚵","𝚶","𝚷","𝚸","𝚺","𝚻","𝚼","𝚽","𝚾","𝚿","𝛀"],smallGreekBold=["𝛂","𝛃","𝛄","𝛅","𝛆","𝛇","𝛈","𝛉","𝛊","𝛋","𝛌","𝛍","𝛎","𝛏","𝛐","𝛑","𝛒","𝛓","𝛔","𝛕","𝛖","𝛗","𝛘","𝛙","𝛚"],capitalGreekItalic=["𝛢","𝛣","𝛤","𝛥","𝛦","𝛧","𝛨","𝛩","𝛪","𝛫","𝛬","𝛭","𝛮","𝛯","𝛰","𝛱","𝛲","𝛴","𝛵","𝛶","𝛷","𝛸","𝛹","𝛺"],smallGreekItalic=["𝛼","𝛽","𝛾","𝛿","𝜀","𝜁","𝜂","𝜃","𝜄","𝜅","𝜆","𝜇","𝜈","𝜉","𝜊","𝜋","𝜌","𝜍","𝜎","𝜏","𝜐","𝜑","𝜒","𝜓","𝜔"],capitalGreekBoldItalic=["𝜜","𝜝","𝜞","𝜟","𝜠","𝜡","𝜢","𝜣","𝜤","𝜥","𝜦","𝜧","𝜨","𝜩","𝜪","𝜫","𝜬","𝜮","𝜯","𝜰","𝜱","𝜲","𝜳","𝜴"],smallGreekBoldItalic=["𝜶","𝜷","𝜸","𝜹","𝜺","𝜻","𝜼","𝜽","𝜾","𝜿","𝝀","𝝁","𝝂","𝝃","𝝄","𝝅","𝝆","𝝇","𝝈","𝝉","𝝊","𝝋","𝝌","𝝍","𝝎"],capitalGreekSansSerifBold=["𝝖","𝝗","𝝘","𝝙","𝝚","𝝛","𝝜","𝝝","𝝞","𝝟","𝝠","𝝡","𝝢","𝝣","𝝤","𝝥","𝝦","𝝨","𝝩","𝝪","𝝫","𝝬","𝝭","𝝮"],smallGreekSansSerifBold=["𝝰","𝝱","𝝲","𝝳","𝝴","𝝵","𝝶","𝝷","𝝸","𝝹","𝝺","𝝻","𝝼","𝝽","𝝾","𝝿","𝞀","𝞁","𝞂","𝞃","𝞄","𝞅","𝞆","𝞇","𝞈"],capitalGreekSansSerifBoldItalic=["𝞐","𝞑","𝞒","𝞓","𝞔","𝞕","𝞖","𝞗","𝞘","𝞙","𝞚","𝞛","𝞜","𝞝","𝞞","𝞟","𝞠","𝞢","𝞣","𝞤","𝞥","𝞦","𝞧","𝞨"],smallGreekSansSerifBoldItalic=["𝞪","𝞫","𝞬","𝞭","𝞮","𝞯","𝞰","𝞱","𝞲","𝞳","𝞴","𝞵","𝞶","𝞷","𝞸","𝞹","𝞺","𝞻","𝞼","𝞽","𝞾","𝞿","𝟀","𝟁","𝟂"],greekDoubleStruck=["ℼ","ℽ","ℾ","ℿ"],greekSpecial=["ϐ","ϑ","ϕ","ϖ","ϗ","ϰ","ϱ","ϵ","϶","ϴ"],greekSpecialBold=["𝛜","𝛝","𝛞","𝛟","𝛠","𝛡"],greekSpecialItalic=["𝜖","𝜗","𝜘","𝜙","𝜚","𝜛"],greekSpecialSansSerifBold=["𝞊","𝞋","𝞌","𝞍","𝞎","𝞏"],hebrewLetters=["ℵ","ℶ","ℷ","ℸ"],allLetters=capitalLatin.concat(smallLatin,capitalLatinFullWidth,smallLatinFullWidth,capitalLatinBold,smallLatinBold,capitalLatinItalic,capitalLatinBoldItalic,smallLatinBoldItalic,smallLatinItalic,capitalLatinScript,smallLatinScript,capitalLatinBoldScript,smallLatinBoldScript,capitalLatinFraktur,smallLatinFraktur,capitalLatinDoubleStruck,smallLatinDoubleStruck,capitalLatinBoldFraktur,smallLatinBoldFraktur,capitalLatinSansSerif,smallLatinSansSerif,capitalLatinSansSerifBold,smallLatinSansSerifBold,capitalLatinSansSerifItalic,smallLatinSansSerifItalic,capitalLatinSansSerifBoldItalic,smallLatinSansSerifBoldItalic,capitalLatinMonospace,smallLatinMonospace,latinDoubleStruckItalic,capitalGreek,smallGreek,capitalGreekBold,smallGreekBold,capitalGreekItalic,smallGreekItalic,capitalGreekBoldItalic,smallGreekBoldItalic,capitalGreekSansSerifBold,smallGreekSansSerifBold,greekDoubleStruck,greekSpecial,capitalGreekSansSerifBoldItalic,smallGreekSansSerifBoldItalic,greekSpecialBold,greekSpecialItalic,greekSpecialSansSerifBold,hebrewLetters);semantic_attr.allLettersRegExp=new RegExp(allLetters.join("|"));const additions=["+","±","∓","∔","∧","∨","∩","∪","⊌","⊍","⊎","⊓","⊔","⊝","⊞","⊤","⊥","⊺","⊻","⊼","⋄","⋎","⋏","⋒","⋓","⩞","⊕","⋔"],invisiblePlus_=String.fromCodePoint(8292);additions.push(invisiblePlus_);const multiplications=["†","‡","∐","∗","∘","∙","≀","⊚","⊛","⊠","⊡","⋅","⋆","⋇","⋈","⋉","⋊","⋋","⋌","○","·","*","⊗","⊙"],invisibleTimes_=String.fromCodePoint(8290);multiplications.push(invisibleTimes_);const subtractions=["¯","-","⁒","⁻","₋","−","∖","∸","≂","⊖","⊟","➖","⨩","⨪","⨫","⨬","⨺","⩁","﹣","-","‐","‑"],divisions=["/","÷","⁄","∕","⊘","⟌","⦼","⨸"],functionApplication_=String.fromCodePoint(8289),equalities=["=","~","⁼","₌","∼","∽","≃","≅","≈","≊","≋","≌","≍","≎","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≡","≣","⧤","⩦","⩮","⩯","⩰","⩱","⩲","⩳","⩴","⩵","⩶","⩷","⩸","⋕","⩭","⩪","⩫","⩬","﹦","=","⩬","⊜","∷"],inequalities=["<",">","≁","≂","≄","≆","≇","≉","≏","≐","≠","≢","≤","≥","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","⊀","⊁","⋖","⋗","⋘","⋙","⋚","⋛","⋜","⋝","⋞","⋟","⋠","⋡","⋦","⋧","⋨","⋩","⩹","⩺","⩻","⩼","⩽","⩾","⩿","⪀","⪁","⪂","⪃","⪄","⪅","⪆","⪇","⪈","⪉","⪊","⪋","⪌","⪍","⪎","⪏","⪐","⪑","⪒","⪓","⪔","⪕","⪖","⪗","⪘","⪙","⪚","⪛","⪜","⪝","⪞","⪟","⪠","⪡","⪢","⪣","⪤","⪥","⪦","⪧","⪨","⪩","⪪","⪫","⪬","⪭","⪮","⪯","⪰","⪱","⪲","⪳","⪴","⪵","⪶","⪷","⪸","⪹","⪺","⪻","⪼","⫷","⫸","⫹","⫺","⧀","⧁","﹤","﹥","<",">"],setRelations=["⋢","⋣","⋤","⋥","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⪽","⪾","⪿","⫀","⫁","⫂","⫃","⫄","⫅","⫆","⫇","⫈","⫉","⫊","⫋","⫌","⫍","⫎","⫏","⫐","⫑","⫒","⫓","⫔","⫕","⫖","⫗","⫘","⋐","⋑","⋪","⋫","⋬","⋭","⊲","⊳","⊴","⊵"],elementRelations=["∈","∊","⋲","⋳","⋴","⋵","⋶","⋷","⋸","⋹","⋿"],nonelementRelations=["∉"],reelementRelations=["∋","∍","⋺","⋻","⋼","⋽","⋾"],renonelementRelations=["∌"],relations=["⊢","⊣","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⫞","⫟","⫠","⫡","⫢","⫣","⫤","⫥","⫦","⫧","⫨","⫩","⫪","⫫","⫬","⫭"],arrows=["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿","⌁","⌃","⌄","⌤","⎋","➔","➘","➙","➚","➛","➜","➝","➞","➟","➠","➡","➢","➣","➤","➥","➦","➧","➨","➩","➪","➫","➬","➭","➮","➯","➱","➲","➳","➴","➵","➶","➷","➸","➹","➺","➻","➼","➽","➾","⟰","⟱","⟲","⟳","⟴","⟵","⟶","⟷","⟸","⟹","⟺","⟻","⟼","⟽","⟾","⟿","⤀","⤁","⤂","⤃","⤄","⤅","⤆","⤇","⤈","⤉","⤊","⤋","⤌","⤍","⤎","⤏","⤐","⤑","⤒","⤓","⤔","⤕","⤖","⤗","⤘","⤙","⤚","⤛","⤜","⤝","⤞","⤟","⤠","⤡","⤢","⤣","⤤","⤥","⤦","⤧","⤨","⤩","⤪","⤭","⤮","⤯","⤰","⤱","⤲","⤳","⤴","⤵","⤶","⤷","⤸","⤹","⤺","⤻","⤼","⤽","⤾","⤿","⥀","⥁","⥂","⥃","⥄","⥅","⥆","⥇","⥈","⥉","⥰","⥱","⥲","⥳","⥴","⥵","⥶","⥷","⥸","⥹","⥺","⥻","⦳","⦴","⦽","⧪","⧬","⧭","⨗","⬀","⬁","⬂","⬃","⬄","⬅","⬆","⬇","⬈","⬉","⬊","⬋","⬌","⬍","⬎","⬏","⬐","⬑","⬰","⬱","⬲","⬳","⬴","⬵","⬶","⬷","⬸","⬹","⬺","⬻","⬼","⬽","⬾","⬿","⭀","⭁","⭂","⭃","⭄","⭅","⭆","⭇","⭈","⭉","⭊","⭋","⭌","←","↑","→","↓","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇋","⇌","⥊","⥋","⥌","⥍","⥎","⥏","⥐","⥑","⥒","⥓","⥔","⥕","⥖","⥗","⥘","⥙","⥚","⥛","⥜","⥝","⥞","⥟","⥠","⥡","⥢","⥣","⥤","⥥","⥦","⥧","⥨","⥩","⥪","⥫","⥬","⥭","⥮","⥯","⥼","⥽","⥾","⥿"],sumOps=["⅀","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨃","⨄","⨅","⨆","⨇","⨈","⨉","⨊","⨋","⫼","⫿"],intOps=["∫","∬","∭","∮","∯","∰","∱","∲","∳","⨌","⨍","⨎","⨏","⨐","⨑","⨒","⨓","⨔","⨕","⨖","⨗","⨘","⨙","⨚","⨛","⨜"],geometryOps=["∟","∠","∡","∢","⊾","⊿","△","▷","▽","◁"],prefixOps=["∀","∃","∆","∇","∂","∁","∄"],prefixOpsBold=["𝛁","𝛛","𝟊","𝟋"],prefixOpsItalic=["𝛻","𝜕"],prefixOpsSansSerifBold=["𝝯","𝞉"],digitsNormal=["0","1","2","3","4","5","6","7","8","9"],digitsFullWidth=["0","1","2","3","4","5","6","7","8","9"],digitsBold=["𝟎","𝟏","𝟐","𝟑","𝟒","𝟓","𝟔","𝟕","𝟖","𝟗"],digitsDoubleStruck=["𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"],digitsSansSerif=["𝟢","𝟣","𝟤","𝟥","𝟦","𝟧","𝟨","𝟩","𝟪","𝟫"],digitsSansSerifBold=["𝟬","𝟭","𝟮","𝟯","𝟰","𝟱","𝟲","𝟳","𝟴","𝟵"],digitsMonospace=["𝟶","𝟷","𝟸","𝟹","𝟺","𝟻","𝟼","𝟽","𝟾","𝟿"],digitsSuperscript=["²","³","¹","⁰","⁴","⁵","⁶","⁷","⁸","⁹"],digitsSubscript=["₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"],fractions=["¼","½","¾","⅐","⅑","⅒","⅓","⅔","⅕","⅖","⅗","⅘","⅙","⅚","⅛","⅜","⅝","⅞","⅟","↉"],enclosedNumbers=["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⓪","⓫","⓬","⓭","⓮","⓯","⓰","⓱","⓲","⓳","⓴","⓵","⓶","⓷","⓸","⓹","⓺","⓻","⓼","⓽","⓾","⓿","❶","❷","❸","❹","❺","❻","❼","❽","❾","❿","➀","➁","➂","➃","➄","➅","➆","➇","➈","➉","➊","➋","➌","➍","➎","➏","➐","➑","➒","➓","㉈","㉉","㉊","㉋","㉌","㉍","㉎","㉏","㉑","㉒","㉓","㉔","㉕","㉖","㉗","㉘","㉙","㉚","㉛","㉜","㉝","㉞","㉟","㊱","㊲","㊳","㊴","㊵","㊶","㊷","㊸","㊹","㊺","㊻","㊼","㊽","㊾","㊿"],fencedNumbers=["⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇"],punctuatedNumbers=["⒈","⒉","⒊","⒋","⒌","⒍","⒎","⒏","⒐","⒑","⒒","⒓","⒔","⒕","⒖","⒗","⒘","⒙","⒚","⒛","🄀","🄁","🄂","🄃","🄄","🄅","🄆","🄇","🄈","🄉","🄊"],numbers=fractions,otherNumbers=digitsSuperscript.concat(digitsSubscript,enclosedNumbers,fencedNumbers,punctuatedNumbers),trigonometricFunctions=["cos","cot","csc","sec","sin","tan","arccos","arccot","arccsc","arcsec","arcsin","arctan","arc cos","arc cot","arc csc","arc sec","arc sin","arc tan"],hyperbolicFunctions=["cosh","coth","csch","sech","sinh","tanh","arcosh","arcoth","arcsch","arsech","arsinh","artanh","arccosh","arccoth","arccsch","arcsech","arcsinh","arctanh"],algebraicFunctions=["deg","det","dim","hom","ker","Tr","tr"],elementaryFunctions=["log","ln","lg","exp","expt","gcd","gcd","arg","im","re","Pr"],prefixFunctions=trigonometricFunctions.concat(hyperbolicFunctions,algebraicFunctions,elementaryFunctions),limitFunctions=["inf","lim","liminf","limsup","max","min","sup","injlim","projlim","inj lim","proj lim"],infixFunctions=["mod","rem"],symbolSetToSemantic_=[{set:generalPunctuations,type:"punctuation",role:"unknown"},{set:colons,type:"punctuation",role:"colon"},{set:commas,type:"punctuation",role:"comma"},{set:ellipses,type:"punctuation",role:"ellipsis"},{set:fullStops,type:"punctuation",role:"fullstop"},{set:dashes,type:"operator",role:"dash"},{set:tildes,type:"operator",role:"tilde"},{set:primes,type:"punctuation",role:"prime"},{set:degrees,type:"punctuation",role:"degree"},{set:leftFences,type:"fence",role:"open"},{set:rightFences,type:"fence",role:"close"},{set:topFences,type:"fence",role:"top"},{set:bottomFences,type:"fence",role:"bottom"},{set:neutralFences,type:"fence",role:"neutral"},{set:metricFences,type:"fence",role:"metric"},{set:smallLatin,type:"identifier",role:"latinletter",font:"normal"},{set:capitalLatin,type:"identifier",role:"latinletter",font:"normal"},{set:smallLatinFullWidth,type:"identifier",role:"latinletter",font:"normal"},{set:capitalLatinFullWidth,type:"identifier",role:"latinletter",font:"normal"},{set:smallLatinBold,type:"identifier",role:"latinletter",font:"bold"},{set:capitalLatinBold,type:"identifier",role:"latinletter",font:"bold"},{set:smallLatinItalic,type:"identifier",role:"latinletter",font:"italic"},{set:capitalLatinItalic,type:"identifier",role:"latinletter",font:"italic"},{set:smallLatinBoldItalic,type:"identifier",role:"latinletter",font:"bold-italic"},{set:capitalLatinBoldItalic,type:"identifier",role:"latinletter",font:"bold-italic"},{set:smallLatinScript,type:"identifier",role:"latinletter",font:"script"},{set:capitalLatinScript,type:"identifier",role:"latinletter",font:"script"},{set:smallLatinBoldScript,type:"identifier",role:"latinletter",font:"bold-script"},{set:capitalLatinBoldScript,type:"identifier",role:"latinletter",font:"bold-script"},{set:smallLatinFraktur,type:"identifier",role:"latinletter",font:"fraktur"},{set:capitalLatinFraktur,type:"identifier",role:"latinletter",font:"fraktur"},{set:smallLatinDoubleStruck,type:"identifier",role:"latinletter",font:"double-struck"},{set:capitalLatinDoubleStruck,type:"identifier",role:"latinletter",font:"double-struck"},{set:smallLatinBoldFraktur,type:"identifier",role:"latinletter",font:"bold-fraktur"},{set:capitalLatinBoldFraktur,type:"identifier",role:"latinletter",font:"bold-fraktur"},{set:smallLatinSansSerif,type:"identifier",role:"latinletter",font:"sans-serif"},{set:capitalLatinSansSerif,type:"identifier",role:"latinletter",font:"sans-serif"},{set:smallLatinSansSerifBold,type:"identifier",role:"latinletter",font:"sans-serif-bold"},{set:capitalLatinSansSerifBold,type:"identifier",role:"latinletter",font:"sans-serif-bold"},{set:smallLatinSansSerifItalic,type:"identifier",role:"latinletter",font:"sans-serif-italic"},{set:capitalLatinSansSerifItalic,type:"identifier",role:"latinletter",font:"sans-serif-italic"},{set:smallLatinSansSerifBoldItalic,type:"identifier",role:"latinletter",font:"sans-serif-bold-italic"},{set:capitalLatinSansSerifBoldItalic,type:"identifier",role:"latinletter",font:"sans-serif-bold-italic"},{set:smallLatinMonospace,type:"identifier",role:"latinletter",font:"monospace"},{set:capitalLatinMonospace,type:"identifier",role:"latinletter",font:"monospace"},{set:latinDoubleStruckItalic,type:"identifier",role:"latinletter",font:"double-struck-italic"},{set:smallGreek,type:"identifier",role:"greekletter",font:"normal"},{set:capitalGreek,type:"identifier",role:"greekletter",font:"normal"},{set:smallGreekBold,type:"identifier",role:"greekletter",font:"bold"},{set:capitalGreekBold,type:"identifier",role:"greekletter",font:"bold"},{set:smallGreekItalic,type:"identifier",role:"greekletter",font:"italic"},{set:capitalGreekItalic,type:"identifier",role:"greekletter",font:"italic"},{set:smallGreekBoldItalic,type:"identifier",role:"greekletter",font:"bold-italic"},{set:capitalGreekBoldItalic,type:"identifier",role:"greekletter",font:"bold-italic"},{set:smallGreekSansSerifBold,type:"identifier",role:"greekletter",font:"sans-serif-bold"},{set:capitalGreekSansSerifBold,type:"identifier",role:"greekletter",font:"sans-serif-bold"},{set:capitalGreekSansSerifBoldItalic,type:"identifier",role:"greekletter",font:"sans-serif-bold-italic"},{set:smallGreekSansSerifBoldItalic,type:"identifier",role:"greekletter",font:"sans-serif-bold-italic"},{set:greekDoubleStruck,type:"identifier",role:"greekletter",font:"double-struck"},{set:greekSpecial,type:"identifier",role:"greekletter",font:"normal"},{set:greekSpecialBold,type:"identifier",role:"greekletter",font:"bold"},{set:greekSpecialItalic,type:"identifier",role:"greekletter",font:"italic"},{set:greekSpecialSansSerifBold,type:"identifier",role:"greekletter",font:"sans-serif-bold"},{set:hebrewLetters,type:"identifier",role:"otherletter",font:"normal"},{set:digitsNormal,type:"number",role:"integer",font:"normal"},{set:digitsFullWidth,type:"number",role:"integer",font:"normal"},{set:digitsBold,type:"number",role:"integer",font:"bold"},{set:digitsDoubleStruck,type:"number",role:"integer",font:"double-struck"},{set:digitsSansSerif,type:"number",role:"integer",font:"sans-serif"},{set:digitsSansSerifBold,type:"number",role:"integer",font:"sans-serif-bold"},{set:digitsMonospace,type:"number",role:"integer",font:"monospace"},{set:numbers,type:"number",role:"float"},{set:otherNumbers,type:"number",role:"othernumber"},{set:additions,type:"operator",role:"addition"},{set:multiplications,type:"operator",role:"multiplication"},{set:subtractions,type:"operator",role:"subtraction"},{set:divisions,type:"operator",role:"division"},{set:prefixOps,type:"operator",role:"prefix operator"},{set:prefixOpsBold,type:"operator",role:"prefix operator",font:"bold"},{set:prefixOpsItalic,type:"operator",role:"prefix operator",font:"italic"},{set:prefixOpsSansSerifBold,type:"operator",role:"prefix operator",font:"sans-serif-bold"},{set:equalities,type:"relation",role:"equality"},{set:inequalities,type:"relation",role:"inequality"},{set:setRelations,type:"relation",role:"set"},{set:relations,type:"relation",role:"unknown"},{set:arrows,type:"relation",role:"arrow"},{set:elementRelations,type:"operator",role:"element"},{set:nonelementRelations,type:"operator",role:"nonelement"},{set:reelementRelations,type:"operator",role:"reelement"},{set:renonelementRelations,type:"operator",role:"renonelement"},{set:sumOps,type:"largeop",role:"sum"},{set:intOps,type:"largeop",role:"integral"},{set:geometryOps,type:"operator",role:"geometry"},{set:limitFunctions,type:"function",role:"limit function"},{set:prefixFunctions,type:"function",role:"prefix function"},{set:infixFunctions,type:"operator",role:"prefix function"}],meaning_=function(){const t={};for(let e,r=0;e=symbolSetToSemantic_[r];r++)e.set.forEach((function(r){t[r]={role:e.role||"unknown",type:e.type||"unknown",font:e.font||"unknown"}}));return t}();function equal(t,e){return t.type===e.type&&t.role===e.role&&t.font===e.font}function lookupType(t){var e;return(null===(e=meaning_[t])||void 0===e?void 0:e.type)||"unknown"}function lookupRole(t){var e;return(null===(e=meaning_[t])||void 0===e?void 0:e.role)||"unknown"}function lookupMeaning(t){return meaning_[t]||{role:"unknown",type:"unknown",font:"unknown"}}function invisibleTimes(){return invisibleTimes_}function invisiblePlus(){return invisiblePlus_}function invisibleComma(){return invisibleComma_}function functionApplication(){return functionApplication_}function isMatchingFence(t,e){return-1!==neutralFences.indexOf(t)||-1!==metricFences.indexOf(t)?t===e:openClosePairs[t]===e||topBottomPairs[t]===e}function isEmbellishedType(t){return"operator"===t||"relation"===t||"fence"===t||"punctuation"===t}semantic_attr.equal=equal,semantic_attr.lookupType=lookupType,semantic_attr.lookupRole=lookupRole,semantic_attr.lookupMeaning=lookupMeaning,semantic_attr.invisibleTimes=invisibleTimes,semantic_attr.invisiblePlus=invisiblePlus,semantic_attr.invisibleComma=invisibleComma,semantic_attr.functionApplication=functionApplication,semantic_attr.isMatchingFence=isMatchingFence,semantic_attr.isEmbellishedType=isEmbellishedType;const secondary_=new Map;function secKey(t,e){return`${t} ${e}`}function addSecondary_(t,e,r=""){for(const n of e)secondary_.set(secKey(t,n),r||t)}function lookupSecondary(t,e){return secondary_.get(secKey(t,e))}addSecondary_("d",["d","ⅆ","d","𝐝","𝑑","𝒹","𝓭","𝔡","𝕕","𝖉","𝖽","𝗱","𝘥","𝚍"]),addSecondary_("bar",dashes),addSecondary_("tilde",tildes),semantic_attr.lookupSecondary=lookupSecondary,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.wordOrdinal=t.layoutFactor_=t.fencedFactor_=t.simpleFactor_=t.simpleArguments=t.fencedArguments=t.insertNesting=t.matchingFences=t.nestingDepth=t.NESTING_DEPTH=t.ordinalExponent=t.allTextLastContent_=t.isUnitExpression=t.isSmallVulgarFraction=t.allCellsSimple=t.allIndices_=t.isInteger_=t.simpleCell_=t.simpleNode=t.hasPreference=t.isSimpleFraction_=t.isSimpleNumber_=t.isNumber_=t.isLetter_=t.isSimple_=t.isSimpleLetters_=t.isSimpleDegree_=t.isSimpleNegative_=t.isSimpleFunction_=t.isSimpleExpression=t.nodeCounter=void 0;const e=dom_util,r=engine,n=xpath_util,o=locale$d,i=transformers,a=grammar,s=store_util,l=semantic_annotations,c=semantic_annotator,u=semantic_attr;function d(t){return b(t)||f(t)||h(t)||m(t)||p(t)}function p(t){return"appl"===t.type&&("prefix function"===t.childNodes[0].role||"simple function"===t.childNodes[0].role)&&(_(t.childNodes[1])||"fenced"===t.childNodes[1].type&&_(t.childNodes[1].childNodes[0]))}function m(t){return"prefixop"===t.type&&"negative"===t.role&&_(t.childNodes[0])&&"prefixop"!==t.childNodes[0].type&&"appl"!==t.childNodes[0].type&&"punctuated"!==t.childNodes[0].type}function h(t){return"punctuated"===t.type&&"endpunct"===t.role&&2===t.childNodes.length&&"degree"===t.childNodes[1].role&&(g(t.childNodes[0])||y(t.childNodes[0])||"prefixop"===t.childNodes[0].type&&"negative"===t.childNodes[0].role&&(g(t.childNodes[0].childNodes[0])||y(t.childNodes[0].childNodes[0])))}function f(t){return g(t)||"infixop"===t.type&&"implicit"===t.role&&(2===t.childNodes.length&&(g(t.childNodes[0])||b(t.childNodes[0]))&&g(t.childNodes[1])||3===t.childNodes.length&&b(t.childNodes[0])&&g(t.childNodes[1])&&g(t.childNodes[2]))}function _(t){return t.hasAnnotation("clearspeak","simple")}function g(t){return"identifier"===t.type&&("latinletter"===t.role||"greekletter"===t.role||"otherletter"===t.role||"simple function"===t.role)}function y(t){return"number"===t.type&&("integer"===t.role||"float"===t.role)}function b(t){return y(t)||v(t)}function v(t){if(x("Fraction_Over")||x("Fraction_FracOver"))return!1;if("fraction"!==t.type||"vulgar"!==t.role)return!1;if(x("Fraction_Ordinal"))return!0;const e=parseInt(t.childNodes[0].textContent,10),r=parseInt(t.childNodes[1].textContent,10);return e>0&&e<20&&r>0&&r<11}function x(t){return r.default.getInstance().style===t}function M(t){if(!t.hasAttribute("annotation"))return!1;const e=t.getAttribute("annotation");return!!/clearspeak:simple$|clearspeak:simple;/.exec(e)}function S(t){if(M(t))return!0;if("subscript"!==t.tagName)return!1;const e=t.childNodes[0].childNodes,r=e[1];return"identifier"===e[0].tagName&&(E(r)||"infixop"===r.tagName&&r.hasAttribute("role")&&"implicit"===r.getAttribute("role")&&C(r))}function E(t){return"number"===t.tagName&&t.hasAttribute("role")&&"integer"===t.getAttribute("role")}function C(t){return n.evalXPath("children/*",t).every((t=>E(t)||"identifier"===t.tagName))}function $(t){return"text"===t.type||"punctuated"===t.type&&"text"===t.role&&y(t.childNodes[0])&&O(t.childNodes.slice(1))||"identifier"===t.type&&"unit"===t.role||"infixop"===t.type&&("implicit"===t.role||"unit"===t.role)}function O(t){for(let e=0;e<t.length-1;e++)if("text"!==t[e].type||""!==t[e].textContent)return!1;return"text"===t[t.length-1].type}function A(t,e){if(!e||!t)return t;const r=t.match(/^(open|close) /);return r?r[0]+e+" "+t.substring(r[0].length):e+" "+t}function j(t){return!!t&&("number"===t.tagName||"identifier"===t.tagName||"function"===t.tagName||"appl"===t.tagName||"fraction"===t.tagName)}function T(t){return t&&("fenced"===t.tagName||t.hasAttribute("role")&&"leftright"===t.getAttribute("role")||N(t))}function N(t){return!!t&&("matrix"===t.tagName||"vector"===t.tagName)}t.nodeCounter=function(t,e){const r=e.split("-"),n=s.nodeCounter(t,r[0]||""),o=r[1]||"",i=r[2]||"";let a=!0;return function(){const t=n();return a?(a=!1,i+t+o):t+o}},t.isSimpleExpression=d,t.isSimpleFunction_=p,t.isSimpleNegative_=m,t.isSimpleDegree_=h,t.isSimpleLetters_=f,t.isSimple_=_,t.isLetter_=g,t.isNumber_=y,t.isSimpleNumber_=b,t.isSimpleFraction_=v,t.hasPreference=x,(0,l.register)(new c.SemanticAnnotator("clearspeak","simple",(function(t){return d(t)?"simple":""}))),t.simpleNode=M,t.simpleCell_=S,t.isInteger_=E,t.allIndices_=C,t.allCellsSimple=function(t){const e="matrix"===t.tagName?"children/row/children/cell/children/*":"children/line/children/*";return n.evalXPath(e,t).every(S)?[t]:[]},t.isSmallVulgarFraction=function(t){return(0,i.vulgarFractionSmall)(t,20,11)?[t]:[]},t.isUnitExpression=$,t.allTextLastContent_=O,(0,l.register)(new c.SemanticAnnotator("clearspeak","unit",(function(t){return $(t)?"unit":""}))),t.ordinalExponent=function(t){const e=parseInt(t.textContent,10);return isNaN(e)?t.textContent:e>10?o.LOCALE.NUMBERS.numericOrdinal(e):o.LOCALE.NUMBERS.wordOrdinal(e)},t.NESTING_DEPTH=null,t.nestingDepth=function(e){let r=0;const n=e.textContent,i="open"===e.getAttribute("role")?0:1;let a=e.parentNode;for(;a;)"fenced"===a.tagName&&a.childNodes[0].childNodes[i].textContent===n&&r++,a=a.parentNode;return t.NESTING_DEPTH=r>1?o.LOCALE.NUMBERS.wordOrdinal(r):"",t.NESTING_DEPTH},t.matchingFences=function(t){const e=t.previousSibling;let r,n;return e?(r=e,n=t):(r=t,n=t.nextSibling),n&&(0,u.isMatchingFence)(r.textContent,n.textContent)?[t]:[]},t.insertNesting=A,a.Grammar.getInstance().setCorrection("insertNesting",A),t.fencedArguments=function(t){const r=e.toArray(t.parentNode.childNodes),o=n.evalXPath("../../children/*",t),i=r.indexOf(t);return T(o[i])||T(o[i+1])?[t]:[]},t.simpleArguments=function(t){const r=e.toArray(t.parentNode.childNodes),o=n.evalXPath("../../children/*",t),i=r.indexOf(t);return j(o[i])&&o[i+1]&&(j(o[i+1])||"root"===o[i+1].tagName||"sqrt"===o[i+1].tagName||"superscript"===o[i+1].tagName&&o[i+1].childNodes[0].childNodes[0]&&("number"===o[i+1].childNodes[0].childNodes[0].tagName||"identifier"===o[i+1].childNodes[0].childNodes[0].tagName)&&("2"===o[i+1].childNodes[0].childNodes[1].textContent||"3"===o[i+1].childNodes[0].childNodes[1].textContent))?[t]:[]},t.simpleFactor_=j,t.fencedFactor_=T,t.layoutFactor_=N,t.wordOrdinal=function(t){return o.LOCALE.NUMBERS.wordOrdinal(parseInt(t.textContent,10))}}(clearspeak_util),getDefaultExportFromCjs(clearspeak_util);var mathspeak_util={},base_util={};function removeEmpty(t){return t.filter((t=>t))}function interleaveLists(t,e){const r=[];for(;t.length||e.length;)t.length&&r.push(t.shift()),e.length&&r.push(e.shift());return r}function setdifference(t,e){return t?e?t.filter((t=>e.indexOf(t)<0)):t:[]}function union(t,e){return t&&e?t.concat(setdifference(e,t)):t||e||[]}Object.defineProperty(base_util,"__esModule",{value:!0}),base_util.union=base_util.setdifference=base_util.interleaveLists=base_util.removeEmpty=void 0,base_util.removeEmpty=removeEmpty,base_util.interleaveLists=interleaveLists,base_util.setdifference=setdifference,base_util.union=union;var semantic_processor={},semantic_heuristic_factory={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.lookup=t.run=t.add=t.blacklist=t.flags=t.updateFactory=t.factory=void 0,t.factory=null,t.updateFactory=function(e){t.factory=e};const e=new Map;function r(t){return e.get(t)}t.flags={combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},t.blacklist={},t.add=function(r){const n=r.name;e.set(n,r),t.flags[n]||(t.flags[n]=!1)},t.run=function(e,n,o){const i=r(e);return i&&!t.blacklist[e]&&(t.flags[e]||i.applicable(n))?i.apply(n):o?o(n):n},t.lookup=r}(semantic_heuristic_factory),getDefaultExportFromCjs(semantic_heuristic_factory);var semantic_node_factory={},semantic_default={},semantic_ordering={};Object.defineProperty(semantic_ordering,"__esModule",{value:!0}),semantic_ordering.SemanticComparator=semantic_ordering.reduce=semantic_ordering.sort=semantic_ordering.apply=semantic_ordering.add=void 0;const comparators=[];function add(t){comparators.push(t)}function apply(t,e){for(let r,n=0;r=comparators[n];n++){const n=r.compare(t,e);if(0!==n)return n}return 0}function sort(t){t.sort(apply)}function reduce(t){if(t.length<=1)return t;const e=t.slice();sort(e);const r=[];let n;do{n=e.pop(),r.push(n)}while(n&&e.length&&0===apply(e[e.length-1],n));return r}semantic_ordering.add=add,semantic_ordering.apply=apply,semantic_ordering.sort=sort,semantic_ordering.reduce=reduce;class SemanticComparator{constructor(t,e=null){this.comparator=t,this.type=e,add(this)}compare(t,e){return this.type&&this.type===t.type&&this.type===e.type?this.comparator(t,e):0}}function simpleFunction(t,e){return"simple function"===t.role?1:"simple function"===e.role?-1:0}semantic_ordering.SemanticComparator=SemanticComparator,new SemanticComparator(simpleFunction,"identifier"),Object.defineProperty(semantic_default,"__esModule",{value:!0}),semantic_default.SemanticMeaningCollator=semantic_default.SemanticNodeCollator=semantic_default.SemanticDefault=void 0;const SemanticAttr$2=semantic_attr,semantic_ordering_1=semantic_ordering;class SemanticDefault{constructor(){this.map={}}static key(t,e){return e?t+":"+e:t}add(t,e){this.map[SemanticDefault.key(t,e.font)]=e}addNode(t){this.add(t.textContent,t.meaning())}retrieve(t,e){return this.map[SemanticDefault.key(t,e)]}retrieveNode(t){return this.retrieve(t.textContent,t.font)}size(){return Object.keys(this.map).length}}semantic_default.SemanticDefault=SemanticDefault;class SemanticCollator{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[SemanticDefault.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 SemanticNodeCollator extends SemanticCollator{copyCollator(){return new SemanticNodeCollator}add(t,e){const r=SemanticDefault.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 SemanticMeaningCollator;for(const e in this.map)t.map[e]=this.map[e].map((function(t){return t.meaning()}));return t}}semantic_default.SemanticNodeCollator=SemanticNodeCollator;class SemanticMeaningCollator extends SemanticCollator{copyCollator(){return new SemanticMeaningCollator}add(t,e){const r=this.retrieve(t,e.font);if(!r||!r.find((function(t){return SemanticAttr$2.equal(t,e)}))){const r=SemanticDefault.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,semantic_ordering_1.reduce)(this.map[t]))}default(){const t=new SemanticDefault;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}}semantic_default.SemanticMeaningCollator=SemanticMeaningCollator;var semantic_node={},semantic_util={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.partitionNodes=t.sliceNodes=t.getEmbellishedInner=t.addAttributes=t.isZeroLength=t.purgeNodes=t.isOrphanedGlyph=t.hasDisplayTag=t.hasEmptyTag=t.hasIgnoreTag=t.hasLeafTag=t.hasMathTag=t.directSpeechKeys=t.DISPLAYTAGS=t.EMPTYTAGS=t.IGNORETAGS=t.LEAFTAGS=void 0;const e=dom_util;function r(r){return!!r&&-1!==t.LEAFTAGS.indexOf(e.tagName(r))}function n(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:[]}}t.LEAFTAGS=["MO","MI","MN","MTEXT","MS","MSPACE"],t.IGNORETAGS=["MERROR","MPHANTOM","MALIGNGROUP","MALIGNMARK","MPRESCRIPTS","ANNOTATION","ANNOTATION-XML"],t.EMPTYTAGS=["MATH","MROW","MPADDED","MACTION","NONE","MSTYLE","SEMANTICS"],t.DISPLAYTAGS=["MROOT","MSQRT"],t.directSpeechKeys=["aria-label","exact-speech","alt"],t.hasMathTag=function(t){return!!t&&"MATH"===e.tagName(t)},t.hasLeafTag=r,t.hasIgnoreTag=function(r){return!!r&&-1!==t.IGNORETAGS.indexOf(e.tagName(r))},t.hasEmptyTag=function(r){return!!r&&-1!==t.EMPTYTAGS.indexOf(e.tagName(r))},t.hasDisplayTag=function(r){return!!r&&-1!==t.DISPLAYTAGS.indexOf(e.tagName(r))},t.isOrphanedGlyph=function(t){return!!t&&"MGLYPH"===e.tagName(t)&&!r(t.parentNode)},t.purgeNodes=function(r){const n=[];for(let o,i=0;o=r[i];i++){if(o.nodeType!==e.NodeType.ELEMENT_NODE)continue;const r=e.tagName(o);-1===t.IGNORETAGS.indexOf(r)&&(-1!==t.EMPTYTAGS.indexOf(r)&&0===o.childNodes.length||n.push(o))}return n},t.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])},t.addAttributes=function(e,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/)&&(e.attributes[o]=n[r].value,e.nobreaking=!0),-1!==t.directSpeechKeys.indexOf(o)&&(e.attributes["ext-speech"]=n[r].value,e.nobreaking=!0),o.match(/texclass$/)&&(e.attributes.texclass=n[r].value),"href"===o&&(e.attributes.href=n[r].value,e.nobreaking=!0)}}},t.getEmbellishedInner=function t(e){return e&&e.embellished&&e.childNodes.length>0?t(e.childNodes[0]):e},t.sliceNodes=n,t.partitionNodes=function(t,e){let r=t;const o=[],i=[];let a=null;do{a=n(r,e),i.push(a.head),o.push(a.div),r=a.tail}while(a.div);return o.pop(),{rel:o,comp:i}}}(semantic_util),getDefaultExportFromCjs(semantic_util),Object.defineProperty(semantic_node,"__esModule",{value:!0}),semantic_node.SemanticNode=void 0;const DomUtil$o=dom_util,semantic_attr_1$1=semantic_attr,SemanticUtil$3=semantic_util;class SemanticNode{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 SemanticNode(e);return r.type=t.tagName,SemanticNode.setAttribute(r,t,"role"),SemanticNode.setAttribute(r,t,"font"),SemanticNode.setAttribute(r,t,"embellished"),SemanticNode.setAttribute(r,t,"fencepointer","fencePointer"),t.getAttribute("annotation")&&r.parseAnnotation(t.getAttribute("annotation")),SemanticUtil$3.addAttributes(r,t),SemanticNode.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 DomUtil$o.toArray(e.childNodes)){if(r.nodeType===DomUtil$o.NodeType.TEXT_NODE){t.textContent=r.textContent;continue}const e=DomUtil$o.toArray(r.childNodes).map(SemanticNode.fromXml);e.forEach((e=>e.parent=t)),"CONTENT"===DomUtil$o.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=DomUtil$o.parseInput("<snode/>");return DomUtil$o.serializeXml(this.xml(e.ownerDocument,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.annotationXml()]),this.embellished&&t.push(["embellished",this.embellished]),this.fencePointer&&t.push(["fencepointer",this.fencePointer]),t.push(["id",this.id.toString()]),t}annotationXml(){const t=[];for(const e in this.annotation)this.annotation[e].forEach((function(r){t.push(e+":"+r)}));return t.join(";")}attributesXml(){const t=[];for(const[e,r]of Object.entries(this.attributes))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,semantic_attr_1$1.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;t<r;t++){const r=e[t].split(":");this.addAnnotation(r[0],r[1])}}meaning(){return{type:this.type,role:this.role,font:this.font}}xmlAttributes(t){const e=this.allAttributes();for(let r,n=0;r=e[n];n++)t.setAttribute(r[0],r[1]);this.addExternalAttributes(t)}addExternalAttributes(t){for(const e in this.attributes)t.setAttribute(e,this.attributes[e])}parseAttributes(t){if(!t)return;const e=t.split(";");for(let t=0,r=e.length;t<r;t++){const[r,n]=e[t].split(":");r&&(this.attributes[r]=n)}}removeMathmlNodes(t){const e=this.mathml;for(let r,n=0;r=t[n];n++){const t=e.indexOf(r);-1!==t&&e.splice(t,1)}this.mathml=e}displayTree_(t){t++;const e=Array(t).join(" ");let r="";r+="\n"+e+this.toString(),r+="\n"+e+"MathmlTree:",r+="\n"+e+this.mathmlTreeString(),r+="\n"+e+"MathML:";for(let t,n=0;t=this.mathml[n];n++)r+="\n"+e+t.toString();return r+="\n"+e+"Begin Content",this.contentNodes.forEach((function(e){r+=e.displayTree_(t)})),r+="\n"+e+"End Content",r+="\n"+e+"Begin Children",this.childNodes.forEach((function(e){r+=e.displayTree_(t)})),r+="\n"+e+"End Children",r}mathmlTreeString(){return this.mathmlTree?this.mathmlTree.toString():"EMPTY"}addAnnotation_(t,e){const r=this.annotation[t];r?r.push(e):this.annotation[t]=[e]}}semantic_node.SemanticNode=SemanticNode,Object.defineProperty(semantic_node_factory,"__esModule",{value:!0}),semantic_node_factory.SemanticNodeFactory=void 0;const semantic_default_1=semantic_default,semantic_default_2=semantic_default,semantic_node_1$2=semantic_node;class SemanticNodeFactory{constructor(){this.leafMap=new semantic_default_2.SemanticNodeCollator,this.defaultMap=new semantic_default_1.SemanticDefault,this.idCounter_=-1}makeNode(t){return this.createNode_(t)}makeUnprocessed(t){const e=this.createNode_();return e.mathml=[t],e.mathmlTree=t,e}makeEmptyNode(){const t=this.createNode_();return t.type="empty",t}makeContentNode(t){const e=this.createNode_();return e.updateContent(t),e}makeMultipleContentNodes(t,e){const r=[];for(let n=0;n<t;n++)r.push(this.makeContentNode(e));return r}makeLeafNode(t,e){if(!t)return this.makeEmptyNode();const r=this.makeContentNode(t);r.font=e||r.font;const n=this.defaultMap.retrieveNode(r);return n&&(r.type=n.type,r.role=n.role,r.font=n.font),this.leafMap.addNode(r),r}makeBranchNode(t,e,r,n){const o=this.createNode_();return n&&o.updateContent(n),o.type=t,o.childNodes=e,o.contentNodes=r,e.concat(r).forEach((function(t){t.parent=o,o.addMathmlNodes(t.mathml)})),o}createNode_(t){return void 0!==t?this.idCounter_=Math.max(this.idCounter_,t):t=++this.idCounter_,new semantic_node_1$2.SemanticNode(t)}}semantic_node_factory.SemanticNodeFactory=SemanticNodeFactory;var semantic_pred={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isMembership=t.elligibleRightNeutral=t.elligibleLeftNeutral=t.compareNeutralFences=t.isNeutralFence=t.isImplicitOp=t.isImplicit=t.isPureUnit=t.isUnitCounter=t.isNumber=t.isSingletonSetContent=t.scriptedElement_=t.illegalSingleton_=t.isSetNode=t.isRightBrace=t.isLeftBrace=t.isSimpleFunction=t.singlePunctAtPosition=t.isSimpleFunctionHead=t.isLimitBase=t.isBinomial=t.lineIsLabelled=t.tableIsMultiline=t.tableIsCases=t.isFencedElement=t.tableIsMatrixOrVector=t.isTableOrMultiline=t.isElligibleEmbellishedFence=t.isFence=t.isPunctuation=t.isRelation=t.isOperator=t.isEmbellished=t.isGeneralFunctionBoundary=t.isIntegralDxBoundarySingle=t.isIntegralDxBoundary=t.isBigOpBoundary=t.isPrefixFunctionBoundary=t.isSimpleFunctionScope=t.isAccent=t.isRole=t.embellishedType=t.isType=void 0;const e=semantic_attr,r=semantic_util;function n(t,e){return t.type===e}function o(t,e){return t.embellished===e}function i(t,e){return t.role===e}function a(t){return l(t)||c(t)}function s(t){return n(t,"operator")||o(t,"operator")}function l(t){return n(t,"relation")||o(t,"relation")}function c(t){return n(t,"punctuation")||o(t,"punctuation")}function u(t){return n(t,"fence")||o(t,"fence")}function d(t){return!t.embellished||!function(t){return n(t,"tensor")&&(!n(t.childNodes[1],"empty")||!n(t.childNodes[2],"empty"))&&(!n(t.childNodes[3],"empty")||!n(t.childNodes[4],"empty"))}(t)&&((!i(t,"close")||!n(t,"tensor"))&&((!i(t,"open")||!n(t,"subscript")&&!n(t,"superscript"))&&d(t.childNodes[0])))}function p(t){return!!t&&(n(t,"table")||n(t,"multiline"))}function m(t){return!!t&&n(t,"fenced")&&(i(t,"leftright")||g(t))&&1===t.childNodes.length}function h(t){return!!t&&-1!==["{","﹛","{"].indexOf(t.textContent)}function f(t){return!!t&&-1!==["}","﹜","}"].indexOf(t.textContent)}function _(t){return"number"===t.type&&("integer"===t.role||"float"===t.role)}function g(t){return"neutral"===t.role||"metric"===t.role}t.isType=n,t.embellishedType=o,t.isRole=i,t.isAccent=function(t){const r=new RegExp("∞|᪲");return n(t,"fence")||n(t,"punctuation")||n(t,"operator")&&!t.textContent.match(r)||n(t,"relation")||n(t,"identifier")&&i(t,"unknown")&&!t.textContent.match(e.allLettersRegExp)&&!t.textContent.match(r)},t.isSimpleFunctionScope=function(t){const e=t.childNodes;if(0===e.length)return!0;if(e.length>1)return!1;const r=e[0];if("infixop"===r.type){if("implicit"!==r.role)return!1;if(r.childNodes.some((t=>n(t,"infixop"))))return!1}return!0},t.isPrefixFunctionBoundary=function(t){return s(t)&&!i(t,"division")||n(t,"appl")||a(t)},t.isBigOpBoundary=function(t){return s(t)||a(t)},t.isIntegralDxBoundary=function(t,r){return!!r&&n(r,"identifier")&&e.lookupSecondary("d",t.textContent)},t.isIntegralDxBoundarySingle=function(t){if(n(t,"identifier")){const r=t.textContent[0];return r&&t.textContent[1]&&e.lookupSecondary("d",r)}return!1},t.isGeneralFunctionBoundary=a,t.isEmbellished=function(t){return t.embellished?t.embellished:e.isEmbellishedType(t.type)?t.type:null},t.isOperator=s,t.isRelation=l,t.isPunctuation=c,t.isFence=u,t.isElligibleEmbellishedFence=function(t){return!(!t||!u(t))&&(!t.embellished||d(t))},t.isTableOrMultiline=p,t.tableIsMatrixOrVector=function(t){return!!t&&m(t)&&p(t.childNodes[0])},t.isFencedElement=m,t.tableIsCases=function(t,e){return e.length>0&&i(e[e.length-1],"openfence")},t.tableIsMultiline=function(t){return t.childNodes.every((function(t){return t.childNodes.length<=1}))},t.lineIsLabelled=function(t){return n(t,"line")&&t.contentNodes.length&&i(t.contentNodes[0],"label")},t.isBinomial=function(t){return 2===t.childNodes.length},t.isLimitBase=function t(e){return n(e,"largeop")||n(e,"limboth")||n(e,"limlower")||n(e,"limupper")||n(e,"function")&&i(e,"limit function")||(n(e,"overscore")||n(e,"underscore"))&&t(e.childNodes[0])},t.isSimpleFunctionHead=function(t){return"identifier"===t.type||"latinletter"===t.role||"greekletter"===t.role||"otherletter"===t.role},t.singlePunctAtPosition=function(t,e,r){return 1===e.length&&("punctuation"===t[r].type||"punctuation"===t[r].embellished)&&t[r]===e[0]},t.isSimpleFunction=function(t){return n(t,"identifier")&&i(t,"simple function")},t.isLeftBrace=h,t.isRightBrace=f,t.isSetNode=function(t){return h(t.contentNodes[0])&&f(t.contentNodes[1])},t.illegalSingleton_=["punctuation","punctuated","relseq","multirel","table","multiline","cases","inference"],t.scriptedElement_=["limupper","limlower","limboth","subscript","superscript","underscore","overscore","tensor"],t.isSingletonSetContent=function e(r){const n=r.type;return-1===t.illegalSingleton_.indexOf(n)&&("infixop"!==n||"implicit"===r.role)&&("fenced"===n?"leftright"!==r.role||e(r.childNodes[0]):-1===t.scriptedElement_.indexOf(n)||e(r.childNodes[0]))},t.isNumber=_,t.isUnitCounter=function(t){return _(t)||"vulgar"===t.role||"mixed"===t.role},t.isPureUnit=function(t){const e=t.childNodes;return"unit"===t.role&&(!e.length||"unit"===e[0].role)},t.isImplicit=function(t){return"implicit"===t.role||"unit"===t.role&&!!t.contentNodes.length&&t.contentNodes[0].textContent===e.invisibleTimes()},t.isImplicitOp=function(t){return"infixop"===t.type&&"implicit"===t.role},t.isNeutralFence=g,t.compareNeutralFences=function(t,e){return g(t)&&g(e)&&(0,r.getEmbellishedInner)(t).textContent===(0,r.getEmbellishedInner)(e).textContent},t.elligibleLeftNeutral=function(t){return!!g(t)&&(!t.embellished||"superscript"!==t.type&&"subscript"!==t.type&&("tensor"!==t.type||"empty"===t.childNodes[3].type&&"empty"===t.childNodes[4].type))},t.elligibleRightNeutral=function(t){return!!g(t)&&(!t.embellished||("tensor"!==t.type||"empty"===t.childNodes[1].type&&"empty"===t.childNodes[2].type))},t.isMembership=function(t){return["element","nonelement","reelement","renonelement"].includes(t.role)}}(semantic_pred),getDefaultExportFromCjs(semantic_pred),Object.defineProperty(semantic_processor,"__esModule",{value:!0});const DomUtil$n=dom_util,SemanticAttr$1=semantic_attr,SemanticHeuristics$1=semantic_heuristic_factory,semantic_node_factory_1$2=semantic_node_factory,SemanticPred$3=semantic_pred,SemanticUtil$2=semantic_util;class SemanticProcessor{constructor(){this.funcAppls={},this.factory_=new semantic_node_factory_1$2.SemanticNodeFactory,SemanticHeuristics$1.updateFactory(this.factory_)}static getInstance(){return SemanticProcessor.instance=SemanticProcessor.instance||new SemanticProcessor,SemanticProcessor.instance}static tableToMultiline(t){if(SemanticPred$3.tableIsMultiline(t)){t.type="multiline";for(let e,r=0;e=t.childNodes[r];r++)SemanticProcessor.rowToLine_(e,"multiline");1===t.childNodes.length&&!SemanticPred$3.lineIsLabelled(t.childNodes[0])&&SemanticPred$3.isFencedElement(t.childNodes[0].childNodes[0])&&SemanticProcessor.tableToMatrixOrVector_(SemanticProcessor.rewriteFencedLine_(t)),SemanticProcessor.binomialForm_(t),SemanticProcessor.classifyMultiline(t)}else SemanticProcessor.classifyTable(t)}static number(t){"unknown"!==t.type&&"identifier"!==t.type||(t.type="number"),SemanticProcessor.numberRole_(t),SemanticProcessor.exprFont_(t)}static classifyMultiline(t){let e=0;const r=t.childNodes.length;let n;for(;e<r&&(!(n=t.childNodes[e])||!n.childNodes.length);)e++;if(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&&(SemanticPred$3.isType(e,"relation")||SemanticPred$3.isType(e,"relseq"))}))&&(t.role=o)}static classifyTable(t){const e=SemanticProcessor.computeColumns_(t);SemanticProcessor.classifyByColumns_(t,e,"equality")||SemanticProcessor.classifyByColumns_(t,e,"inequality",["equality"])||SemanticProcessor.classifyByColumns_(t,e,"arrow")||SemanticProcessor.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)&&(!(!SemanticProcessor.cayleySpacing(r)||!SemanticProcessor.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=SemanticProcessor.separateSemantics(e);return SemanticProcessor.getInstance().proof(t,n,r)}static findSemantics(t,e,r){const n=null==r?null:r,o=SemanticProcessor.getSemantics(t);return!!o&&(!!o[e]&&(null==n||o[e]===n))}static getSemantics(t){const e=t.getAttribute("semantics");return e?SemanticProcessor.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[SemanticProcessor.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 a=SemanticProcessor.getSpacer_(i);a&&(r.mathml.push(a),r.mathmlTree=a,r.role="space")}}static getSpacer_(t){if("MSPACE"===DomUtil$n.tagName(t))return t;for(;SemanticUtil$2.hasEmptyTag(t)&&1===t.childNodes.length;)if(t=t.childNodes[0],"MSPACE"===DomUtil$n.tagName(t))return t;return null}static fenceToPunct_(t){const e=SemanticProcessor.FENCE_TO_PUNCT_[t.role];if(e){for(;t.embellished;)t.embellished="punctuation",SemanticPred$3.isRole(t,"subsup")||SemanticPred$3.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===SemanticAttr$1.functionApplication()){SemanticProcessor.getInstance().funcAppls[t.id]=e.shift();let r="simple function";return SemanticHeuristics$1.run("simple2prefix",t),"prefix function"!==t.role&&"limit function"!==t.role||(r=t.role),SemanticProcessor.propagateFunctionRole_(t,r),"prefix"}const r=SemanticProcessor.CLASSIFY_FUNCTION_[t.role];return r||(SemanticPred$3.isSimpleFunctionHead(t)?"simple":"")}static propagateFunctionRole_(t,e){if(t){if("infixop"===t.type)return;SemanticPred$3.isRole(t,"subsup")||SemanticPred$3.isRole(t,"underover")||(t.role=e),SemanticProcessor.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=SemanticProcessor.getFunctionOp_(r,e);if(t)return t}return null}static tableToMatrixOrVector_(t){const e=t.childNodes[0];SemanticPred$3.isType(e,"multiline")?SemanticProcessor.tableToVector_(t):SemanticProcessor.tableToMatrix_(t),t.contentNodes.forEach(e.appendContentNode.bind(e));for(let t,r=0;t=e.childNodes[r];r++)SemanticProcessor.assignRoleToRow_(t,SemanticProcessor.getComponentRoles_(e));return e.parent=null,e}static tableToVector_(t){const e=t.childNodes[0];e.type="vector",1!==e.childNodes.length?SemanticProcessor.binomialForm_(e):SemanticProcessor.tableToSquare_(t)}static binomialForm_(t){SemanticPred$3.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?SemanticProcessor.tableToSquare_(t):e.childNodes&&1===e.childNodes.length&&(e.role="rowvector")}static tableToSquare_(t){const e=t.childNodes[0];SemanticPred$3.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++)SemanticProcessor.assignRoleToRow_(e,"cases");return t.type="cases",t.appendContentNode(e),SemanticPred$3.tableIsMultiline(t)&&SemanticProcessor.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";SemanticPred$3.isType(t,"row")&&(t.type="line",t.role=r,1===t.childNodes.length&&SemanticPred$3.isType(t.childNodes[0],"cell")&&(t.childNodes=t.childNodes[0].childNodes,t.childNodes.forEach((function(e){e.parent=t}))))}static assignRoleToRow_(t,e){SemanticPred$3.isType(t,"line")?t.role=e:SemanticPred$3.isType(t,"row")&&(t.role=e,t.childNodes.forEach((function(t){SemanticPred$3.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(SemanticAttr$1.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(SemanticAttr$1.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();SemanticPred$3.isElligibleEmbellishedFence(t)?(n.push(t),o.push(i)):(SemanticProcessor.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=SemanticProcessor.rewriteFence_(t,e);return t.contentNodes[0]=n.fence,n=SemanticProcessor.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=SemanticProcessor.rewriteFence_(t,r);return SemanticPred$3.isType(e,"superscript")||SemanticPred$3.isType(e,"subscript")||SemanticPred$3.isType(e,"tensor")?(SemanticPred$3.isRole(e,"subsup")||(e.role=t.role),r!==n.node&&(e.replaceChild(r,n.node),r.parent=t),SemanticProcessor.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&&SemanticProcessor.testColumns_(e,1,(t=>SemanticProcessor.isPureRelation_(t,r)))||2===e.length&&(SemanticProcessor.testColumns_(e,1,(t=>SemanticProcessor.isEndRelation_(t,r)||SemanticProcessor.isPureRelation_(t,r)))||SemanticProcessor.testColumns_(e,0,(t=>SemanticProcessor.isEndRelation_(t,r,!0)||SemanticProcessor.isPureRelation_(t,r)))))&&(t.role=r,!0)}static isEndRelation_(t,e,r){const n=r?t.childNodes.length-1:0;return SemanticPred$3.isType(t,"relseq")&&SemanticPred$3.isRole(t,e)&&SemanticPred$3.isType(t.childNodes[n],"empty")}static isPureRelation_(t,e){return SemanticPred$3.isType(t,"relation")&&SemanticPred$3.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){SemanticProcessor.getInstance().factory_=t,SemanticHeuristics$1.updateFactory(SemanticProcessor.getInstance().factory_)}getNodeFactory(){return SemanticProcessor.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",SemanticHeuristics$1.run("simpleNamedFunction",t);return"unknown"===t.type&&(t.type="identifier"),SemanticProcessor.exprFont_(t),SemanticHeuristics$1.run("simpleNamedFunction",t)}implicitNode(t){if(t=SemanticProcessor.getInstance().getMixedNumbers_(t),1===(t=SemanticProcessor.getInstance().combineUnits_(t)).length)return t[0];const e=SemanticProcessor.getInstance().implicitNode_(t);return SemanticHeuristics$1.run("combine_juxtaposition",e)}text(t,e){return SemanticProcessor.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!SemanticPred$3.isType(t,"empty")}))).length?SemanticProcessor.getInstance().factory_.makeEmptyNode():(t=SemanticProcessor.getInstance().getFencesInRow_(t),t=SemanticProcessor.getInstance().tablesInRow(t),t=SemanticProcessor.getInstance().getPunctuationInRow_(t),t=SemanticProcessor.getInstance().getTextInRow_(t),t=SemanticProcessor.getInstance().getFunctionsInRow_(t),SemanticProcessor.getInstance().relationsInRow_(t))}limitNode(t,e){if(!e.length)return SemanticProcessor.getInstance().factory_.makeEmptyNode();let r,n=e[0],o="unknown";if(!e[1])return n;if(SemanticPred$3.isLimitBase(n)){r=SemanticProcessor.MML_TO_LIMIT_[t];const i=r.length;if(o=r.type,e=e.slice(0,r.length+1),1===i&&SemanticPred$3.isAccent(e[1])||2===i&&SemanticPred$3.isAccent(e[1])&&SemanticPred$3.isAccent(e[2]))return r=SemanticProcessor.MML_TO_BOUNDS_[t],SemanticProcessor.getInstance().accentNode_(n,e,r.type,r.length,r.accent);if(2===i){if(SemanticPred$3.isAccent(e[1]))return n=SemanticProcessor.getInstance().accentNode_(n,[n,e[1]],{MSUBSUP:"subscript",MUNDEROVER:"underscore"}[t],1,!0),e[2]?SemanticProcessor.getInstance().makeLimitNode_(n,[n,e[2]],null,"limupper"):n;if(e[2]&&SemanticPred$3.isAccent(e[2]))return n=SemanticProcessor.getInstance().accentNode_(n,[n,e[2]],{MSUBSUP:"superscript",MUNDEROVER:"overscore"}[t],1,!0),SemanticProcessor.getInstance().makeLimitNode_(n,[n,e[1]],null,"limlower");e[i]||(o="limlower")}return SemanticProcessor.getInstance().makeLimitNode_(n,e,null,o)}return r=SemanticProcessor.MML_TO_BOUNDS_[t],SemanticProcessor.getInstance().accentNode_(n,e,r.type,r.length,r.accent)}tablesInRow(t){let e=SemanticUtil$2.partitionNodes(t,SemanticPred$3.tableIsMatrixOrVector),r=[];for(let t,n=0;t=e.rel[n];n++)r=r.concat(e.comp.shift()),r.push(SemanticProcessor.tableToMatrixOrVector_(t));r=r.concat(e.comp.shift()),e=SemanticUtil$2.partitionNodes(r,SemanticPred$3.isTableOrMultiline),r=[];for(let t,n=0;t=e.rel[n];n++){const n=e.comp.shift();SemanticPred$3.tableIsCases(t,n)&&SemanticProcessor.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=SemanticProcessor.nextSeparatorFunction_(r),e=[n.shift()];n.forEach((r=>{e.push(SemanticProcessor.getInstance().factory_.makeContentNode(t())),e.push(r)})),n=e}return t&&e?SemanticProcessor.getInstance().horizontalFencedNode_(SemanticProcessor.getInstance().factory_.makeContentNode(t),SemanticProcessor.getInstance().factory_.makeContentNode(e),n):(t&&n.unshift(SemanticProcessor.getInstance().factory_.makeContentNode(t)),e&&n.push(SemanticProcessor.getInstance().factory_.makeContentNode(e)),SemanticProcessor.getInstance().row(n))}fractionLikeNode(t,e,r,n){let o;if(!n&&SemanticUtil$2.isZeroLength(r)){const r=SemanticProcessor.getInstance().factory_.makeBranchNode("line",[t],[]),n=SemanticProcessor.getInstance().factory_.makeBranchNode("line",[e],[]);return o=SemanticProcessor.getInstance().factory_.makeBranchNode("multiline",[r,n],[]),SemanticProcessor.binomialForm_(o),SemanticProcessor.classifyMultiline(o),o}return o=SemanticProcessor.getInstance().fractionNode_(t,e),n&&o.addAnnotation("general","bevelled"),o}tensor(t,e,r,n,o){const i=SemanticProcessor.getInstance().factory_.makeBranchNode("tensor",[t,SemanticProcessor.getInstance().scriptNode_(e,"leftsub"),SemanticProcessor.getInstance().scriptNode_(r,"leftsuper"),SemanticProcessor.getInstance().scriptNode_(n,"rightsub"),SemanticProcessor.getInstance().scriptNode_(o,"rightsuper")],[]);return i.role=t.role,i.embellished=SemanticPred$3.isEmbellished(t),i}pseudoTensor(t,e,r){const n=t=>!SemanticPred$3.isType(t,"empty"),o=e.filter(n).length,i=r.filter(n).length;if(!o&&!i)return t;const a=o?i?"MSUBSUP":"MSUB":"MSUP",s=[t];return o&&s.push(SemanticProcessor.getInstance().scriptNode_(e,"rightsub",!0)),i&&s.push(SemanticProcessor.getInstance().scriptNode_(r,"rightsuper",!0)),SemanticProcessor.getInstance().limitNode(a,s)}font(t){const e=SemanticProcessor.MATHJAX_FONTS[t];return e||t}proof(t,e,r){if(e.inference||e.axiom||console.log("Noise"),e.axiom){const e=SemanticProcessor.getInstance().cleanInference(t.childNodes),n=e.length?SemanticProcessor.getInstance().factory_.makeBranchNode("inference",r(e),[]):SemanticProcessor.getInstance().factory_.makeEmptyNode();return n.role="axiom",n.mathmlTree=t,n}const n=SemanticProcessor.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=SemanticProcessor.getInstance().getFormulas(t,[],r);return SemanticProcessor.getInstance().factory_.makeBranchNode("inference",[e.conclusion,e.premises],[])}const n=e.labelledRule,o=DomUtil$n.toArray(t.childNodes),i=[];"left"!==n&&"both"!==n||i.push(SemanticProcessor.getInstance().getLabel(t,o,r,"left")),"right"!==n&&"both"!==n||i.push(SemanticProcessor.getInstance().getLabel(t,o,r,"right"));const a=SemanticProcessor.getInstance().getFormulas(t,o,r),s=SemanticProcessor.getInstance().factory_.makeBranchNode("inference",[a.conclusion,a.premises],i);return s.mathmlTree=t,s}getLabel(t,e,r,n){const o=SemanticProcessor.getInstance().findNestedRow(e,"prooflabel",n),i=SemanticProcessor.getInstance().factory_.makeBranchNode("rulelabel",r(DomUtil$n.toArray(o.childNodes)),[]);return i.role=n,i.mathmlTree=o,i}getFormulas(t,e,r){const n=e.length?SemanticProcessor.getInstance().findNestedRow(e,"inferenceRule"):t,o="up"===SemanticProcessor.getSemantics(n).inferenceRule,i=o?n.childNodes[1]:n.childNodes[0],a=o?n.childNodes[0]:n.childNodes[1],s=i.childNodes[0].childNodes[0],l=DomUtil$n.toArray(s.childNodes[0].childNodes),c=[];let u=1;for(const t of l)u%2&&c.push(t.childNodes[0]),u++;const d=r(c),p=r(DomUtil$n.toArray(a.childNodes[0].childNodes))[0],m=SemanticProcessor.getInstance().factory_.makeBranchNode("premises",d,[]);m.mathmlTree=s;const h=SemanticProcessor.getInstance().factory_.makeBranchNode("conclusion",[p],[]);return h.mathmlTree=a.childNodes[0].childNodes[0],{conclusion:h,premises:m}}findNestedRow(t,e,r){return SemanticProcessor.getInstance().findNestedRow_(t,e,0,r)}cleanInference(t){return DomUtil$n.toArray(t).filter((function(t){return"MSPACE"!==DomUtil$n.tagName(t)}))}operatorNode(t){return"unknown"===t.type&&(t.type="operator"),SemanticHeuristics$1.run("multioperator",t)}implicitNode_(t){const e=SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(t.length-1,SemanticAttr$1.invisibleTimes());SemanticProcessor.matchSpaces_(t,e);const r=SemanticProcessor.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=SemanticProcessor.getInstance().factory_.makeBranchNode("infixop",t,[e],SemanticUtil$2.getEmbellishedInner(e).textContent);return r.role=e.role,SemanticHeuristics$1.run("propagateSimpleFunction",r)}explicitMixed_(t){const e=SemanticUtil$2.partitionNodes(t,(function(t){return t.textContent===SemanticAttr$1.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],a=o.length-1;if(o[a]&&i[0]&&SemanticPred$3.isType(o[a],"number")&&!SemanticPred$3.isRole(o[a],"mixed")&&SemanticPred$3.isType(i[0],"fraction")){const t=SemanticProcessor.getInstance().factory_.makeBranchNode("number",[o[a],i[0]],[]);t.role="mixed",r=r.concat(o.slice(0,a)),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 SemanticUtil$2.getEmbellishedInner(t).textContent})).join(" "),o=SemanticProcessor.getInstance().factory_.makeBranchNode(r,[t],e,n);return e.length>1&&(o.role="multiop"),o}prefixNode_(t,e){const r=SemanticUtil$2.partitionNodes(e,(t=>SemanticPred$3.isRole(t,"subtraction")));let n=SemanticProcessor.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=SemanticProcessor.getInstance().concatNode_(n,[r.rel.pop()],"prefixop"),n.role="negative",n=SemanticProcessor.getInstance().concatNode_(n,r.comp.pop(),"prefixop");return n}postfixNode_(t,e){return e.length?SemanticProcessor.getInstance().concatNode_(t,e,"postfixop"):t}combineUnits_(t){const e=SemanticUtil$2.partitionNodes(t,(function(t){return!SemanticPred$3.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&&SemanticPred$3.isUnitCounter(o)?t.unshift(o):r.push(o)),1===t.length&&(i=t.pop()),t.length>1&&(i=SemanticProcessor.getInstance().implicitNode_(t),i.role="unit"),i&&r.push(i),n&&r.push(n)}while(n);return r}getMixedNumbers_(t){const e=SemanticUtil$2.partitionNodes(t,(function(t){return SemanticPred$3.isType(t,"fraction")&&SemanticPred$3.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]&&SemanticPred$3.isType(o[i],"number")&&(SemanticPred$3.isRole(o[i],"integer")||SemanticPred$3.isRole(o[i],"float"))){const e=SemanticProcessor.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=SemanticUtil$2.partitionNodes(t,(t=>SemanticPred$3.isType(t,"text")));if(0===e.rel.length)return t;const r=[];let n=e.comp[0];n.length>0&&r.push(SemanticProcessor.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(SemanticProcessor.getInstance().row(n));return[SemanticProcessor.getInstance().dummyNode_(r)]}relationsInRow_(t){const e=SemanticUtil$2.partitionNodes(t,SemanticPred$3.isRelation),r=e.rel[0];if(!r)return SemanticProcessor.getInstance().operationsInRow_(t);if(1===t.length)return t[0];const n=e.comp.map(SemanticProcessor.getInstance().operationsInRow_);let o;return e.rel.some((function(t){return!t.equals(r)}))?(o=SemanticProcessor.getInstance().factory_.makeBranchNode("multirel",n,e.rel),e.rel.every((function(t){return t.role===r.role}))&&(o.role=r.role),o):(o=SemanticProcessor.getInstance().factory_.makeBranchNode("relseq",n,e.rel,SemanticUtil$2.getEmbellishedInner(r).textContent),o.role=r.role,o)}operationsInRow_(t){if(0===t.length)return SemanticProcessor.getInstance().factory_.makeEmptyNode();if(1===(t=SemanticProcessor.getInstance().explicitMixed_(t)).length)return t[0];const e=[];for(;t.length>0&&SemanticPred$3.isOperator(t[0]);)e.push(t.shift());if(0===t.length)return SemanticProcessor.getInstance().prefixNode_(e.pop(),e);if(1===t.length)return SemanticProcessor.getInstance().prefixNode_(t[0],e);t=SemanticHeuristics$1.run("convert_juxtaposition",t);const r=SemanticUtil$2.sliceNodes(t,SemanticPred$3.isOperator),n=SemanticProcessor.getInstance().prefixNode_(SemanticProcessor.getInstance().implicitNode(r.head),e);return r.div?SemanticProcessor.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=SemanticProcessor.getInstance().postfixNode_(e.childNodes.pop(),o);return e.appendChild(t),e}return SemanticProcessor.getInstance().postfixNode_(e,o)}const i=SemanticUtil$2.sliceNodes(t,SemanticPred$3.isOperator);if(0===i.head.length)return o.push(i.div),SemanticProcessor.getInstance().operationsTree_(i.tail,e,r,o);const a=SemanticProcessor.getInstance().prefixNode_(SemanticProcessor.getInstance().implicitNode(i.head),o),s=SemanticProcessor.getInstance().appendOperand_(e,r,a);return i.div?SemanticProcessor.getInstance().operationsTree_(i.tail,s,i.div,[]):s}appendOperand_(t,e,r){if("infixop"!==t.type)return SemanticProcessor.getInstance().infixNode_([t,r],e);const n=SemanticProcessor.getInstance().appendDivisionOp_(t,e,r);return n||(SemanticProcessor.getInstance().appendExistingOperator_(t,e,r)?t:"multiplication"===e.role?SemanticProcessor.getInstance().appendMultiplicativeOp_(t,e,r):SemanticProcessor.getInstance().appendAdditiveOp_(t,e,r))}appendDivisionOp_(t,e,r){return"division"===e.role?SemanticPred$3.isImplicit(t)?SemanticProcessor.getInstance().infixNode_([t,r],e):SemanticProcessor.getInstance().appendLastOperand_(t,e,r):"division"===t.role?SemanticProcessor.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&&!SemanticPred$3.isImplicit(o);)n=o,o=n.childNodes[t.childNodes.length-1];const i=SemanticProcessor.getInstance().infixNode_([n.childNodes.pop(),r],e);return n.appendChild(i),t}appendMultiplicativeOp_(t,e,r){if(SemanticPred$3.isImplicit(t))return SemanticProcessor.getInstance().infixNode_([t,r],e);let n=t,o=t.childNodes[t.childNodes.length-1];for(;o&&"infixop"===o.type&&!SemanticPred$3.isImplicit(o);)n=o,o=n.childNodes[t.childNodes.length-1];const i=SemanticProcessor.getInstance().infixNode_([n.childNodes.pop(),r],e);return n.appendChild(i),t}appendAdditiveOp_(t,e,r){return SemanticProcessor.getInstance().infixNode_([t,r],e)}appendExistingOperator_(t,e,r){return!(!t||"infixop"!==t.type||SemanticPred$3.isImplicit(t))&&(t.contentNodes[0].equals(e)?(t.appendContentNode(e),t.appendChild(r),!0):SemanticProcessor.getInstance().appendExistingOperator_(t.childNodes[t.childNodes.length-1],e,r))}getFencesInRow_(t){let e=SemanticUtil$2.partitionNodes(t,SemanticPred$3.isFence);e=SemanticProcessor.purgeFences_(e);const r=e.comp.shift();return SemanticProcessor.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=>SemanticPred$3.isRole(t,"open");if(0===t.length){const t=n.shift();for(;r.length>0;){if(o(r[0])){const e=r.shift();SemanticProcessor.fenceToPunct_(e),t.push(e)}else{const e=SemanticUtil$2.sliceNodes(r,o),i=e.head.length-1,a=SemanticProcessor.getInstance().neutralFences_(e.head,n.slice(0,i));n=n.slice(i),t.push(...a),e.div&&e.tail.unshift(e.div),r=e.tail}t.push(...n.shift())}return t}const i=r[r.length-1],a=t[0].role;if("open"===a||SemanticPred$3.isNeutralFence(t[0])&&(!i||!SemanticPred$3.compareNeutralFences(t[0],i))){r.push(t.shift());const o=e.shift();return o&&n.push(o),SemanticProcessor.getInstance().fences_(t,e,r,n)}if(i&&"close"===a&&"open"===i.role){const o=SemanticProcessor.getInstance().horizontalFencedNode_(r.pop(),t.shift(),n.pop());return n.push(n.pop().concat([o],e.shift())),SemanticProcessor.getInstance().fences_(t,e,r,n)}if(i&&SemanticPred$3.compareNeutralFences(t[0],i)){if(!SemanticPred$3.elligibleLeftNeutral(i)||!SemanticPred$3.elligibleRightNeutral(t[0])){r.push(t.shift());const o=e.shift();return o&&n.push(o),SemanticProcessor.getInstance().fences_(t,e,r,n)}const o=SemanticProcessor.getInstance().horizontalFencedNode_(r.pop(),t.shift(),n.pop());return n.push(n.pop().concat([o],e.shift())),SemanticProcessor.getInstance().fences_(t,e,r,n)}if(i&&"close"===a&&SemanticPred$3.isNeutralFence(i)&&r.some(o)){const i=SemanticUtil$2.sliceNodes(r,o,!0),a=n.pop(),s=n.length-i.tail.length+1,l=SemanticProcessor.getInstance().neutralFences_(i.tail,n.slice(s));n=n.slice(0,s);const c=SemanticProcessor.getInstance().horizontalFencedNode_(i.div,t.shift(),n.pop().concat(l,a));return n.push(n.pop().concat([c],e.shift())),SemanticProcessor.getInstance().fences_(t,e,i.head,n)}const s=t.shift();return SemanticProcessor.fenceToPunct_(s),n.push(n.pop().concat([s],e.shift())),SemanticProcessor.getInstance().fences_(t,e,r,n)}neutralFences_(t,e){if(0===t.length)return t;if(1===t.length)return SemanticProcessor.fenceToPunct_(t[0]),t;const r=t.shift();if(!SemanticPred$3.elligibleLeftNeutral(r)){SemanticProcessor.fenceToPunct_(r);const n=e.shift();return n.unshift(r),n.concat(SemanticProcessor.getInstance().neutralFences_(t,e))}const n=SemanticUtil$2.sliceNodes(t,(function(t){return SemanticPred$3.compareNeutralFences(t,r)}));if(!n.div){SemanticProcessor.fenceToPunct_(r);const n=e.shift();return n.unshift(r),n.concat(SemanticProcessor.getInstance().neutralFences_(t,e))}if(!SemanticPred$3.elligibleRightNeutral(n.div))return SemanticProcessor.fenceToPunct_(n.div),t.unshift(r),SemanticProcessor.getInstance().neutralFences_(t,e);const o=SemanticProcessor.getInstance().combineFencedContent_(r,n.div,n.head,e);if(n.tail.length>0){const t=o.shift(),e=SemanticProcessor.getInstance().neutralFences_(n.tail,o);return t.concat(e)}return o[0]}combineFencedContent_(t,e,r,n){if(0===r.length){const r=SemanticProcessor.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,a=n.slice(0,i),s=(n=n.slice(i)).shift(),l=SemanticProcessor.getInstance().neutralFences_(r,a);o.push(...l),o.push(...s);const c=SemanticProcessor.getInstance().horizontalFencedNode_(t,e,o);return n.length>0?n[0].unshift(c):n=[[c]],n}horizontalFencedNode_(t,e,r){const n=SemanticProcessor.getInstance().row(r);let o=SemanticProcessor.getInstance().factory_.makeBranchNode("fenced",[n],[t,e]);return"open"===t.role?(SemanticProcessor.getInstance().classifyHorizontalFence_(o),o=SemanticHeuristics$1.run("propagateComposedFunction",o)):o.role=t.role,o=SemanticHeuristics$1.run("detect_cycle",o),SemanticProcessor.rewriteFencedNode_(o)}classifyHorizontalFence_(t){t.role="leftright";const e=t.childNodes;if(!SemanticPred$3.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&&SemanticPred$3.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 SemanticProcessor.getInstance().setExtension_(t));t.role="set collection"}}setExtension_(t){const e=t.childNodes[0].childNodes[0];e&&"infixop"===e.type&&1===e.contentNodes.length&&SemanticPred$3.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=SemanticUtil$2.partitionNodes(t,(function(r){if(!SemanticPred$3.isPunctuation(r))return!1;if(SemanticPred$3.isPunctuation(r)&&!SemanticPred$3.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(SemanticProcessor.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(SemanticProcessor.getInstance().row(o));return[SemanticProcessor.getInstance().punctuatedNode_(n,r.rel)]}punctuatedNode_(t,e){const r=SemanticProcessor.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 SemanticPred$3.singlePunctAtPosition(t,e,0)?r.role="startpunct":SemanticPred$3.singlePunctAtPosition(t,e,t.length-1)?r.role="endpunct":e.every((t=>SemanticPred$3.isRole(t,"dummy")))?r.role="text":e.every((t=>SemanticPred$3.isRole(t,"space")))?r.role="space":r.role="sequence",r}dummyNode_(t){const e=SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(t.length-1,SemanticAttr$1.invisibleComma());return e.forEach((function(t){t.role="dummy"})),SemanticProcessor.getInstance().punctuatedNode_(t,e)}accentRole_(t,e){if(!SemanticPred$3.isAccent(t))return!1;const r=t.textContent,n=SemanticAttr$1.lookupSecondary("bar",r)||SemanticAttr$1.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],a=e[2];let s;if(!o&&a&&(s=SemanticProcessor.getInstance().factory_.makeBranchNode("subscript",[t,i],[]),s.role="subsup",e=[s,a],r="superscript"),o){const n=SemanticProcessor.getInstance().accentRole_(i,r);if(a){SemanticProcessor.getInstance().accentRole_(a,"overscore")&&!n?(s=SemanticProcessor.getInstance().factory_.makeBranchNode("overscore",[t,a],[]),e=[s,i],r="underscore"):(s=SemanticProcessor.getInstance().factory_.makeBranchNode("underscore",[t,i],[]),e=[s,a],r="overscore"),s.role="underover"}}return SemanticProcessor.getInstance().makeLimitNode_(t,e,s,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=SemanticProcessor.getInstance().factory_.makeBranchNode(n,e,[]),i=SemanticPred$3.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=SemanticProcessor.classifyFunction_(n,t);if(!o)return r.push(n),SemanticProcessor.getInstance().getFunctionsInRow_(t,r);const i=SemanticProcessor.getInstance().getFunctionsInRow_(t,[]),a=SemanticProcessor.getInstance().getFunctionArgs_(n,i,o);return r.concat(a)}getFunctionArgs_(t,e,r){let n,o,i;switch(r){case"integral":{const r=SemanticProcessor.getInstance().getIntegralArgs_(e);if(!r.intvar&&!r.integrand.length)return r.rest.unshift(t),r.rest;const n=SemanticProcessor.getInstance().row(r.integrand);return i=SemanticProcessor.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 SemanticPred$3.isNeutralFence(r)||(r.role="leftright"),i=SemanticProcessor.getInstance().functionNode_(t,r),e.unshift(i),e}if(n=SemanticUtil$2.sliceNodes(e,SemanticPred$3.isPrefixFunctionBoundary),n.head.length)o=SemanticProcessor.getInstance().row(n.head),n.div&&n.tail.unshift(n.div);else{if(!n.div||!SemanticPred$3.isType(n.div,"appl"))return e.unshift(t),e;o=n.div}return i=SemanticProcessor.getInstance().functionNode_(t,o),n.tail.unshift(i),n.tail;case"bigop":return n=SemanticUtil$2.sliceNodes(e,SemanticPred$3.isBigOpBoundary),n.head.length?(o=SemanticProcessor.getInstance().row(n.head),i=SemanticProcessor.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&&!SemanticPred$3.isNeutralFence(r)&&SemanticPred$3.isSimpleFunctionScope(r)?(r.role="leftright",SemanticProcessor.propagateFunctionRole_(t,"simple function"),i=SemanticProcessor.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(SemanticPred$3.isGeneralFunctionBoundary(r))return{integrand:e,intvar:null,rest:t};if(SemanticPred$3.isIntegralDxBoundarySingle(r))return r.role="integral",{integrand:e,intvar:r,rest:t.slice(1)};if(t[1]&&SemanticPred$3.isIntegralDxBoundary(r,t[1])){const n=SemanticProcessor.getInstance().prefixNode_(t[1],[r]);return n.role="integral",{integrand:e,intvar:n,rest:t.slice(2)}}return e.push(t.shift()),SemanticProcessor.getInstance().getIntegralArgs_(t,e)}functionNode_(t,e){const r=SemanticProcessor.getInstance().factory_.makeContentNode(SemanticAttr$1.functionApplication()),n=SemanticProcessor.getInstance().funcAppls[t.id];n&&(r.mathmlTree=n.mathmlTree,r.mathml=n.mathml,r.annotation=n.annotation,r.attributes=n.attributes,delete SemanticProcessor.getInstance().funcAppls[t.id]),r.type="punctuation",r.role="application";const o=SemanticProcessor.getFunctionOp_(t,(function(t){return SemanticPred$3.isType(t,"function")||SemanticPred$3.isType(t,"identifier")&&SemanticPred$3.isRole(t,"simple function")}));return SemanticProcessor.getInstance().functionalNode_("appl",[t,e],o,[r])}bigOpNode_(t,e){const r=SemanticProcessor.getFunctionOp_(t,(t=>SemanticPred$3.isType(t,"largeop")));return SemanticProcessor.getInstance().functionalNode_("bigop",[t,e],r,[])}integralNode_(t,e,r){e=e||SemanticProcessor.getInstance().factory_.makeEmptyNode(),r=r||SemanticProcessor.getInstance().factory_.makeEmptyNode();const n=SemanticProcessor.getFunctionOp_(t,(t=>SemanticPred$3.isType(t,"largeop")));return SemanticProcessor.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 a=SemanticProcessor.getInstance().factory_.makeBranchNode(t,e,n);return a.role=o.role,i&&(r.parent=i),a}fractionNode_(t,e){const r=SemanticProcessor.getInstance().factory_.makeBranchNode("fraction",[t,e],[]);return r.role=r.childNodes.every((function(t){return SemanticPred$3.isType(t,"number")&&SemanticPred$3.isRole(t,"integer")}))?"vulgar":r.childNodes.every(SemanticPred$3.isPureUnit)?"unit":"division",SemanticHeuristics$1.run("propagateSimpleFunction",r)}scriptNode_(t,e,r){let n;switch(t.length){case 0:n=SemanticProcessor.getInstance().factory_.makeEmptyNode();break;case 1:if(n=t[0],r)return n;break;default:n=SemanticProcessor.getInstance().dummyNode_(t)}return n.role=e,n}findNestedRow_(t,e,r,n){if(r>3)return null;for(let o,i=0;o=t[i];i++){const t=DomUtil$n.tagName(o);if("MSPACE"!==t){if("MROW"===t)return SemanticProcessor.getInstance().findNestedRow_(DomUtil$n.toArray(o.childNodes),e,r+1,n);if(SemanticProcessor.findSemantics(o,e,n))return o}}return null}}semantic_processor.default=SemanticProcessor,SemanticProcessor.FENCE_TO_PUNCT_={metric:"metric",neutral:"vbar",open:"openfence",close:"closefence"},SemanticProcessor.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}},SemanticProcessor.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}},SemanticProcessor.CLASSIFY_FUNCTION_={integral:"integral",sum:"bigop","prefix function":"prefix","limit function":"prefix","simple function":"prefix","composed function":"prefix"},SemanticProcessor.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"},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.smallRoot=t.generateTensorRules=t.removeParens=t.generateBaselineConstraint=t.determinantIsSimple=t.nestedOverscript=t.endscripts=t.overscoreNestingDepth=t.nestedUnderscript=t.underscoreNestingDepth=t.indexRadicalSbrief=t.openingRadicalSbrief=t.indexRadicalBrief=t.closingRadicalBrief=t.openingRadicalBrief=t.indexRadicalVerbose=t.closingRadicalVerbose=t.openingRadicalVerbose=t.getRootIndex=t.nestedRadical=t.radicalNestingDepth=t.baselineBrief=t.baselineVerbose=t.superscriptBrief=t.superscriptVerbose=t.subscriptBrief=t.subscriptVerbose=t.nestedSubSuper=t.isSmallVulgarFraction=t.overFractionSbrief=t.closingFractionSbrief=t.openingFractionSbrief=t.closingFractionBrief=t.openingFractionBrief=t.overFractionVerbose=t.closingFractionVerbose=t.openingFractionVerbose=t.nestedFraction=t.fractionNestingDepth=t.computeNestingDepth_=t.containsAttr=t.getNestingDepth=t.resetNestingDepth=t.nestingBarriers=t.spaceoutIdentifier=t.spaceoutNumber=t.spaceoutNodes=t.spaceoutText=void 0;const e=base_util,r=dom_util,n=xpath_util,o=locale$d,i=semantic_processor;let a={};function s(t,e){const r=Array.from(t.textContent),n=[],o=i.default.getInstance(),a=t.ownerDocument;for(let t,i=0;t=r[i];i++){const r=o.getNodeFactory().makeLeafNode(t,"unknown"),i=o.identifierNode(r,"unknown","");e(i),n.push(i.xml(a))}return n}function l(n,o,i,s,l,c){s=s||t.nestingBarriers,l=l||{},c=c||function(t){return!1};const d=r.serializeXml(o);if(a[n]||(a[n]={}),a[n][d])return a[n][d];if(c(o)||i.indexOf(o.tagName)<0)return 0;const p=u(o,i,e.setdifference(s,i),l,c,0);return a[n][d]=p,p}function c(t,e){if(!t.attributes)return!1;const n=r.toArray(t.attributes);for(let t,r=0;t=n[r];r++)if(e[t.nodeName]===t.nodeValue)return!0;return!1}function u(t,e,n,o,i,a){if(i(t)||n.indexOf(t.tagName)>-1||c(t,o))return a;if(e.indexOf(t.tagName)>-1&&a++,!t.childNodes||0===t.childNodes.length)return a;const s=r.toArray(t.childNodes);return Math.max.apply(null,s.map((function(t){return u(t,e,n,o,i,a)})))}function d(e){return l("fraction",e,["fraction"],t.nestingBarriers,{},o.LOCALE.FUNCTIONS.fracNestDepth)}function p(t,e,r){const n=d(t),i=Array(n).fill(e);return r&&i.push(r),i.join(o.LOCALE.MESSAGES.regexp.JOINER_FRAC)}function m(t,e,r){for(;t.parentNode;){const n=t.parentNode,i=n.parentNode;if(!i)break;const a=t.getAttribute&&t.getAttribute("role");("subscript"===i.tagName&&t===n.childNodes[1]||"tensor"===i.tagName&&a&&("leftsub"===a||"rightsub"===a))&&(e=r.sub+o.LOCALE.MESSAGES.regexp.JOINER_SUBSUPER+e),("superscript"===i.tagName&&t===n.childNodes[1]||"tensor"===i.tagName&&a&&("leftsuper"===a||"rightsuper"===a))&&(e=r.sup+o.LOCALE.MESSAGES.regexp.JOINER_SUBSUPER+e),t=i}return e.trim()}function h(e){return l("radical",e,["sqrt","root"],t.nestingBarriers,{})}function f(t,e,r){const n=h(t),i=_(t);return r=i?o.LOCALE.FUNCTIONS.combineRootIndex(r,i):r,1===n?r:o.LOCALE.FUNCTIONS.combineNestedRadical(e,o.LOCALE.FUNCTIONS.radicalNestDepth(n-1),r)}function _(t){const e="sqrt"===t.tagName?"2":n.evalXPath("children/*[1]",t)[0].textContent.trim();return o.LOCALE.MESSAGES.MSroots[e]||""}function g(e){return l("underscore",e,["underscore"],t.nestingBarriers,{},(function(t){return t.tagName&&"underscore"===t.tagName&&"underaccent"===t.childNodes[0].childNodes[1].getAttribute("role")}))}function y(e){return l("overscore",e,["overscore"],t.nestingBarriers,{},(function(t){return t.tagName&&"overscore"===t.tagName&&"overaccent"===t.childNodes[0].childNodes[1].getAttribute("role")}))}t.spaceoutText=function(t){return Array.from(t.textContent).join(" ")},t.spaceoutNodes=s,t.spaceoutNumber=function(t){return s(t,(function(t){t.textContent.match(/\W/)||(t.type="number")}))},t.spaceoutIdentifier=function(t){return s(t,(function(t){t.font="unknown",t.type="identifier"}))},t.nestingBarriers=["cases","cell","integral","line","matrix","multiline","overscore","root","row","sqrt","subscript","superscript","table","underscore","vector"],t.resetNestingDepth=function(t){return a={},[t]},t.getNestingDepth=l,t.containsAttr=c,t.computeNestingDepth_=u,t.fractionNestingDepth=d,t.nestedFraction=p,t.openingFractionVerbose=function(t){return p(t,o.LOCALE.MESSAGES.MS.START,o.LOCALE.MESSAGES.MS.FRAC_V)},t.closingFractionVerbose=function(t){return p(t,o.LOCALE.MESSAGES.MS.END,o.LOCALE.MESSAGES.MS.FRAC_V)},t.overFractionVerbose=function(t){return p(t,o.LOCALE.MESSAGES.MS.FRAC_OVER)},t.openingFractionBrief=function(t){return p(t,o.LOCALE.MESSAGES.MS.START,o.LOCALE.MESSAGES.MS.FRAC_B)},t.closingFractionBrief=function(t){return p(t,o.LOCALE.MESSAGES.MS.END,o.LOCALE.MESSAGES.MS.FRAC_B)},t.openingFractionSbrief=function(t){const e=d(t);return 1===e?o.LOCALE.MESSAGES.MS.FRAC_S:o.LOCALE.FUNCTIONS.combineNestedFraction(o.LOCALE.MESSAGES.MS.NEST_FRAC,o.LOCALE.FUNCTIONS.radicalNestDepth(e-1),o.LOCALE.MESSAGES.MS.FRAC_S)},t.closingFractionSbrief=function(t){const e=d(t);return 1===e?o.LOCALE.MESSAGES.MS.ENDFRAC:o.LOCALE.FUNCTIONS.combineNestedFraction(o.LOCALE.MESSAGES.MS.NEST_FRAC,o.LOCALE.FUNCTIONS.radicalNestDepth(e-1),o.LOCALE.MESSAGES.MS.ENDFRAC)},t.overFractionSbrief=function(t){const e=d(t);return 1===e?o.LOCALE.MESSAGES.MS.FRAC_OVER:o.LOCALE.FUNCTIONS.combineNestedFraction(o.LOCALE.MESSAGES.MS.NEST_FRAC,o.LOCALE.FUNCTIONS.radicalNestDepth(e-1),o.LOCALE.MESSAGES.MS.FRAC_OVER)},t.isSmallVulgarFraction=function(t){return o.LOCALE.FUNCTIONS.fracNestDepth(t)?[t]:[]},t.nestedSubSuper=m,t.subscriptVerbose=function(t){return m(t,o.LOCALE.MESSAGES.MS.SUBSCRIPT,{sup:o.LOCALE.MESSAGES.MS.SUPER,sub:o.LOCALE.MESSAGES.MS.SUB})},t.subscriptBrief=function(t){return m(t,o.LOCALE.MESSAGES.MS.SUB,{sup:o.LOCALE.MESSAGES.MS.SUP,sub:o.LOCALE.MESSAGES.MS.SUB})},t.superscriptVerbose=function(t){return m(t,o.LOCALE.MESSAGES.MS.SUPERSCRIPT,{sup:o.LOCALE.MESSAGES.MS.SUPER,sub:o.LOCALE.MESSAGES.MS.SUB})},t.superscriptBrief=function(t){return m(t,o.LOCALE.MESSAGES.MS.SUP,{sup:o.LOCALE.MESSAGES.MS.SUP,sub:o.LOCALE.MESSAGES.MS.SUB})},t.baselineVerbose=function(t){const e=m(t,"",{sup:o.LOCALE.MESSAGES.MS.SUPER,sub:o.LOCALE.MESSAGES.MS.SUB});return e?e.replace(new RegExp(o.LOCALE.MESSAGES.MS.SUB+"$"),o.LOCALE.MESSAGES.MS.SUBSCRIPT).replace(new RegExp(o.LOCALE.MESSAGES.MS.SUPER+"$"),o.LOCALE.MESSAGES.MS.SUPERSCRIPT):o.LOCALE.MESSAGES.MS.BASELINE},t.baselineBrief=function(t){return m(t,"",{sup:o.LOCALE.MESSAGES.MS.SUP,sub:o.LOCALE.MESSAGES.MS.SUB})||o.LOCALE.MESSAGES.MS.BASE},t.radicalNestingDepth=h,t.nestedRadical=f,t.getRootIndex=_,t.openingRadicalVerbose=function(t){return f(t,o.LOCALE.MESSAGES.MS.NESTED,o.LOCALE.MESSAGES.MS.STARTROOT)},t.closingRadicalVerbose=function(t){return f(t,o.LOCALE.MESSAGES.MS.NESTED,o.LOCALE.MESSAGES.MS.ENDROOT)},t.indexRadicalVerbose=function(t){return f(t,o.LOCALE.MESSAGES.MS.NESTED,o.LOCALE.MESSAGES.MS.ROOTINDEX)},t.openingRadicalBrief=function(t){return f(t,o.LOCALE.MESSAGES.MS.NEST_ROOT,o.LOCALE.MESSAGES.MS.STARTROOT)},t.closingRadicalBrief=function(t){return f(t,o.LOCALE.MESSAGES.MS.NEST_ROOT,o.LOCALE.MESSAGES.MS.ENDROOT)},t.indexRadicalBrief=function(t){return f(t,o.LOCALE.MESSAGES.MS.NEST_ROOT,o.LOCALE.MESSAGES.MS.ROOTINDEX)},t.openingRadicalSbrief=function(t){return f(t,o.LOCALE.MESSAGES.MS.NEST_ROOT,o.LOCALE.MESSAGES.MS.ROOT)},t.indexRadicalSbrief=function(t){return f(t,o.LOCALE.MESSAGES.MS.NEST_ROOT,o.LOCALE.MESSAGES.MS.INDEX)},t.underscoreNestingDepth=g,t.nestedUnderscript=function(t){const e=g(t);return Array(e).join(o.LOCALE.MESSAGES.MS.UNDER)+o.LOCALE.MESSAGES.MS.UNDERSCRIPT},t.overscoreNestingDepth=y,t.endscripts=function(t){return o.LOCALE.MESSAGES.MS.ENDSCRIPTS},t.nestedOverscript=function(t){const e=y(t);return Array(e).join(o.LOCALE.MESSAGES.MS.OVER)+o.LOCALE.MESSAGES.MS.OVERSCRIPT},t.determinantIsSimple=function(t){if("matrix"!==t.tagName||"determinant"!==t.getAttribute("role"))return[];const e=n.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]},t.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 ")]},t.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 b=new Map([[3,"CSFleftsuperscript"],[4,"CSFleftsubscript"],[2,"CSFbaseline"],[1,"CSFrightsubscript"],[0,"CSFrightsuperscript"]]),v=new Map([[4,2],[3,3],[2,1],[1,4],[0,5]]);function x(t){const e=[];let r="",n="",o=parseInt(t,2);for(let t=0;t<5;t++){const i="children/*["+v.get(t)+"]";if(1&o){const e=b.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]}t.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,a]=x(n);t.defineRule(r,"default",i,"self::tensor",...o),e&&(t.defineRule(r,"brief",a,"self::tensor",...o),t.defineRule(r,"sbrief",a,"self::tensor",...o));const s=b.get(2);i+="; [t]"+s+"Verbose",a+="; [t]"+s+"Brief",r+="-baseline";const l="((.//*[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",l,...o),e&&(t.defineRule(r,"brief",a,"self::tensor",l,...o),t.defineRule(r,"sbrief",a,"self::tensor",l,...o))}},t.smallRoot=function(t){let e=Object.keys(o.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]:[]}}(mathspeak_util),getDefaultExportFromCjs(mathspeak_util);var numbers_util={};Object.defineProperty(numbers_util,"__esModule",{value:!0}),numbers_util.ordinalPosition=numbers_util.vulgarFraction=numbers_util.wordCounter=numbers_util.ordinalCounter=void 0;const span_1$2=span,DomUtil$m=dom_util,locale_1$4=locale$d,transformers_1=transformers;function ordinalCounter(t,e){let r=0;return function(){return locale_1$4.LOCALE.NUMBERS.numericOrdinal(++r)+" "+e}}function wordCounter(t,e){let r=0;return function(){return locale_1$4.LOCALE.NUMBERS.numberToOrdinal(++r,!1)+" "+e}}function vulgarFraction(t){const e=(0,transformers_1.convertVulgarFraction)(t,locale_1$4.LOCALE.MESSAGES.MS.FRAC_OVER);return e.convertible&&e.enumerator&&e.denominator?[new span_1$2.Span(locale_1$4.LOCALE.NUMBERS.numberToWords(e.enumerator),{extid:t.childNodes[0].childNodes[0].getAttribute("extid"),separator:""}),new span_1$2.Span(locale_1$4.LOCALE.NUMBERS.vulgarSep,{separator:""}),new span_1$2.Span(locale_1$4.LOCALE.NUMBERS.numberToOrdinal(e.denominator,1!==e.enumerator),{extid:t.childNodes[0].childNodes[1].getAttribute("extid")})]:[new span_1$2.Span(e.content||"",{extid:t.getAttribute("extid")})]}function ordinalPosition(t){const e=DomUtil$m.toArray(t.parentNode.childNodes);return locale_1$4.LOCALE.NUMBERS.numericOrdinal(e.indexOf(t)+1).toString()}numbers_util.ordinalCounter=ordinalCounter,numbers_util.wordCounter=wordCounter,numbers_util.vulgarFraction=vulgarFraction,numbers_util.ordinalPosition=ordinalPosition,Object.defineProperty(clearspeak_rules,"__esModule",{value:!0}),clearspeak_rules.ClearspeakRules=void 0;const dynamic_cstr_1$6=dynamic_cstr,StoreUtil$2=store_util,ClearspeakUtil=clearspeak_util,MathspeakUtil$3=mathspeak_util,NumbersUtil$2=numbers_util,SpeechRules$3=speech_rules;function ClearspeakRules(){SpeechRules$3.addStore(dynamic_cstr_1$6.DynamicCstr.BASE_LOCALE+".speech.clearspeak","",{CTFpauseSeparator:StoreUtil$2.pauseSeparator,CTFnodeCounter:ClearspeakUtil.nodeCounter,CTFcontentIterator:StoreUtil$2.contentIterator,CSFvulgarFraction:NumbersUtil$2.vulgarFraction,CQFvulgarFractionSmall:ClearspeakUtil.isSmallVulgarFraction,CQFcellsSimple:ClearspeakUtil.allCellsSimple,CSFordinalExponent:ClearspeakUtil.ordinalExponent,CSFwordOrdinal:ClearspeakUtil.wordOrdinal,CQFmatchingFences:ClearspeakUtil.matchingFences,CSFnestingDepth:ClearspeakUtil.nestingDepth,CQFfencedArguments:ClearspeakUtil.fencedArguments,CQFsimpleArguments:ClearspeakUtil.simpleArguments,CQFspaceoutNumber:MathspeakUtil$3.spaceoutNumber})}clearspeak_rules.ClearspeakRules=ClearspeakRules;var mathspeak_rules={},mathspeak_french_util={};Object.defineProperty(mathspeak_french_util,"__esModule",{value:!0}),mathspeak_french_util.leftSubscriptBrief=mathspeak_french_util.leftSuperscriptBrief=mathspeak_french_util.leftSubscriptVerbose=mathspeak_french_util.leftSuperscriptVerbose=mathspeak_french_util.baselineBrief=mathspeak_french_util.baselineVerbose=void 0;const MathspeakUtil$2=mathspeak_util;function baselineVerbose(t){return MathspeakUtil$2.baselineVerbose(t).replace(/-$/,"")}function baselineBrief(t){return MathspeakUtil$2.baselineBrief(t).replace(/-$/,"")}function leftSuperscriptVerbose(t){return MathspeakUtil$2.superscriptVerbose(t).replace(/^exposant/,"exposant gauche")}function leftSubscriptVerbose(t){return MathspeakUtil$2.subscriptVerbose(t).replace(/^indice/,"indice gauche")}function leftSuperscriptBrief(t){return MathspeakUtil$2.superscriptBrief(t).replace(/^sup/,"sup gauche")}function leftSubscriptBrief(t){return MathspeakUtil$2.subscriptBrief(t).replace(/^sub/,"sub gauche")}mathspeak_french_util.baselineVerbose=baselineVerbose,mathspeak_french_util.baselineBrief=baselineBrief,mathspeak_french_util.leftSuperscriptVerbose=leftSuperscriptVerbose,mathspeak_french_util.leftSubscriptVerbose=leftSubscriptVerbose,mathspeak_french_util.leftSuperscriptBrief=leftSuperscriptBrief,mathspeak_french_util.leftSubscriptBrief=leftSubscriptBrief;var unit_util={};Object.defineProperty(unit_util,"__esModule",{value:!0}),unit_util.oneLeft=unit_util.leftMostUnit=unit_util.rightMostUnit=unit_util.unitMultipliers=void 0;const auditory_description_1$3=auditory_description,XpathUtil$8=xpath_util,locale_1$3=locale$d;function unitMultipliers(t,e){const r=t;let n=0;return function(){const t=auditory_description_1$3.AuditoryDescription.create({text:rightMostUnit(r[n])&&leftMostUnit(r[n+1])?locale_1$3.LOCALE.MESSAGES.unitTimes:""},{});return n++,[t]}}unit_util.unitMultipliers=unitMultipliers;const SCRIPT_ELEMENTS=["superscript","subscript","overscore","underscore"];function rightMostUnit(t){for(;t;){if("unit"===t.getAttribute("role"))return!0;const e=t.tagName,r=XpathUtil$8.evalXPath("children/*",t);t=-1!==SCRIPT_ELEMENTS.indexOf(e)?r[0]:r[r.length-1]}return!1}function leftMostUnit(t){for(;t;){if("unit"===t.getAttribute("role"))return!0;t=XpathUtil$8.evalXPath("children/*",t)[0]}return!1}function oneLeft(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=XpathUtil$8.evalXPath("children/*",t)[0]}return[]}unit_util.rightMostUnit=rightMostUnit,unit_util.leftMostUnit=leftMostUnit,unit_util.oneLeft=oneLeft,Object.defineProperty(mathspeak_rules,"__esModule",{value:!0}),mathspeak_rules.MathspeakRules=void 0;const dynamic_cstr_1$5=dynamic_cstr,StoreUtil$1=store_util,MathspeakFrenchUtil=mathspeak_french_util,MathspeakUtil$1=mathspeak_util,NumbersUtil$1=numbers_util,SpeechRules$2=speech_rules,UnitUtil=unit_util;function MathspeakRules(){SpeechRules$2.addStore(dynamic_cstr_1$5.DynamicCstr.BASE_LOCALE+".speech.mathspeak","",{CQFspaceoutNumber:MathspeakUtil$1.spaceoutNumber,CQFspaceoutIdentifier:MathspeakUtil$1.spaceoutIdentifier,CSFspaceoutText:MathspeakUtil$1.spaceoutText,CSFopenFracVerbose:MathspeakUtil$1.openingFractionVerbose,CSFcloseFracVerbose:MathspeakUtil$1.closingFractionVerbose,CSFoverFracVerbose:MathspeakUtil$1.overFractionVerbose,CSFopenFracBrief:MathspeakUtil$1.openingFractionBrief,CSFcloseFracBrief:MathspeakUtil$1.closingFractionBrief,CSFopenFracSbrief:MathspeakUtil$1.openingFractionSbrief,CSFcloseFracSbrief:MathspeakUtil$1.closingFractionSbrief,CSFoverFracSbrief:MathspeakUtil$1.overFractionSbrief,CSFvulgarFraction:NumbersUtil$1.vulgarFraction,CQFvulgarFractionSmall:MathspeakUtil$1.isSmallVulgarFraction,CSFopenRadicalVerbose:MathspeakUtil$1.openingRadicalVerbose,CSFcloseRadicalVerbose:MathspeakUtil$1.closingRadicalVerbose,CSFindexRadicalVerbose:MathspeakUtil$1.indexRadicalVerbose,CSFopenRadicalBrief:MathspeakUtil$1.openingRadicalBrief,CSFcloseRadicalBrief:MathspeakUtil$1.closingRadicalBrief,CSFindexRadicalBrief:MathspeakUtil$1.indexRadicalBrief,CSFopenRadicalSbrief:MathspeakUtil$1.openingRadicalSbrief,CSFindexRadicalSbrief:MathspeakUtil$1.indexRadicalSbrief,CQFisSmallRoot:MathspeakUtil$1.smallRoot,CSFsuperscriptVerbose:MathspeakUtil$1.superscriptVerbose,CSFsuperscriptBrief:MathspeakUtil$1.superscriptBrief,CSFsubscriptVerbose:MathspeakUtil$1.subscriptVerbose,CSFsubscriptBrief:MathspeakUtil$1.subscriptBrief,CSFbaselineVerbose:MathspeakUtil$1.baselineVerbose,CSFbaselineBrief:MathspeakUtil$1.baselineBrief,CSFleftsuperscriptVerbose:MathspeakUtil$1.superscriptVerbose,CSFleftsubscriptVerbose:MathspeakUtil$1.subscriptVerbose,CSFrightsuperscriptVerbose:MathspeakUtil$1.superscriptVerbose,CSFrightsubscriptVerbose:MathspeakUtil$1.subscriptVerbose,CSFleftsuperscriptBrief:MathspeakUtil$1.superscriptBrief,CSFleftsubscriptBrief:MathspeakUtil$1.subscriptBrief,CSFrightsuperscriptBrief:MathspeakUtil$1.superscriptBrief,CSFrightsubscriptBrief:MathspeakUtil$1.subscriptBrief,CSFunderscript:MathspeakUtil$1.nestedUnderscript,CSFoverscript:MathspeakUtil$1.nestedOverscript,CSFendscripts:MathspeakUtil$1.endscripts,CTFordinalCounter:NumbersUtil$1.ordinalCounter,CTFwordCounter:NumbersUtil$1.wordCounter,CTFcontentIterator:StoreUtil$1.contentIterator,CQFdetIsSimple:MathspeakUtil$1.determinantIsSimple,CSFRemoveParens:MathspeakUtil$1.removeParens,CQFresetNesting:MathspeakUtil$1.resetNestingDepth,CGFbaselineConstraint:MathspeakUtil$1.generateBaselineConstraint,CGFtensorRules:MathspeakUtil$1.generateTensorRules}),SpeechRules$2.addStore("es.speech.mathspeak",dynamic_cstr_1$5.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CTFunitMultipliers:UnitUtil.unitMultipliers,CQFoneLeft:UnitUtil.oneLeft}),SpeechRules$2.addStore("fr.speech.mathspeak",dynamic_cstr_1$5.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CSFbaselineVerbose:MathspeakFrenchUtil.baselineVerbose,CSFbaselineBrief:MathspeakFrenchUtil.baselineBrief,CSFleftsuperscriptVerbose:MathspeakFrenchUtil.leftSuperscriptVerbose,CSFleftsubscriptVerbose:MathspeakFrenchUtil.leftSubscriptVerbose,CSFleftsuperscriptBrief:MathspeakFrenchUtil.leftSuperscriptBrief,CSFleftsubscriptBrief:MathspeakFrenchUtil.leftSubscriptBrief})}mathspeak_rules.MathspeakRules=MathspeakRules;var other_rules={},nemeth_util={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.implicitIterator=t.relationIterator=t.propagateNumber=t.checkParent_=t.NUMBER_INHIBITORS_=t.NUMBER_PROPAGATORS_=t.enlargeFence=t.indexRadical=t.closingRadical=t.openingRadical=t.radicalNestingDepth=t.nestedRadical=t.hyperFractionBoundary=t.overBevelledFraction=t.overFraction=t.closingFraction=t.openingFraction=void 0;const e=auditory_description,r=dom_util,n=xpath_util,o=grammar,i=engine,a=semantic_annotations,s=semantic_annotator,l=locale$d,c=mathspeak_util;function u(t,e){const r=d(t);return 1===r?e:new Array(r).join(l.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 p(t){const e="⠠";if(1===t.length)return e+t;const r=t.split("");return r.every((function(t){return"⠳"===t}))?e+r.join(e):t.slice(0,-1)+e+t.slice(-1)}function m(e,r){const n=e.parent;if(!n)return!1;const o=n.type;return-1!==t.NUMBER_PROPAGATORS_.indexOf(o)||"prefixop"===o&&"negative"===n.role&&!r.script||"prefixop"===o&&"geometry"===n.role||!("punctuated"!==o||r.enclosed&&"text"!==n.role)}function h(e,r){return e.childNodes.length?(-1!==t.NUMBER_INHIBITORS_.indexOf(e.type)&&(r.script=!0),"fenced"===e.type?(r.number=!1,r.enclosed=!0,["",r]):(m(e,r)&&(r.number=!0,r.enclosed=!1),["",r])):(m(e,r)&&(r.number=!0,r.script=!1,r.enclosed=!1),[r.number?"number":"",{number:!1,enclosed:r.enclosed,script:r.script}])}t.openingFraction=function(t){const e=c.fractionNestingDepth(t);return new Array(e).join(l.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+l.LOCALE.MESSAGES.MS.FRACTION_START},t.closingFraction=function(t){const e=c.fractionNestingDepth(t);return new Array(e).join(l.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+l.LOCALE.MESSAGES.MS.FRACTION_END},t.overFraction=function(t){const e=c.fractionNestingDepth(t);return new Array(e).join(l.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+l.LOCALE.MESSAGES.MS.FRACTION_OVER},t.overBevelledFraction=function(t){const e=c.fractionNestingDepth(t);return new Array(e).join(l.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+"⠸"+l.LOCALE.MESSAGES.MS.FRACTION_OVER},t.hyperFractionBoundary=function(t){return l.LOCALE.MESSAGES.regexp.HYPER===c.fractionNestingDepth(t).toString()?[t]:[]},t.nestedRadical=u,t.radicalNestingDepth=d,t.openingRadical=function(t){return u(t,l.LOCALE.MESSAGES.MS.STARTROOT)},t.closingRadical=function(t){return u(t,l.LOCALE.MESSAGES.MS.ENDROOT)},t.indexRadical=function(t){return u(t,l.LOCALE.MESSAGES.MS.ROOTINDEX)},t.enlargeFence=p,o.Grammar.getInstance().setCorrection("enlargeFence",p),t.NUMBER_PROPAGATORS_=["multirel","relseq","appl","row","line"],t.NUMBER_INHIBITORS_=["subscript","superscript","overscore","underscore"],t.checkParent_=m,t.propagateNumber=h,(0,a.register)(new s.SemanticVisitor("nemeth","number",h,{number:!0})),t.relationIterator=function(t,o){const a=t.slice(0);let s,u=!0;return s=t.length>0?n.evalXPath("../../content/*",t[0]):[],function(){const t=s.shift(),n=a.shift(),d=a[0],p=o?[e.AuditoryDescription.create({text:o},{translate:!0})]:[];if(!t)return p;const m=n?c.nestedSubSuper(n,"",{sup:l.LOCALE.MESSAGES.MS.SUPER,sub:l.LOCALE.MESSAGES.MS.SUB}):"",h=n&&"EMPTY"!==r.tagName(n)||u&&t.parentNode.parentNode&&t.parentNode.parentNode.previousSibling?[e.AuditoryDescription.create({text:l.LOCALE.MESSAGES.regexp.SPACE+m},{})]:[],f=d&&"EMPTY"!==r.tagName(d)||!s.length&&t.parentNode.parentNode&&t.parentNode.parentNode.nextSibling?[e.AuditoryDescription.create({text:l.LOCALE.MESSAGES.regexp.SPACE},{})]:[],_=i.default.evaluateNode(t);return u=!1,p.concat(h,_,f)}},t.implicitIterator=function(t,o){const i=t.slice(0);let a;return a=t.length>0?n.evalXPath("../../content/*",t[0]):[],function(){const t=i.shift(),n=i[0],s=a.shift(),c=o?[e.AuditoryDescription.create({text:o},{translate:!0})]:[];if(!s)return c;const u=t&&"NUMBER"===r.tagName(t),d=n&&"NUMBER"===r.tagName(n);return c.concat(u&&d&&"space"===s.getAttribute("role")?[e.AuditoryDescription.create({text:l.LOCALE.MESSAGES.regexp.SPACE},{})]:[])}}}(nemeth_util),getDefaultExportFromCjs(nemeth_util),Object.defineProperty(other_rules,"__esModule",{value:!0}),other_rules.BrailleRules=other_rules.OtherRules=other_rules.PrefixRules=void 0;const dynamic_cstr_1$4=dynamic_cstr,StoreUtil=store_util,MathspeakUtil=mathspeak_util,NemethUtil=nemeth_util,NumbersUtil=numbers_util,SpeechRules$1=speech_rules;function PrefixRules(){SpeechRules$1.addStore("en.prefix.default","",{CSFordinalPosition:NumbersUtil.ordinalPosition})}function OtherRules(){SpeechRules$1.addStore("en.speech.chromevox","",{CTFnodeCounter:StoreUtil.nodeCounter,CTFcontentIterator:StoreUtil.contentIterator}),SpeechRules$1.addStore("en.speech.emacspeak","en.speech.chromevox",{CQFvulgarFractionSmall:MathspeakUtil.isSmallVulgarFraction,CSFvulgarFraction:NumbersUtil.vulgarFraction})}function BrailleRules(){SpeechRules$1.addStore("nemeth.braille.default",dynamic_cstr_1$4.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CSFopenFraction:NemethUtil.openingFraction,CSFcloseFraction:NemethUtil.closingFraction,CSFoverFraction:NemethUtil.overFraction,CSFoverBevFraction:NemethUtil.overBevelledFraction,CQFhyperFraction:NemethUtil.hyperFractionBoundary,CSFopenRadical:NemethUtil.openingRadical,CSFcloseRadical:NemethUtil.closingRadical,CSFindexRadical:NemethUtil.indexRadical,CSFsubscript:MathspeakUtil.subscriptVerbose,CSFsuperscript:MathspeakUtil.superscriptVerbose,CSFbaseline:MathspeakUtil.baselineVerbose,CGFtensorRules:t=>MathspeakUtil.generateTensorRules(t,!1),CTFrelationIterator:NemethUtil.relationIterator,CTFimplicitIterator:NemethUtil.implicitIterator})}other_rules.PrefixRules=PrefixRules,other_rules.OtherRules=OtherRules,other_rules.BrailleRules=BrailleRules,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.init=t.INIT_=void 0;const e=clearspeak_rules,r=mathspeak_rules,n=other_rules;t.INIT_=!1,t.init=function(){t.INIT_||((0,r.MathspeakRules)(),(0,e.ClearspeakRules)(),(0,n.PrefixRules)(),(0,n.OtherRules)(),(0,n.BrailleRules)(),t.INIT_=!0)}}(speech_rule_stores),getDefaultExportFromCjs(speech_rule_stores);var braille_store={},math_store={},base_rule_store={},speech_rule={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.OutputError=t.Precondition=t.Action=t.Component=t.ActionType=t.SpeechRule=void 0;const e=engine,r=grammar;var n;function o(t){switch(t){case"[n]":return n.NODE;case"[m]":return n.MULTI;case"[t]":return n.TEXT;case"[p]":return n.PERSONALITY;default:throw"Parse error: "+t}}t.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"}(n=t.ActionType||(t.ActionType={}));class i{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 r.Grammar.parseInput(t)}static fromString(t){const e={type:o(t.substring(0,3))};let r=t.slice(3).trim();if(!r)throw new l("Missing content.");switch(e.type){case n.TEXT:if('"'===r[0]){const t=c(r,"\\(")[0].trim();if('"'!==t.slice(-1))throw new l("Invalid string syntax.");e.content=t,r=r.slice(t.length).trim(),-1===r.indexOf("(")&&(r="");break}case n.NODE:case n.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=i.attributesFromString(r);t.grammar&&(e.grammar=t.grammar,delete t.grammar),Object.keys(t).length&&(e.attributes=t)}return new i(e)}static attributesFromString(t){if("("!==t[0]||")"!==t.slice(-1))throw new l("Invalid attribute expression: "+t);const e={},n=c(t.slice(1,-1),",");for(let t=0,o=n.length;t<o;t++){const o=n[t],a=o.indexOf(":");if(-1===a)e[o.trim()]="true";else{const t=o.substring(0,a).trim(),n=o.slice(a+1).trim();e[t]=t===r.ATTRIBUTE?i.grammarFromString(n):n}}return e}toString(){let t="";t+=function(t){switch(t){case n.NODE:return"[n]";case n.MULTI:return"[m]";case n.TEXT:return"[t]";case n.PERSONALITY:return"[p]";default:throw"Unknown type error: "+t}}(this.type),t+=this.content?" "+this.content:"";const e=this.attributesToString();return t+=e?" "+e:"",t}grammarToString(){return this.getGrammar().join(":")}getGrammar(){const t=[];for(const e in this.grammar)!0===this.grammar[e]?t.push(e):!1===this.grammar[e]?t.push("!"+e):t.push(e+"="+this.grammar[e]);return t}attributesToString(){const t=this.getAttributes(),e=this.grammarToString();return e&&t.push("grammar:"+e),t.length>0?"("+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}}t.Component=i;class a{constructor(t){this.components=t}static fromString(t){const e=c(t,";").filter((function(t){return t.match(/\S/)})).map((function(t){return t.trim()})),r=[];for(let t=0,n=e.length;t<n;t++){const n=i.fromString(e[t]);n&&r.push(n)}return new a(r)}toString(){return this.components.map((function(t){return t.toString()})).join("; ")}}t.Action=a;class s{constructor(t,...e){this.query=t,this.constraints=e;const[r,n]=this.presetPriority();this.priority=r?n:this.calculatePriority()}static constraintValue(t,e){for(let r,n=0;r=e[n];n++)if(t.match(r))return++n;return 0}toString(){const t=this.constraints.join(", ");return`${this.query}, ${t} (${this.priority}, ${this.rank})`}calculatePriority(){const t=s.constraintValue(this.query,s.queryPriorities);if(!t)return 0;const e=this.query.match(/^self::.+\[(.+)\]/)[1];return 100*t+10*s.constraintValue(e,s.attributePriorities)}presetPriority(){if(!this.constraints.length)return[!1,0];const t=this.constraints[this.constraints.length-1].match(/^priority=(.*$)/);if(!t)return[!1,0];this.constraints.pop();const e=parseFloat(t[1]);return[!0,isNaN(e)?0:e]}}t.Precondition=s,s.queryPriorities=[/^self::\*\[.+\]$/,/^self::[\w-]+\[.+\]$/],s.attributePriorities=[/^@[\w-]+$/,/^@[\w-]+!=".+"$/,/^not\(contains\(@[\w-]+,\s*".+"\)\)$/,/^contains\(@[\w-]+,".+"\)$/,/^@[\w-]+=".+"$/];class l extends e.SREError{constructor(t){super(t),this.name="RuleError"}}function c(t,e){const r=[];let n="";for(;""!==t;){const o=t.search(e);if(-1===o){if((t.match(/"/g)||[]).length%2!=0)throw new l("Invalid string in expression: "+t);r.push(n+t),n="",t=""}else if((t.substring(0,o).match(/"/g)||[]).length%2==0)r.push(n+t.substring(0,o)),n="",t=t.substring(o+1);else{const e=t.substring(o).search('"');if(-1===e)throw new l("Invalid string in expression: "+t);n+=t.substring(0,o+e+1),t=t.substring(o+e+1)}}return n&&r.push(n),r}t.OutputError=l}(speech_rule),getDefaultExportFromCjs(speech_rule);var speech_rule_context={},speech_rule_functions={};Object.defineProperty(speech_rule_functions,"__esModule",{value:!0}),speech_rule_functions.CustomGenerators=speech_rule_functions.ContextFunctions=speech_rule_functions.CustomStrings=speech_rule_functions.CustomQueries=void 0;class FunctionsStore{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)}}class CustomQueries extends FunctionsStore{constructor(){super("CQF",{})}}speech_rule_functions.CustomQueries=CustomQueries;class CustomStrings extends FunctionsStore{constructor(){super("CSF",{})}}speech_rule_functions.CustomStrings=CustomStrings;class ContextFunctions extends FunctionsStore{constructor(){super("CTF",{})}}speech_rule_functions.ContextFunctions=ContextFunctions;class CustomGenerators extends FunctionsStore{constructor(){super("CGF",{})}}speech_rule_functions.CustomGenerators=CustomGenerators,Object.defineProperty(speech_rule_context,"__esModule",{value:!0}),speech_rule_context.SpeechRuleContext=void 0;const XpathUtil$7=xpath_util,srf=speech_rule_functions;class SpeechRuleContext{constructor(){this.customQueries=new srf.CustomQueries,this.customStrings=new srf.CustomStrings,this.contextFunctions=new srf.ContextFunctions,this.customGenerators=new srf.CustomGenerators}applyCustomQuery(t,e){const r=this.customQueries.lookup(e);return r?r(t):null}applySelector(t,e){return this.applyCustomQuery(t,e)||XpathUtil$7.evalXPath(e,t)}applyQuery(t,e){const r=this.applySelector(t,e);return r.length>0?r[0]:null}applyConstraint(t,e){return!!this.applyQuery(t,e)||XpathUtil$7.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):XpathUtil$7.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])}}}}speech_rule_context.SpeechRuleContext=SpeechRuleContext,Object.defineProperty(base_rule_store,"__esModule",{value:!0}),base_rule_store.Condition=base_rule_store.BaseRuleStore=void 0;const auditory_description_1$2=auditory_description,dynamic_cstr_1$3=dynamic_cstr,speech_rule_1$2=speech_rule,speech_rule_context_1=speech_rule_context;class BaseRuleStore{constructor(){this.context=new speech_rule_context_1.SpeechRuleContext,this.parseOrder=dynamic_cstr_1$3.DynamicCstr.DEFAULT_ORDER,this.parser=new dynamic_cstr_1$3.DynamicCstrParser(this.parseOrder),this.locale=dynamic_cstr_1$3.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$3.Axis.LOCALE],this.modality=dynamic_cstr_1$3.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$3.Axis.MODALITY],this.domain="",this.initialized=!1,this.inherits=null,this.kind="standard",this.customTranscriptions={},this.preconditions=new Map,this.speechRules_=[],this.rank=0,this.parseMethods={Rule:this.defineRule,Generator:this.generateRules,Action:this.defineAction,Precondition:this.definePrecondition,Ignore:this.ignoreRules}}static compareStaticConstraints_(t,e){if(t.length!==e.length)return!1;for(let r,n=0;r=t[n];n++)if(-1===e.indexOf(r))return!1;return!0}static comparePreconditions_(t,e){const r=t.precondition,n=e.precondition;return r.query===n.query&&BaseRuleStore.compareStaticConstraints_(r.constraints,n.constraints)}defineRule(t,e,r,n,...o){const i=this.parseAction(r),a=this.parsePrecondition(n,o),s=this.parseCstr(e);if(!(i&&a&&s))return console.error(`Rule Error: ${n}, (${e}): ${r}`),null;const l=new speech_rule_1$2.SpeechRule(t,s,a,i);return l.precondition.rank=this.rank++,this.addRule(l),l}addRule(t){t.context=this.context,this.speechRules_.unshift(t)}deleteRule(t){const e=this.speechRules_.indexOf(t);-1!==e&&this.speechRules_.splice(e,1)}findRule(t){for(let e,r=0;e=this.speechRules_[r];r++)if(t(e))return e;return null}findAllRules(t){return this.speechRules_.filter(t)}evaluateDefault(t){const e=t.textContent.slice(0);return e.match(/^\s+$/)?this.evaluateWhitespace(e):this.evaluateString(e)}evaluateWhitespace(t){return[]}evaluateCustom(t){const e=this.customTranscriptions[t];return void 0!==e?auditory_description_1$2.AuditoryDescription.create({text:e},{adjust:!0,translate:!1}):null}evaluateCharacter(t){return this.evaluateCustom(t)||auditory_description_1$2.AuditoryDescription.create({text:t},{adjust:!0,translate:!0})}removeDuplicates(t){for(let e,r=this.speechRules_.length-1;e=this.speechRules_[r];r--)e!==t&&t.dynamicCstr.equal(e.dynamicCstr)&&BaseRuleStore.comparePreconditions_(e,t)&&this.speechRules_.splice(r,1)}getSpeechRules(){return this.speechRules_}setSpeechRules(t){this.speechRules_=t}getPreconditions(){return this.preconditions}parseCstr(t){try{return this.parser.parse(this.locale+"."+this.modality+(this.domain?"."+this.domain:"")+"."+t)}catch(e){if("RuleError"===e.name)return console.error("Rule Error ",`Illegal Dynamic Constraint: ${t}.`,e.message),null;throw e}}parsePrecondition(t,e){try{const r=this.parsePrecondition_(t);t=r[0];let n=r.slice(1);for(const t of e)n=n.concat(this.parsePrecondition_(t));return new speech_rule_1$2.Precondition(t,...n)}catch(r){if("RuleError"===r.name)return console.error("Rule Error ",`Illegal preconditions: ${t}, ${e}.`,r.message),null;throw r}}parseAction(t){try{return speech_rule_1$2.Action.fromString(t)}catch(e){if("RuleError"===e.name)return console.error("Rule Error ",`Illegal action: ${t}.`,e.message),null;throw e}}parse(t){this.modality=t.modality||this.modality,this.locale=t.locale||this.locale,this.domain=t.domain||this.domain,this.context.parse(t.functions||[]),"actions"!==t.kind&&(this.kind=t.kind||this.kind,this.inheritRules()),this.parseRules(t.rules||[])}parseRules(t){for(let e,r=0;e=t[r];r++){const t=e[0],r=this.parseMethods[t];t&&r&&r.apply(this,e.slice(1))}}generateRules(t){const e=this.context.customGenerators.lookup(t);e&&e(this)}defineAction(t,e){let r;try{r=speech_rule_1$2.Action.fromString(e)}catch(t){if("RuleError"===t.name)return void console.error("Action Error ",e,t.message);throw t}const n=this.getFullPreconditions(t);if(!n)return void console.error(`Action Error: No precondition for action ${t}`);this.ignoreRules(t);const o=new RegExp("^\\w+\\.\\w+\\."+(this.domain?"\\w+\\.":""));n.conditions.forEach((([e,n])=>{const i=this.parseCstr(e.toString().replace(o,""));this.addRule(new speech_rule_1$2.SpeechRule(t,i,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 Condition(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 speech_rule_1$2.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]}}base_rule_store.BaseRuleStore=BaseRuleStore;class Condition{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]))}}base_rule_store.Condition=Condition,Object.defineProperty(math_store,"__esModule",{value:!0}),math_store.MathStore=void 0;const BaseUtil$1=base_util,locale_1$2=locale$d,semantic_annotations_1$2=semantic_annotations,base_rule_store_1=base_rule_store,speech_rule_1$1=speech_rule;class MathStore extends base_rule_store_1.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,semantic_annotations_1$2.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 speech_rule_1$1.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))),a=this.parseCstr(r);if(!i&&n)throw new speech_rule_1$1.OutputError("Rule named "+t+" with style "+e+" does not exist.");const s=n?speech_rule_1$1.Action.fromString(n):i.action,l=new speech_rule_1$1.SpeechRule(i.name,a,i.precondition,s);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 n=BaseUtil$1.removeEmpty(t.replace(/\s/g," ").split(" "));for(let t,o=0;t=n[o];o++)if(1===t.length)e.push(this.evaluateCharacter(t));else if(t.match(new RegExp("^["+locale_1$2.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("^["+locale_1$2.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 speech_rule_1$1.SpeechRule(t.name,t.dynamicCstr,n,t.action);o.name=t.name,this.addRule(o)}matchNumber_(t){const e=t.match(new RegExp("^"+locale_1$2.LOCALE.MESSAGES.regexp.NUMBER)),r=t.match(new RegExp("^"+MathStore.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(MathStore.regexp.DIGIT_GROUP,"g"),"X").replace(new RegExp(MathStore.regexp.DECIMAL_MARK,"g"),locale_1$2.LOCALE.MESSAGES.regexp.DECIMAL_MARK).replace(/X/g,locale_1$2.LOCALE.MESSAGES.regexp.DIGIT_GROUP.replace(/\\/g,"")),length:r[0].length}}}math_store.MathStore=MathStore,MathStore.regexp={NUMBER:"((\\d{1,3})(?=(,| ))((,| )\\d{3})*(\\.\\d+)?)|^\\d*\\.\\d+|^\\d+",DECIMAL_MARK:"\\.",DIGIT_GROUP:","},Object.defineProperty(braille_store,"__esModule",{value:!0}),braille_store.BrailleStore=void 0;const semantic_annotations_1$1=semantic_annotations,math_store_1$1=math_store;class BrailleStore extends math_store_1$1.MathStore{constructor(){super(...arguments),this.modality="braille",this.customTranscriptions={"⋊":"⠈⠡⠳"}}evaluateString(t){const e=[],r=Array.from(t);for(let t=0;t<r.length;t++)e.push(this.evaluateCharacter(r[t]));return e}annotations(){for(let t,e=0;t=this.annotators[e];e++)(0,semantic_annotations_1$1.activate)(this.locale,t)}}braille_store.BrailleStore=BrailleStore;var trie={},trie_node={};!function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.TrieNodeKind=void 0,(e=t.TrieNodeKind||(t.TrieNodeKind={})).ROOT="root",e.DYNAMIC="dynamic",e.QUERY="query",e.BOOLEAN="boolean",e.STATIC="static"}(trie_node),getDefaultExportFromCjs(trie_node);var trie_node_factory={},abstract_trie_node={};Object.defineProperty(abstract_trie_node,"__esModule",{value:!0}),abstract_trie_node.StaticTrieNode=abstract_trie_node.AbstractTrieNode=void 0;const debugger_1$5=_debugger,trie_node_1$2=trie_node;class AbstractTrieNode{constructor(t,e){this.constraint=t,this.test=e,this.children_={},this.kind=trie_node_1$2.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}}abstract_trie_node.AbstractTrieNode=AbstractTrieNode;class StaticTrieNode extends AbstractTrieNode{constructor(t,e){super(t,e),this.rule_=null,this.kind=trie_node_1$2.TrieNodeKind.STATIC}getRule(){return this.rule_}setRule(t){this.rule_&&debugger_1$5.Debugger.getInstance().output("Replacing rule "+this.rule_+" with "+t),this.rule_=t}toString(){return this.getRule()?this.constraint+"\n==> "+this.getRule().action:this.constraint}}abstract_trie_node.StaticTrieNode=StaticTrieNode,Object.defineProperty(trie_node_factory,"__esModule",{value:!0}),trie_node_factory.BooleanTrieNode=trie_node_factory.QueryTrieNode=trie_node_factory.constraintTest_=trie_node_factory.DynamicTrieNode=trie_node_factory.RootTrieNode=trie_node_factory.getNode=void 0;const DomUtil$l=dom_util,XpathUtil$6=xpath_util,grammar_1$2=grammar,MathCompoundStore$2=math_compound_store,abstract_trie_node_1=abstract_trie_node,abstract_trie_node_2=abstract_trie_node,trie_node_1$1=trie_node;function getNode(t,e,r){switch(t){case trie_node_1$1.TrieNodeKind.ROOT:return new RootTrieNode;case trie_node_1$1.TrieNodeKind.DYNAMIC:return new DynamicTrieNode(e);case trie_node_1$1.TrieNodeKind.QUERY:return new QueryTrieNode(e,r);case trie_node_1$1.TrieNodeKind.BOOLEAN:return new BooleanTrieNode(e,r);default:return null}}trie_node_factory.getNode=getNode;class RootTrieNode extends abstract_trie_node_1.AbstractTrieNode{constructor(){super("",(()=>!0)),this.kind=trie_node_1$1.TrieNodeKind.ROOT}}trie_node_factory.RootTrieNode=RootTrieNode;class DynamicTrieNode extends abstract_trie_node_1.AbstractTrieNode{constructor(t){super(t,(e=>e===t)),this.kind=trie_node_1$1.TrieNodeKind.DYNAMIC}}trie_node_factory.DynamicTrieNode=DynamicTrieNode;const comparator={"=":(t,e)=>t===e,"!=":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e};function constraintTest_(t){if(t.match(/^self::\*$/))return t=>!0;if(t.match(/^self::\w+$/)){const e=t.slice(6).toUpperCase();return t=>t.tagName&&DomUtil$l.tagName(t)===e}if(t.match(/^self::\w+:\w+$/)){const e=t.split(":"),r=XpathUtil$6.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=>!!grammar_1$2.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=>!grammar_1$2.Grammar.getInstance().getParameter(e)}if(t.match(/^name\(\.\.\/\.\.\)="\w+"$/)){const e=t.split('"')[1].toUpperCase();return t=>{var r,n;return(null===(n=null===(r=t.parentNode)||void 0===r?void 0:r.parentNode)||void 0===n?void 0:n.tagName)&&DomUtil$l.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 o=n.match(/^unit:(.+)$/);let i="";return o&&(n=o[1],i=":unit"),t=>{const o=XpathUtil$6.evalXPath(e,t)[0];if(o){const t=MathCompoundStore$2.lookupCategory(o.textContent+i);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+)/),o=comparator[r]||comparator["="],i=parseInt(n,10);return t=>{const r=XpathUtil$6.evalXPath(e,t)[0];return!!r&&o(Array.from(r.textContent).length,i)}}return null}trie_node_factory.constraintTest_=constraintTest_;class QueryTrieNode extends abstract_trie_node_2.StaticTrieNode{constructor(t,e){super(t,constraintTest_(t)),this.context=e,this.kind=trie_node_1$1.TrieNodeKind.QUERY}applyTest(t){return this.test?this.test(t):this.context.applyQuery(t,this.constraint)===t}}trie_node_factory.QueryTrieNode=QueryTrieNode;class BooleanTrieNode extends abstract_trie_node_2.StaticTrieNode{constructor(t,e){super(t,constraintTest_(t)),this.context=e,this.kind=trie_node_1$1.TrieNodeKind.BOOLEAN}applyTest(t){return this.test?this.test(t):this.context.applyConstraint(t,this.constraint)}}trie_node_factory.BooleanTrieNode=BooleanTrieNode,Object.defineProperty(trie,"__esModule",{value:!0}),trie.Trie=void 0;const trie_node_1=trie_node,trie_node_factory_1=trie_node_factory;class Trie{constructor(){this.root=(0,trie_node_factory_1.getNode)(trie_node_1.TrieNodeKind.ROOT,"",null)}static collectRules_(t){const e=[];let r=[t];for(;r.length;){const t=r.shift();if(t.getKind()===trie_node_1.TrieNodeKind.QUERY||t.getKind()===trie_node_1.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=Trie.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(Trie.order_));return Math.max(e.length,r)}addRule(t){let e=this.root;const r=t.context,n=t.dynamicCstr.getValues();for(let t=0,o=n.length;t<o;t++)e=this.addNode_(e,n[t],trie_node_1.TrieNodeKind.DYNAMIC,r);e=this.addNode_(e,t.precondition.query,trie_node_1.TrieNodeKind.QUERY,r);const o=t.precondition.constraints;for(let t=0,n=o.length;t<n;t++)e=this.addNode_(e,o[t],trie_node_1.TrieNodeKind.BOOLEAN,r);e.setRule(t)}lookupRules(t,e){let r=[this.root];const n=[];for(;e.length;){const t=e.shift(),n=[];for(;r.length;){r.shift().getChildren().forEach((e=>{e.getKind()===trie_node_1.TrieNodeKind.DYNAMIC&&-1===t.indexOf(e.getConstraint())||n.push(e)}))}r=n.slice()}for(;r.length;){const e=r.shift();if(e.getRule){const t=e.getRule();t&&n.push(t)}const o=e.findChildren(t);r=r.concat(o)}return n}hasSubtrie(t){let e=this.root;for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e=e.getChild(n),!e)return!1}return!0}toString(){return Trie.printWithDepth_(this.root,0,"")}collectRules(){return Trie.collectRules_(this.root)}order(){return Trie.order_(this.root)}enumerate(t){return this.enumerate_(this.root,t)}byConstraint(t){let e=this.root;for(;t.length&&e;){const r=t.shift();e=e.getChild(r)}return e||null}enumerate_(t,e){e=e||{};const r=t.getChildren();for(let t,n=0;t=r[n];n++)t.kind===trie_node_1.TrieNodeKind.DYNAMIC&&(e[t.getConstraint()]=this.enumerate_(t,e[t.getConstraint()]));return e}addNode_(t,e,r,n){let o=t.getChild(e);return o||(o=(0,trie_node_factory_1.getNode)(r,e,n),t.addChild(o)),o}}trie.Trie=Trie,Object.defineProperty(speech_rule_engine,"__esModule",{value:!0}),speech_rule_engine.storeFactory=speech_rule_engine.SpeechRuleEngine=void 0;const auditory_description_1$1=auditory_description,debugger_1$4=_debugger,DomUtil$k=dom_util,engine_1$a=engine,EngineConst$c=engine_const,xpath_util_1=xpath_util,SpeechRules=speech_rules,SpeechRuleStores=speech_rule_stores,braille_store_1=braille_store,dynamic_cstr_1$2=dynamic_cstr,grammar_1$1=grammar,math_store_1=math_store,speech_rule_1=speech_rule,trie_1=trie;class SpeechRuleEngine{constructor(){this.trie=null,this.evaluators_={},this.trie=new trie_1.Trie}static getInstance(){return SpeechRuleEngine.instance=SpeechRuleEngine.instance||new SpeechRuleEngine,SpeechRuleEngine.instance}static debugSpeechRule(t,e){const r=t.precondition,n=t.context.applyQuery(e,r.query);debugger_1$4.Debugger.getInstance().output(r.query,n?n.toString():n),r.constraints.forEach((r=>debugger_1$4.Debugger.getInstance().output(r,t.context.applyConstraint(e,r))))}static debugNamedSpeechRule(t,e){const r=SpeechRuleEngine.getInstance().trie.collectRules().filter((e=>e.name==t));for(let n,o=0;n=r[o];o++)debugger_1$4.Debugger.getInstance().output("Rule",t,"DynamicCstr:",n.dynamicCstr.toString(),"number",o),SpeechRuleEngine.debugSpeechRule(n,e)}evaluateNode(t){(0,xpath_util_1.updateEvaluator)(t);const e=(new Date).getTime();let r=[];try{r=this.evaluateNode_(t)}catch(t){console.error("Something went wrong computing speech."),debugger_1$4.Debugger.getInstance().output(t)}const n=(new Date).getTime();return debugger_1$4.Debugger.getInstance().output("Time:",n-e),r}toString(){return this.trie.collectRules().map((t=>t.toString())).join("\n")}runInSetting(t,e){const r=engine_1$a.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=storeFactory(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}grammar_1$1.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_[dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.LOCALE]];return r[e]||r[dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.MODALITY]]}enumerate(t){return this.trie.enumerate(t)}evaluateNode_(t){return t?(this.updateConstraint_(),this.evaluateTree_(t)):[]}evaluateTree_(t){const e=engine_1$a.default.getInstance();let r;debugger_1$4.Debugger.getInstance().output(e.mode!==EngineConst$c.Mode.HTTP?t.toString():t),grammar_1$1.Grammar.getInstance().setAttribute(t);const n=this.lookupRule(t,e.dynamicCstr);if(!n)return e.strict?[]:(r=this.getEvaluator(e.locale,e.modality)(t),t.attributes&&this.addPersonality_(r,{},!1,t),r);debugger_1$4.Debugger.getInstance().generateOutput((()=>["Apply Rule:",n.name,n.dynamicCstr.toString(),(e.mode,EngineConst$c.Mode.HTTP,t).toString()]));const o=n.context,i=n.action.components;r=[];for(let e,n=0;e=i[n];n++){let n=[];const i=e.content||"",a=e.attributes||{};let s=!1;e.grammar&&this.processGrammar(o,t,e.grammar);let l=null;if(a.engine){l=engine_1$a.default.getInstance().dynamicCstr.getComponents();const t=grammar_1$1.Grammar.parseInput(a.engine);engine_1$a.default.getInstance().setDynamicCstr(t)}switch(e.type){case speech_rule_1.ActionType.NODE:{const e=o.applyQuery(t,i);e&&(n=this.evaluateTree_(e))}break;case speech_rule_1.ActionType.MULTI:{s=!0;const e=o.applySelector(t,i);e.length>0&&(n=this.evaluateNodeList_(o,e,a.sepFunc,o.constructString(t,a.separator),a.ctxtFunc,o.constructString(t,a.context)))}break;case speech_rule_1.ActionType.TEXT:{const e=a.span,r={};if(e){const n=(0,xpath_util_1.evalXPath)(e,t);n.length&&(r.extid=n[0].getAttribute("extid"))}const s=o.constructString(t,i);(s||""===s)&&(n=Array.isArray(s)?s.map((function(t){return auditory_description_1$1.AuditoryDescription.create({text:t.speech,attributes:t.attributes},{adjust:!0})})):[auditory_description_1$1.AuditoryDescription.create({text:s,attributes:r},{adjust:!0})])}break;case speech_rule_1.ActionType.PERSONALITY:default:n=[auditory_description_1$1.AuditoryDescription.create({text:i})]}n[0]&&!s&&(a.context&&(n[0].context=o.constructString(t,a.context)+(n[0].context||"")),a.annotation&&(n[0].annotation=a.annotation)),this.addLayout(n,a,s),e.grammar&&grammar_1$1.Grammar.getInstance().popState(),r=r.concat(this.addPersonality_(n,a,s,t)),l&&engine_1$a.default.getInstance().setDynamicCstr(l)}return r}evaluateNodeList_(t,e,r,n,o,i){if(!e.length)return[];const a=n||"",s=i||"",l=t.contextFunctions.lookup(o),c=l?l(e,s):function(){return s},u=t.contextFunctions.lookup(r),d=u?u(e,a):function(){return[auditory_description_1$1.AuditoryDescription.create({text:a},{translate:!0})]};let p=[];for(let t,r=0;t=e[r];r++){const n=this.evaluateTree_(t);if(n.length>0&&(n[0].context=c()+(n[0].context||""),p=p.concat(n),r<e.length-1)){const t=d();p=p.concat(t)}}return p}addLayout(t,e,r){const n=e.layout;n&&(n.match(/^begin/)?t.unshift(new auditory_description_1$1.AuditoryDescription({text:"",layout:n})):n.match(/^end/)?t.push(new auditory_description_1$1.AuditoryDescription({text:"",layout:n})):(t.unshift(new auditory_description_1$1.AuditoryDescription({text:"",layout:`begin${n}`})),t.push(new auditory_description_1$1.AuditoryDescription({text:"",layout:`end${n}`}))))}addPersonality_(t,e,r,n){const o={};let i=null;for(const t of EngineConst$c.personalityPropList){const r=e[t];if(void 0===r)continue;const n=parseFloat(r),a=isNaN(n)?'"'===r.charAt(0)?r.slice(1,-1):r:n;t===EngineConst$c.personalityProps.PAUSE?i=a:o[t]=a}for(let e,r=0;e=t[r];r++)this.addRelativePersonality_(e,o),this.addExternalAttributes_(e,n);if(r&&t.length&&delete t[t.length-1].personality[EngineConst$c.personalityProps.JOIN],i&&t.length){const e=t[t.length-1];e.text||Object.keys(e.personality).length?t.push(auditory_description_1$1.AuditoryDescription.create({text:"",personality:{pause:i}})):e.personality[EngineConst$c.personalityProps.PAUSE]=i}return t}addExternalAttributes_(t,e){if(e.hasAttributes()){const r=e.attributes;for(let e=r.length-1;e>=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=engine_1$a.default.getInstance().dynamicCstr,e=engine_1$a.default.getInstance().strict,r=this.trie,n={};let o=t.getValue(dynamic_cstr_1$2.Axis.LOCALE),i=t.getValue(dynamic_cstr_1$2.Axis.MODALITY),a=t.getValue(dynamic_cstr_1$2.Axis.DOMAIN);r.hasSubtrie([o,i,a])||(a=dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.DOMAIN],r.hasSubtrie([o,i,a])||(i=dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.MODALITY],r.hasSubtrie([o,i,a])||(o=dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.LOCALE]))),n[dynamic_cstr_1$2.Axis.LOCALE]=[o],n[dynamic_cstr_1$2.Axis.MODALITY]=["summary"!==i?i:dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.MODALITY]],n[dynamic_cstr_1$2.Axis.DOMAIN]=["speech"!==i?dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_1$2.Axis.DOMAIN]:a];const s=t.getOrder();for(let r,o=0;r=s[o];o++)if(!n[r]){const o=t.getValue(r),i=this.makeSet_(o,t.preference),a=dynamic_cstr_1$2.DynamicCstr.DEFAULT_VALUES[r];e||o===a||i.push(a),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!==DomUtil$k.NodeType.ELEMENT_NODE&&t.nodeType!==DomUtil$k.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=engine_1$a.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})),debugger_1$4.Debugger.getInstance().generateOutput((()=>e.map((t=>t.name+"("+t.dynamicCstr.toString()+")"))).bind(this)),e[0]}}speech_rule_engine.SpeechRuleEngine=SpeechRuleEngine;const stores=new Map;function getStore(t){return"braille"===t?new braille_store_1.BrailleStore:new math_store_1.MathStore}function storeFactory(t){const e=`${t.locale}.${t.modality}.${t.domain}`;if("actions"===t.kind){const r=stores.get(e);return r.parse(t),r}SpeechRuleStores.init(),t&&!t.functions&&(t.functions=SpeechRules.getStore(t.locale,t.modality,t.domain));const r=getStore(t.modality);return stores.set(e,r),t.inherits&&(r.inherits=stores.get(`${t.inherits}.${t.modality}.${t.domain}`)),r.parse(t),r.initialize(),r}speech_rule_engine.storeFactory=storeFactory,engine_1$a.default.nodeEvaluator=SpeechRuleEngine.getInstance().evaluateNode.bind(SpeechRuleEngine.getInstance());var alphabet_generator={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.INTERVALS=t.makeLetter=t.numberRules=t.alphabetRules=t.getFont=t.makeInterval=t.generate=t.makeDomains_=t.Domains_=t.Base=t.Embellish=t.Font=void 0;const e=engine,r=l10n,n=locale$d,o=locale_util,i=math_compound_store;var a,s,l;function c(){const e=n.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)};t.Domains_.small=r(e.smallPrefix,e.letterTrans),t.Domains_.capital=r(e.capPrefix,e.letterTrans),t.Domains_.digit=r(e.digitPrefix,e.digitTrans)}function u(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=u(t);!1!==r[e]&&(e=r[e]||e,i.push(e))}return i}function p(t){const e="normal"===t||"fullwidth"===t?"":n.LOCALE.MESSAGES.font[t]||n.LOCALE.MESSAGES.embellish[t]||"";return(0,o.localeFontCombiner)(e)}function m(e,r,o,i,a,s){const l=p(i);for(let i,c,u,d=0;i=e[d],c=r[d],u=o[d];d++){const e=s?n.LOCALE.ALPHABETS.capPrefix:n.LOCALE.ALPHABETS.smallPrefix,r=s?t.Domains_.capital:t.Domains_.small;f(l.combiner,i,c,u,l.font,e,a,n.LOCALE.ALPHABETS.letterTrans,r)}}function h(e,r,o,i,a){const s=p(o);for(let o,l,c=0;o=e[c],l=r[c];c++){const e=n.LOCALE.ALPHABETS.digitPrefix,r=c+a;f(s.combiner,o,l,r,s.font,e,i,n.LOCALE.ALPHABETS.digitTrans,t.Domains_.digit)}}function f(t,e,r,n,o,a,s,l,c){for(let u,d=0;u=c[d];d++){const c=u in l?l[u]:l.default,d=u in a?a[u]:a.default;i.defineRule(e.toString(),u,"default",s,r,t(c(n),o,d))}}!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"}(a=t.Font||(t.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"}(s=t.Embellish||(t.Embellish={})),function(t){t.LATINCAP="latinCap",t.LATINSMALL="latinSmall",t.GREEKCAP="greekCap",t.GREEKSMALL="greekSmall",t.DIGIT="digit"}(l=t.Base||(t.Base={})),t.Domains_={small:["default"],capital:["default"],digit:["default"]},t.makeDomains_=c,t.generate=function(o){const a=e.default.getInstance().locale;e.default.getInstance().locale=o,r.setLocale(),i.addSymbolRules({locale:o}),c();const s=t.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)h(e,r,t.font,t.category,t.offset||0);else{m(e,r,n.LOCALE.ALPHABETS[t.base],t.font,t.category,!!t.capital)}}e.default.getInstance().locale=a,r.setLocale()},t.makeInterval=d,t.getFont=p,t.alphabetRules=m,t.numberRules=h,t.makeLetter=f,t.INTERVALS=[{interval:["1D400","1D419"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.BOLD},{interval:["1D41A","1D433"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.BOLD},{interval:["1D56C","1D585"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.BOLDFRAKTUR},{interval:["1D468","1D481"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.BOLDITALIC},{interval:["1D482","1D49B"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.BOLDSCRIPT},{interval:["1D4EA","1D503"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.BOLDSCRIPT},{interval:["1D538","1D551"],base:l.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:a.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:l.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:a.FRAKTUR},{interval:["1D51E","1D537"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.FRAKTUR},{interval:["FF21","FF3A"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.FULLWIDTH},{interval:["FF41","FF5A"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.FULLWIDTH},{interval:["1D434","1D44D"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.ITALIC},{interval:["1D44E","1D467"],base:l.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:a.ITALIC},{interval:["1D670","1D689"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.MONOSPACE},{interval:["1D68A","1D6A3"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.MONOSPACE},{interval:["0041","005A"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.NORMAL},{interval:["0061","007A"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.NORMAL},{interval:["1D49C","1D4B5"],base:l.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:a.SCRIPT},{interval:["1D4B6","1D4CF"],base:l.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:a.SCRIPT},{interval:["1D5A0","1D5B9"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.SANSSERIF},{interval:["1D5BA","1D5D3"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.SANSSERIF},{interval:["1D608","1D621"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:l.LATINCAP,subst:{},capital:!0,category:"Lu",font:a.SANSSERIFBOLDITALIC},{interval:["1D656","1D66F"],base:l.LATINSMALL,subst:{},capital:!1,category:"Ll",font:a.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:l.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:a.NORMAL},{interval:["03B0","03D0"],base:l.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},capital:!1,category:"Ll",font:a.NORMAL},{interval:["1D6A8","1D6C0"],base:l.GREEKCAP,subst:{},capital:!0,category:"Lu",font:a.BOLD},{interval:["1D6C1","1D6E1"],base:l.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:a.BOLD},{interval:["1D6E2","1D6FA"],base:l.GREEKCAP,subst:{},capital:!0,category:"Lu",font:a.ITALIC},{interval:["1D6FB","1D71B"],base:l.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:a.ITALIC},{interval:["1D71C","1D734"],base:l.GREEKCAP,subst:{},capital:!0,category:"Lu",font:a.BOLDITALIC},{interval:["1D735","1D755"],base:l.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:a.BOLDITALIC},{interval:["1D756","1D76E"],base:l.GREEKCAP,subst:{},capital:!0,category:"Lu",font:a.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:l.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:a.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:l.GREEKCAP,subst:{},capital:!0,category:"Lu",font:a.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:l.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:a.SANSSERIFBOLDITALIC},{interval:["0030","0039"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.NORMAL},{interval:["2070","2079"],base:l.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:s.SUPER},{interval:["2080","2089"],base:l.DIGIT,subst:{},offset:0,category:"No",font:s.SUB},{interval:["245F","2473"],base:l.DIGIT,subst:{"245F":"24EA"},offset:0,category:"No",font:s.CIRCLED},{interval:["3251","325F"],base:l.DIGIT,subst:{},offset:21,category:"No",font:s.CIRCLED},{interval:["32B1","32BF"],base:l.DIGIT,subst:{},offset:36,category:"No",font:s.CIRCLED},{interval:["2474","2487"],base:l.DIGIT,subst:{},offset:1,category:"No",font:s.PARENTHESIZED},{interval:["2487","249B"],base:l.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:s.PERIOD},{interval:["2775","277F"],base:l.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:s.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:l.DIGIT,subst:{},offset:11,category:"No",font:s.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:l.DIGIT,subst:{},offset:1,category:"No",font:s.DOUBLECIRCLED},{interval:["277F","2789"],base:l.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:s.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:l.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:s.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.BOLD},{interval:["1D7D8","1D7E1"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.SANSSERIF},{interval:["1D7EC","1D7F5"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:l.DIGIT,subst:{},offset:0,category:"Nd",font:a.MONOSPACE},{interval:["1F101","1F10A"],base:l.DIGIT,subst:{},offset:0,category:"No",font:s.COMMA},{interval:["24B6","24CF"],base:l.LATINCAP,subst:{},capital:!0,category:"So",font:s.CIRCLED},{interval:["24D0","24E9"],base:l.LATINSMALL,subst:{},capital:!1,category:"So",font:s.CIRCLED},{interval:["1F110","1F129"],base:l.LATINCAP,subst:{},capital:!0,category:"So",font:s.PARENTHESIZED},{interval:["249C","24B5"],base:l.LATINSMALL,subst:{},capital:!1,category:"So",font:s.PARENTHESIZED},{interval:["1F130","1F149"],base:l.LATINCAP,subst:{},capital:!0,category:"So",font:s.SQUARED},{interval:["1F170","1F189"],base:l.LATINCAP,subst:{},capital:!0,category:"So",font:s.NEGATIVESQUARED},{interval:["1F150","1F169"],base:l.LATINCAP,subst:{},capital:!0,category:"So",font:s.NEGATIVECIRCLED}]}(alphabet_generator),getDefaultExportFromCjs(alphabet_generator);var __awaiter$1=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{l(n.next(t))}catch(t){i(t)}}function s(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(math_map,"__esModule",{value:!0}),math_map.loadAjax=math_map.loadFileSync=math_map.loadFile=math_map.parseMaps=math_map.retrieveFiles=math_map.standardLoader=math_map.loadLocale=math_map.store=void 0;const BrowserUtil$1=browser_util,engine_1$9=engine,EngineConst$b=engine_const,FileUtil$1=file_util,system_external_1$1=system_external,dynamic_cstr_1$1=dynamic_cstr,MathCompoundStore$1=math_compound_store,speech_rule_engine_1$2=speech_rule_engine,l10n_1=l10n,AlphabetGenerator=alphabet_generator;math_map.store=MathCompoundStore$1;const addSymbols={functions:MathCompoundStore$1.addFunctionRules,symbols:MathCompoundStore$1.addSymbolRules,units:MathCompoundStore$1.addUnitRules,si:MathCompoundStore$1.setSiPrefixes};let _init=!1;function loadLocale(t=engine_1$9.default.getInstance().locale){return __awaiter$1(this,void 0,void 0,(function*(){return _init||(_loadLocale(dynamic_cstr_1$1.DynamicCstr.BASE_LOCALE),_init=!0),engine_1$9.EnginePromise.promises[dynamic_cstr_1$1.DynamicCstr.BASE_LOCALE].then((()=>__awaiter$1(this,void 0,void 0,(function*(){const e=engine_1$9.default.getInstance().defaultLocale;return e?(_loadLocale(e),engine_1$9.EnginePromise.promises[e].then((()=>__awaiter$1(this,void 0,void 0,(function*(){return _loadLocale(t),engine_1$9.EnginePromise.promises[t]}))))):(_loadLocale(t),engine_1$9.EnginePromise.promises[t])}))))}))}function _loadLocale(t=engine_1$9.default.getInstance().locale){engine_1$9.EnginePromise.loaded[t]||(engine_1$9.EnginePromise.loaded[t]=[!1,!1],retrieveMaps(t))}function loadMethod(){return engine_1$9.default.getInstance().customLoader?engine_1$9.default.getInstance().customLoader:standardLoader()}function standardLoader(){switch(engine_1$9.default.getInstance().mode){case EngineConst$b.Mode.ASYNC:return loadFile;case EngineConst$b.Mode.HTTP:return loadAjax;case EngineConst$b.Mode.SYNC:default:return loadFileSync}}function retrieveFiles(t){const e=loadMethod(),r=new Promise((r=>{e(t).then((e=>{parseMaps(e),engine_1$9.EnginePromise.loaded[t]=[!0,!0],r(t)}),(e=>{engine_1$9.EnginePromise.loaded[t]=[!0,!1],console.error(`Unable to load locale: ${t}`),engine_1$9.default.getInstance().locale=engine_1$9.default.getInstance().defaultLocale,r(t)}))}));engine_1$9.EnginePromise.promises[t]=r}function parseMaps(t){addMaps(JSON.parse(t))}function addMaps(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]?speech_rule_engine_1$2.SpeechRuleEngine.getInstance().addStore(t[n]):"messages"===o[1]?(0,l10n_1.completeLocale)(t[n]):(r&&(AlphabetGenerator.generate(o[0]),r=!1),t[n].forEach(addSymbols[o[1]])))}}function retrieveMaps(t){engine_1$9.default.getInstance().isIE&&engine_1$9.default.getInstance().mode===EngineConst$b.Mode.HTTP?getJsonIE_(t):retrieveFiles(t)}function getJsonIE_(t,e){let r=e||1;BrowserUtil$1.mapsForIE?addMaps(BrowserUtil$1.mapsForIE,t):r<=5&&setTimeout((()=>getJsonIE_(t,r++)).bind(this),300)}function loadFile(t){const e=FileUtil$1.localePath(t);return new Promise(((t,r)=>{system_external_1$1.default.fs.readFile(e,"utf8",((e,n)=>{if(e)return r(e);t(n)}))}))}function loadFileSync(t){const e=FileUtil$1.localePath(t);return new Promise(((t,r)=>{let n="{}";try{n=system_external_1$1.default.fs.readFileSync(e,"utf8")}catch(t){return r(t)}t(n)}))}function loadAjax(t){const e=FileUtil$1.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()}))}math_map.loadLocale=loadLocale,math_map.standardLoader=standardLoader,math_map.retrieveFiles=retrieveFiles,math_map.parseMaps=parseMaps,math_map.loadFile=loadFile,math_map.loadFileSync=loadFileSync,math_map.loadAjax=loadAjax;var __awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{l(n.next(t))}catch(t){i(t)}}function s(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(engine_setup,"__esModule",{value:!0}),engine_setup.setup=void 0;const L10n=l10n,MathMap=math_map,BrowserUtil=browser_util,debugger_1$3=_debugger,engine_1$8=engine,FileUtil=file_util,system_external_1=system_external;function setup(t){return __awaiter(this,void 0,void 0,(function*(){const e=engine_1$8.default.getInstance();"default"!==t.domain||"speech"!==t.modality&&t.modality&&"speech"!==e.modality||(t.domain="mathspeak");const r=r=>{void 0!==t[r]&&(e[r]=t[r])};return r("mode"),e.configurate(t),engine_1$8.default.BINARY_FEATURES.forEach((r=>{void 0!==t[r]&&(e[r]=!!t[r])})),engine_1$8.default.STRING_FEATURES.forEach(r),t.debug&&debugger_1$3.Debugger.getInstance().init(),t.json&&(system_external_1.default.jsonPath=FileUtil.makePath(t.json)),t.xpath&&(system_external_1.default.WGXpath=t.xpath),e.setCustomLoader(t.custom),setupBrowsers(e),L10n.setLocale(),e.setDynamicCstr(),e.init?(engine_1$8.EnginePromise.promises.init=new Promise(((t,e)=>{setTimeout((()=>{t("init")}),10)})),e.init=!1,engine_1$8.EnginePromise.get()):e.delay?(e.delay=!1,engine_1$8.EnginePromise.get()):MathMap.loadLocale()}))}function setupBrowsers(t){t.isIE=BrowserUtil.detectIE(),t.isEdge=BrowserUtil.detectEdge()}engine_setup.setup=setup;var processor_factory={},aural_rendering={},acss_renderer={},event_util={};!function(t){var e,r;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=t.EventType=t.Move=t.KeyCode=void 0,(e=t.KeyCode||(t.KeyCode={}))[e.ENTER=13]="ENTER",e[e.ESC=27]="ESC",e[e.SPACE=32]="SPACE",e[e.PAGE_UP=33]="PAGE_UP",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.END=35]="END",e[e.HOME=36]="HOME",e[e.LEFT=37]="LEFT",e[e.UP=38]="UP",e[e.RIGHT=39]="RIGHT",e[e.DOWN=40]="DOWN",e[e.TAB=9]="TAB",e[e.LESS=188]="LESS",e[e.GREATER=190]="GREATER",e[e.DASH=189]="DASH",e[e.ZERO=48]="ZERO",e[e.ONE=49]="ONE",e[e.TWO=50]="TWO",e[e.THREE=51]="THREE",e[e.FOUR=52]="FOUR",e[e.FIVE=53]="FIVE",e[e.SIX=54]="SIX",e[e.SEVEN=55]="SEVEN",e[e.EIGHT=56]="EIGHT",e[e.NINE=57]="NINE",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",t.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"]]),(r=t.EventType||(t.EventType={})).CLICK="click",r.DBLCLICK="dblclick",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSEMOVE="mousemove",r.SELECTSTART="selectstart",r.KEYPRESS="keypress",r.KEYDOWN="keydown",r.KEYUP="keyup",r.TOUCHSTART="touchstart",r.TOUCHMOVE="touchmove",r.TOUCHEND="touchend",r.TOUCHCANCEL="touchcancel";t.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)}}}(event_util),getDefaultExportFromCjs(event_util);var audio_util={};Object.defineProperty(audio_util,"__esModule",{value:!0}),audio_util.isSpanElement=audio_util.isPauseElement=audio_util.isMarkupElement=audio_util.personalityMarkup=audio_util.sortClose=audio_util.mergeMarkup=audio_util.mergePause=void 0;const base_util_1$1=base_util,EngineConst$a=engine_const,span_1$1=span;function mergePause(t,e,r){return t?{pause:mergePause_(t.pause,e.pause,r)}:e}function mergePause_(t,e,r){return(r||function(r,n){return"number"==typeof r&&"number"==typeof n?r+n:"number"==typeof r?n:"number"==typeof n?r:[t,e].sort()[0]}).call(null,t,e)}function mergeMarkup(t,e){delete t.open,e.close.forEach((e=>delete t[e])),e.open.forEach((r=>t[r]=e[r]));const r=Object.keys(t);t.open=r}function sortClose(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}audio_util.mergePause=mergePause,audio_util.mergeMarkup=mergeMarkup,audio_util.sortClose=sortClose;let PersonalityRanges_={},LastOpen_=[];function personalityMarkup(t){PersonalityRanges_={},LastOpen_=[];let e=[];const r={};for(let n,o=0;n=t[o];o++){let t=null;const o=n.descriptionSpan(),i=n.personality,a=i[EngineConst$a.personalityProps.JOIN];delete i[EngineConst$a.personalityProps.JOIN],void 0!==i[EngineConst$a.personalityProps.PAUSE]&&(t={[EngineConst$a.personalityProps.PAUSE]:i[EngineConst$a.personalityProps.PAUSE]},delete i[EngineConst$a.personalityProps.PAUSE]);appendMarkup_(e,o,personalityDiff_(i,r),a,t,!0)}return e=e.concat(finaliseMarkup_()),e=simplifyMarkup_(e),e}function appendElement_(t,e){const r=t[t.length-1];if(r){if(isSpanElement(e)&&isSpanElement(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)}isPauseElement(e)&&isPauseElement(r)?r.pause=mergePause_(r.pause,e.pause):t.push(e)}else t.push(e)}function simplifyMarkup_(t){const e={},r=[];for(let n,o=0;n=t[o];o++){if(!isMarkupElement(n)){appendElement_(r,n);continue}if(!n.close||1!==n.close.length||n.open.length){copyValues_(n,e),r.push(n);continue}let i=t[o+1];if(!i||isSpanElement(i)){copyValues_(n,e),r.push(n);continue}const a=isPauseElement(i)?i:null;a&&(i=t[o+2]),i&&isMarkupElement(i)&&i.open[0]===n.close[0]&&!i.close.length&&i[i.open[0]]===e[i.open[0]]?a?(appendElement_(r,a),o+=2):o+=1:(copyValues_(n,e),r.push(n))}return r}function copyValues_(t,e){t.rate&&(e.rate=t.rate),t.pitch&&(e.pitch=t.pitch),t.volume&&(e.volume=t.volume)}function finaliseMarkup_(){const t=[];for(let e=LastOpen_.length-1;e>=0;e--){const r=LastOpen_[e];if(r.length){const e={open:[],close:[]};for(let t=0;t<r.length;t++){const n=r[t];e.close.push(n),e[n]=0}t.push(e)}}return t}function isMarkupElement(t){return"object"==typeof t&&t.open}function isPauseElement(t){return"object"==typeof t&&1===Object.keys(t).length&&Object.keys(t)[0]===EngineConst$a.personalityProps.PAUSE}function isSpanElement(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 appendMarkup_(t,e,r,n,o,i=!1){if(i){const i=t[t.length-1];let a;if(i&&(a=i[EngineConst$a.personalityProps.JOIN]),i&&!e.speech&&o&&isPauseElement(i)){const t=EngineConst$a.personalityProps.PAUSE;i[t]=mergePause_(i[t],o[t]),o=null}if(i&&e.speech&&0===Object.keys(r).length&&isSpanElement(i)){if(void 0!==a){const t=i.span.pop();e=new span_1$1.Span(t.speech+a+e.speech,t.attributes)}i.span.push(e),e=new span_1$1.Span("",{}),i[EngineConst$a.personalityProps.JOIN]=n}}0!==Object.keys(r).length&&t.push(r),e.speech&&t.push({span:[e],join:n}),o&&t.push(o)}function personalityDiff_(t,e){if(!e)return t;const r={};for(const n of EngineConst$a.personalityPropList){const o=t[n],i=e[n];if(!o&&!i||o&&i&&o===i)continue;const a=o||0;isMarkupElement(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]=a,r[n]=a,PersonalityRanges_[n]?PersonalityRanges_[n].push(a):PersonalityRanges_[n]=[a]}if(isMarkupElement(r)){let t=r.close.slice();for(;t.length>0;){let n=LastOpen_.pop();const o=(0,base_util_1$1.setdifference)(n,t);if(t=(0,base_util_1$1.setdifference)(t,n),n=o,0!==t.length){if(0!==n.length){r.close=r.close.concat(n),r.open=r.open.concat(n);for(let t,o=0;t=n[o];o++)r[t]=e[t]}}else 0!==n.length&&LastOpen_.push(n)}LastOpen_.push(r.open)}return r}audio_util.personalityMarkup=personalityMarkup,audio_util.isMarkupElement=isMarkupElement,audio_util.isPauseElement=isPauseElement,audio_util.isSpanElement=isSpanElement;var markup_renderer={},abstract_audio_renderer={};Object.defineProperty(abstract_audio_renderer,"__esModule",{value:!0}),abstract_audio_renderer.AbstractAudioRenderer=void 0;const engine_1$7=engine;class AbstractAudioRenderer{constructor(){this.separator_=" "}setSeparator(t){this.separator_=t}getSeparator(){return"braille"===engine_1$7.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,o<r){const t=n.attributes.separator;e+=void 0!==t?t:this.getSeparator()}return e}finalize(t){return t}pauseValue(t){let e;switch(t){case"long":e=750;break;case"medium":e=500;break;case"short":e=250;break;default:e=parseInt(t,10)}return Math.floor(e*engine_1$7.default.getInstance().getRate()/100)}}abstract_audio_renderer.AbstractAudioRenderer=AbstractAudioRenderer,Object.defineProperty(markup_renderer,"__esModule",{value:!0}),markup_renderer.MarkupRenderer=void 0;const EngineConst$9=engine_const,abstract_audio_renderer_1$2=abstract_audio_renderer;class MarkupRenderer extends abstract_audio_renderer_1$2.AbstractAudioRenderer{constructor(){super(...arguments),this.ignoreElements=[EngineConst$9.personalityProps.LAYOUT],this.scaleFunction=null}setScaleFunction(t,e,r,n,o=0){this.scaleFunction=i=>{const a=(i-t)/(e-t),s=r*(1-a)+n*a;return+(Math.round(s+"e+"+o)+"e-"+o)}}applyScaleFunction(t){return this.scaleFunction?this.scaleFunction(t):t}ignoreElement(t){return-1!==this.ignoreElements.indexOf(t)}}markup_renderer.MarkupRenderer=MarkupRenderer,Object.defineProperty(acss_renderer,"__esModule",{value:!0}),acss_renderer.AcssRenderer=void 0;const EngineConst$8=engine_const,EventUtil=event_util,AudioUtil$3=audio_util,markup_renderer_1$1=markup_renderer;class AcssRenderer extends markup_renderer_1$1.MarkupRenderer{markup(t){this.setScaleFunction(-2,2,0,10,0);const e=AudioUtil$3.personalityMarkup(t),r=[],n={open:[]};let o=null,i=!1;for(let t,a=0;t=e[a];a++){if(AudioUtil$3.isMarkupElement(t)){AudioUtil$3.mergeMarkup(n,t);continue}if(AudioUtil$3.isPauseElement(t)){i&&(o=AudioUtil$3.mergePause(o,t,Math.max));continue}const e='"'+this.merge(t.span)+'"';i=!0,o&&(r.push(this.pause(o)),o=null);const a=this.prosody_(n);r.push(a?"(text ("+a+") "+e+")":e)}return"(exp "+r.join(" ")+")"}error(t){return'(error "'+EventUtil.Move.get(t)+'")'}prosodyElement(t,e){switch(e=this.applyScaleFunction(e),t){case EngineConst$8.personalityProps.RATE:return"(richness . "+e+")";case EngineConst$8.personalityProps.PITCH:return"(average-pitch . "+e+")";case EngineConst$8.personalityProps.VOLUME:return"(stress . "+e+")"}return"(value . "+e+")"}pause(t){return"(pause . "+this.pauseValue(t[EngineConst$8.personalityProps.PAUSE])+")"}prosody_(t){const e=t.open,r=[];for(let n,o=0;n=e[o];o++)r.push(this.prosodyElement(n,t[n]));return r.join(" ")}}acss_renderer.AcssRenderer=AcssRenderer;var layout_renderer={},xml_renderer={};Object.defineProperty(xml_renderer,"__esModule",{value:!0}),xml_renderer.XmlRenderer=void 0;const engine_1$6=engine,AudioUtil$2=audio_util,markup_renderer_1=markup_renderer;class XmlRenderer extends markup_renderer_1.MarkupRenderer{markup(t){this.setScaleFunction(-2,2,-100,100,2);const e=AudioUtil$2.personalityMarkup(t),r=[],n=[];for(let t,o=0;t=e[o];o++)if(t.span)r.push(this.merge(t.span));else if(AudioUtil$2.isPauseElement(t))r.push(this.pause(t));else{if(t.close.length)for(let e=0;e<t.close.length;e++){const e=n.pop();if(-1===t.close.indexOf(e))throw new engine_1$6.SREError("Unknown closing markup element: "+e);r.push(this.closeTag(e))}if(t.open.length){AudioUtil$2.sortClose(t.open.slice(),e.slice(o+1)).forEach((e=>{r.push(this.prosodyElement(e,t[e])),n.push(e)}))}}return r.join(" ")}}xml_renderer.XmlRenderer=XmlRenderer,Object.defineProperty(layout_renderer,"__esModule",{value:!0}),layout_renderer.LayoutRenderer=void 0;const debugger_1$2=_debugger,DomUtil$j=dom_util,EngineConst$7=engine_const,AudioUtil$1=audio_util,xml_renderer_1$3=xml_renderer;class LayoutRenderer extends xml_renderer_1$3.XmlRenderer{finalize(t){return setTwoDim(t)}pause(t){return""}prosodyElement(t,e){return t===EngineConst$7.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=AudioUtil$1.personalityMarkup(t);for(let t,n=0;t=r[n];n++)t.span?e.push(this.merge(t.span)):AudioUtil$1.isPauseElement(t);return e.join("")}}layout_renderer.LayoutRenderer=LayoutRenderer;let twodExpr="";const handlers={TABLE:handleTable,CASES:handleCases,CAYLEY:handleCayley,MATRIX:handleMatrix,CELL:recurseTree,FENCE:recurseTree,ROW:recurseTree,FRACTION:handleFraction,NUMERATOR:handleFractionPart,DENOMINATOR:handleFractionPart};function applyHandler(t){const e=DomUtil$j.tagName(t),r=handlers[e];return r?r(t):t.textContent}function setTwoDim(t){twodExpr="";const e=DomUtil$j.parseInput(`<all>${t}</all>`);return debugger_1$2.Debugger.getInstance().output(DomUtil$j.formatXml(e.toString())),twodExpr=recurseTree(e),twodExpr}function combineContent(t,e){if(!t||!e)return t+e;const r=strHeight(t),n=strHeight(e),o=r-n;t=o<0?padCell(t,n,strWidth(t)):t,e=o>0?padCell(e,r,strWidth(e)):e;const i=t.split(/\r\n|\r|\n/),a=e.split(/\r\n|\r|\n/),s=[];for(let t=0;t<i.length;t++)s.push(i[t]+a[t]);return s.join("\n")}function recurseTree(t){let e="";for(const r of Array.from(t.childNodes))e=r.nodeType!==DomUtil$j.NodeType.TEXT_NODE?combineContent(e,applyHandler(r)):combineContent(e,r.textContent);return e}function strHeight(t){return t.split(/\r\n|\r|\n/).length}function strWidth(t){return t.split(/\r\n|\r|\n/).reduce(((t,e)=>Math.max(e.length,t)),0)}function padHeight(t,e){const r=e-strHeight(t);return t+(r>0?new Array(r+1).join("\n"):"")}function padWidth(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("⠀"):""))}return n.join("\n")}function padCell(t,e,r){return padWidth(t=padHeight(t,e),r)}function assembleRows(t){const e=Array.from(t.childNodes),r=[];for(const t of e)t.nodeType===DomUtil$j.NodeType.ELEMENT_NODE&&r.push(handleRow(t));return r}function getMaxParameters(t){const e=t.reduce(((t,e)=>Math.max(e.height,t)),0),r=[];for(let e=0;e<t[0].width.length;e++)r.push(t.map((t=>t.width[e])).reduce(((t,e)=>Math.max(t,e)),0));return[e,r]}function combineCells(t,e){const r=[];for(const n of t){if(0===n.height)continue;const t=[];for(let r=0;r<n.cells.length;r++)t.push(padCell(n.cells[r],n.height,e[r]));n.cells=t,r.push(n)}return r}function combineRows(t,e){if(1===e)return t.map((t=>t.lfence+t.cells.join(t.sep)+t.rfence)).join("\n");const r=[];for(const e of t){const t=verticalArrange(e.sep,e.height);let n=e.cells.shift();for(;e.cells.length;)n=combineContent(n,t),n=combineContent(n,e.cells.shift());n=combineContent(verticalArrange(e.lfence,e.height),n),n=combineContent(n,verticalArrange(e.rfence,e.height)),r.push(n),r.push(e.lfence+new Array(strWidth(n)-3).join(e.sep)+e.rfence)}return r.slice(0,-1).join("\n")}function verticalArrange(t,e){let r="";for(;e;)r+=t+"\n",e--;return r.slice(0,-1)}function getFence(t){return t.nodeType===DomUtil$j.NodeType.ELEMENT_NODE&&"FENCE"===DomUtil$j.tagName(t)?applyHandler(t):""}function handleMatrix(t){let e=assembleRows(t);const[r,n]=getMaxParameters(e);return e=combineCells(e,n),combineRows(e,r)}function handleTable(t){let e=assembleRows(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]=getMaxParameters(e);return e=combineCells(e,n),combineRows(e,r)}function handleCases(t){let e=assembleRows(t);e.forEach((t=>{t.cells=t.cells.slice(0,-1),t.width=t.width.slice(0,-1)}));const[r,n]=getMaxParameters(e);return e=combineCells(e,n),combineRows(e,r)}function handleCayley(t){let e=assembleRows(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]=getMaxParameters(e),o={lfence:"",rfence:"",cells:n.map((t=>"⠐"+new Array(t).join("⠒"))),width:n,height:1,sep:e[0].sep};return e.splice(1,0,o),e=combineCells(e,n),combineRows(e,r)}function handleRow(t){const e=Array.from(t.childNodes),r=getFence(e[0]),n=getFence(e[e.length-1]);r&&e.shift(),n&&e.pop();let o="";const i=[];for(const t of e){if(t.nodeType===DomUtil$j.NodeType.TEXT_NODE){o=t.textContent;continue}const e=applyHandler(t);i.push(e)}return{lfence:r,rfence:n,sep:o,cells:i,height:i.reduce(((t,e)=>Math.max(strHeight(e),t)),0),width:i.map(strWidth)}}function centerCell(t,e){const r=(e-strWidth(t))/2,[n,o]=Math.floor(r)===r?[r,r]:[Math.floor(r),Math.ceil(r)],i=t.split(/\r\n|\r|\n/),a=[],[s,l]=[new Array(n+1).join("⠀"),new Array(o+1).join("⠀")];for(const t of i)a.push(s+t+l);return a.join("\n")}function handleFraction(t){const[e,r,,n,o]=Array.from(t.childNodes),i=applyHandler(r),a=applyHandler(n),s=strWidth(i),l=strWidth(a);let c=Math.max(s,l);const u=e+new Array(c+1).join("⠒")+o;return c=u.length,`${centerCell(i,c)}\n${u}\n${centerCell(a,c)}`}function handleFractionPart(t){const e=t.firstChild,r=recurseTree(t);if(e&&e.nodeType===DomUtil$j.NodeType.ELEMENT_NODE){if("ENGLISH"===DomUtil$j.tagName(e))return"⠰"+r;if("NUMBER"===DomUtil$j.tagName(e))return"⠼"+r}return r}var punctuation_renderer={};Object.defineProperty(punctuation_renderer,"__esModule",{value:!0}),punctuation_renderer.PunctuationRenderer=void 0;const EngineConst$6=engine_const,abstract_audio_renderer_1$1=abstract_audio_renderer,AudioUtil=audio_util;class PunctuationRenderer extends abstract_audio_renderer_1$1.AbstractAudioRenderer{markup(t){const e=AudioUtil.personalityMarkup(t);let r="",n=null,o=!1;for(let t,i=0;t=e[i];i++)AudioUtil.isMarkupElement(t)||(AudioUtil.isPauseElement(t)?o&&(n=AudioUtil.mergePause(n,t,Math.max)):(n&&(r+=this.pause(n[EngineConst$6.personalityProps.PAUSE]),n=null),r+=(o?this.getSeparator():"")+this.merge(t.span),o=!0));return r}pause(t){let e;return e="number"==typeof t?t<=250?"short":t<=500?"medium":"long":t,PunctuationRenderer.PAUSE_PUNCTUATION.get(e)||""}}punctuation_renderer.PunctuationRenderer=PunctuationRenderer,PunctuationRenderer.PAUSE_PUNCTUATION=new Map([["short",","],["medium",";"],["long","."]]);var sable_renderer={};Object.defineProperty(sable_renderer,"__esModule",{value:!0}),sable_renderer.SableRenderer=void 0;const EngineConst$5=engine_const,xml_renderer_1$2=xml_renderer;class SableRenderer extends xml_renderer_1$2.XmlRenderer{finalize(t){return'<?xml version="1.0"?><!DOCTYPE SABLE PUBLIC "-//SABLE//DTD SABLE speech mark up//EN" "Sable.v0_2.dtd" []><SABLE>'+this.getSeparator()+t+this.getSeparator()+"</SABLE>"}pause(t){return'<BREAK MSEC="'+this.pauseValue(t[EngineConst$5.personalityProps.PAUSE])+'"/>'}prosodyElement(t,e){switch(e=this.applyScaleFunction(e),t){case EngineConst$5.personalityProps.PITCH:return'<PITCH RANGE="'+e+'%">';case EngineConst$5.personalityProps.RATE:return'<RATE SPEED="'+e+'%">';case EngineConst$5.personalityProps.VOLUME:return'<VOLUME LEVEL="'+e+'%">';default:return"<"+t.toUpperCase()+' VALUE="'+e+'">'}}closeTag(t){return"</"+t.toUpperCase()+">"}}sable_renderer.SableRenderer=SableRenderer;var ssml_renderer={};Object.defineProperty(ssml_renderer,"__esModule",{value:!0}),ssml_renderer.SsmlRenderer=void 0;const engine_1$5=engine,EngineConst$4=engine_const,xml_renderer_1$1=xml_renderer;class SsmlRenderer extends xml_renderer_1$1.XmlRenderer{finalize(t){return'<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"><prosody rate="'+engine_1$5.default.getInstance().getRate()+'%">'+this.getSeparator()+t+this.getSeparator()+"</prosody></speak>"}pause(t){return'<break time="'+this.pauseValue(t[EngineConst$4.personalityProps.PAUSE])+'ms"/>'}prosodyElement(t,e){const r=(e=Math.floor(this.applyScaleFunction(e)))<0?e.toString():"+"+e.toString();return"<prosody "+t.toLowerCase()+'="'+r+(t===EngineConst$4.personalityProps.VOLUME?">":'%">')}closeTag(t){return"</prosody>"}}ssml_renderer.SsmlRenderer=SsmlRenderer;var ssml_step_renderer={};Object.defineProperty(ssml_step_renderer,"__esModule",{value:!0}),ssml_step_renderer.SsmlStepRenderer=void 0;const ssml_renderer_1$1=ssml_renderer;class SsmlStepRenderer extends ssml_renderer_1$1.SsmlRenderer{markup(t){return SsmlStepRenderer.MARKS={},super.markup(t)}merge(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r],o=n.attributes.extid;o&&!SsmlStepRenderer.MARKS[o]&&(e.push('<mark name="'+o+'"/>'),SsmlStepRenderer.MARKS[o]=!0),1===n.speech.length&&n.speech.match(/[a-zA-Z]/)?e.push('<say-as interpret-as="'+SsmlStepRenderer.CHARACTER_ATTR+'">'+n.speech+"</say-as>"):e.push(n.speech)}return e.join(this.getSeparator())}}ssml_step_renderer.SsmlStepRenderer=SsmlStepRenderer,SsmlStepRenderer.CHARACTER_ATTR="character",SsmlStepRenderer.MARKS={};var string_renderer={};Object.defineProperty(string_renderer,"__esModule",{value:!0}),string_renderer.StringRenderer=void 0;const abstract_audio_renderer_1=abstract_audio_renderer,audio_util_1=audio_util;class StringRenderer extends abstract_audio_renderer_1.AbstractAudioRenderer{markup(t){let e="";const r=(0,audio_util_1.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}}string_renderer.StringRenderer=StringRenderer,Object.defineProperty(aural_rendering,"__esModule",{value:!0}),aural_rendering.isXml=aural_rendering.registerRenderer=aural_rendering.error=aural_rendering.finalize=aural_rendering.merge=aural_rendering.markup=aural_rendering.getSeparator=aural_rendering.setSeparator=void 0;const engine_1$4=engine,EngineConst$3=engine_const,acss_renderer_1=acss_renderer,layout_renderer_1=layout_renderer,punctuation_renderer_1=punctuation_renderer,sable_renderer_1=sable_renderer,span_1=span,ssml_renderer_1=ssml_renderer,ssml_step_renderer_1=ssml_step_renderer,string_renderer_1=string_renderer,xml_renderer_1=xml_renderer,xmlInstance=new ssml_renderer_1.SsmlRenderer,renderers=new Map([[EngineConst$3.Markup.NONE,new string_renderer_1.StringRenderer],[EngineConst$3.Markup.PUNCTUATION,new punctuation_renderer_1.PunctuationRenderer],[EngineConst$3.Markup.LAYOUT,new layout_renderer_1.LayoutRenderer],[EngineConst$3.Markup.ACSS,new acss_renderer_1.AcssRenderer],[EngineConst$3.Markup.SABLE,new sable_renderer_1.SableRenderer],[EngineConst$3.Markup.VOICEXML,xmlInstance],[EngineConst$3.Markup.SSML,xmlInstance],[EngineConst$3.Markup.SSML_STEP,new ssml_step_renderer_1.SsmlStepRenderer]]);function setSeparator(t){const e=renderers.get(engine_1$4.default.getInstance().markup);e&&e.setSeparator(t)}function getSeparator(){const t=renderers.get(engine_1$4.default.getInstance().markup);return t?t.getSeparator():""}function markup(t){const e=renderers.get(engine_1$4.default.getInstance().markup);return e?e.markup(t):""}function merge(t){const e=t.map((t=>"string"==typeof t?new span_1.Span(t,{}):t)),r=renderers.get(engine_1$4.default.getInstance().markup);return r?r.merge(e):t.join()}function finalize(t){const e=renderers.get(engine_1$4.default.getInstance().markup);return e?e.finalize(t):t}function error(t){const e=renderers.get(engine_1$4.default.getInstance().markup);return e?e.error(t):""}function registerRenderer(t,e){renderers.set(t,e)}function isXml(){return renderers.get(engine_1$4.default.getInstance().markup)instanceof xml_renderer_1.XmlRenderer}aural_rendering.setSeparator=setSeparator,aural_rendering.getSeparator=getSeparator,aural_rendering.markup=markup,aural_rendering.merge=merge,aural_rendering.finalize=finalize,aural_rendering.error=error,aural_rendering.registerRenderer=registerRenderer,aural_rendering.isXml=isXml;var enrich={},semantic={},semantic_tree={},semantic_mathml={},semantic_parser={};Object.defineProperty(semantic_parser,"__esModule",{value:!0}),semantic_parser.SemanticAbstractParser=void 0;const semantic_node_factory_1$1=semantic_node_factory;class SemanticAbstractParser{constructor(t){this.type=t,this.factory_=new semantic_node_factory_1$1.SemanticNodeFactory}getFactory(){return this.factory_}setFactory(t){this.factory_=t}getType(){return this.type}parseList(t){const e=[];for(let r,n=0;r=t[n];n++)e.push(this.parse(r));return e}}semantic_parser.SemanticAbstractParser=SemanticAbstractParser,Object.defineProperty(semantic_mathml,"__esModule",{value:!0}),semantic_mathml.SemanticMathml=void 0;const DomUtil$i=dom_util,semantic_parser_1=semantic_parser,SemanticPred$2=semantic_pred,semantic_processor_1$2=semantic_processor,SemanticUtil$1=semantic_util;class SemanticMathml extends semantic_parser_1.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","ℂ","ℍ","ℕ","ℙ","ℚ","ℝ","ℤ"].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){semantic_processor_1$2.default.getInstance().setNodeFactory(this.getFactory());const e=DomUtil$i.toArray(t.childNodes),r=DomUtil$i.tagName(t),n=this.parseMap_[r],o=(n||this.dummy_.bind(this))(t,e);return SemanticUtil$1.addAttributes(o,t),-1!==["MATH","MROW","MPADDED","MSTYLE","SEMANTICS"].indexOf(r)||(o.mathml.unshift(t),o.mathmlTree=t),o}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 semantic_processor_1$2.default.proof(t,r,this.parseList.bind(this));let n;return 1===(e=SemanticUtil$1.purgeNodes(e)).length?(n=this.parse(e[0]),"empty"!==n.type||n.mathmlTree||(n.mathmlTree=t)):n=semantic_processor_1$2.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 semantic_processor_1$2.default.getInstance().fractionLikeNode(r,n,t.getAttribute("linethickness"),"true"===t.getAttribute("bevelled"))}limits_(t,e){return semantic_processor_1$2.default.getInstance().limitNode(DomUtil$i.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(SemanticUtil$1.purgeNodes(e));return this.getFactory().makeBranchNode("sqrt",[semantic_processor_1$2.default.getInstance().row(r)],[])}table_(t,e){const r=t.getAttribute("semantics");if(r&&r.match("bspr_"))return semantic_processor_1$2.default.proof(t,r,this.parseList.bind(this));const n=this.getFactory().makeBranchNode("table",this.parseList(e),[]);return n.mathmlTree=t,semantic_processor_1$2.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(SemanticUtil$1.purgeNodes(e));let n;n=r.length?1===r.length&&SemanticPred$2.isType(r[0],"empty")?r:[semantic_processor_1$2.default.getInstance().row(r)]:[];const o=this.getFactory().makeBranchNode("cell",n,[]);return o.role="table",o}space_(t,e){const r=t.getAttribute("width"),n=r&&r.match(/[a-z]*$/);if(!n)return this.empty_(t,e);const o=n[0],i=parseFloat(r.slice(0,n.index)),a={cm:.4,pc:.5,em:.5,ex:1,in:.15,pt:5,mm:5}[o];if(!a||isNaN(i)||i<a)return this.empty_(t,e);const s=this.getFactory().makeUnprocessed(t);return semantic_processor_1$2.default.getInstance().text(s,DomUtil$i.tagName(t))}text_(t,e){const r=this.leaf_(t,e);return t.textContent?(r.updateContent(t.textContent,!0),semantic_processor_1$2.default.getInstance().text(r,DomUtil$i.tagName(t))):r}identifier_(t,e){const r=this.leaf_(t,e);return semantic_processor_1$2.default.getInstance().identifierNode(r,semantic_processor_1$2.default.getInstance().font(t.getAttribute("mathvariant")),t.getAttribute("class"))}number_(t,e){const r=this.leaf_(t,e);return semantic_processor_1$2.default.number(r),r}operator_(t,e){const r=this.leaf_(t,e);return semantic_processor_1$2.default.getInstance().operatorNode(r),r}fenced_(t,e){const r=this.parseList(SemanticUtil$1.purgeNodes(e)),n=SemanticMathml.getAttribute_(t,"separators",","),o=SemanticMathml.getAttribute_(t,"open","("),i=SemanticMathml.getAttribute_(t,"close",")"),a=semantic_processor_1$2.default.getInstance().mfenced(o,i,n,r);return semantic_processor_1$2.default.getInstance().tablesInRow([a])[0]}enclosed_(t,e){const r=this.parseList(SemanticUtil$1.purgeNodes(e)),n=this.getFactory().makeBranchNode("enclose",[semantic_processor_1$2.default.getInstance().row(r)],[]);return n.role=t.getAttribute("notation")||"unknown",n}multiscripts_(t,e){if(!e.length)return this.getFactory().makeEmptyNode();const r=this.parse(e.shift());if(!e.length)return r;const n=[],o=[],i=[],a=[];let s=!1,l=0;for(let t,r=0;t=e[r];r++)"MPRESCRIPTS"!==DomUtil$i.tagName(t)?(s?1&l?n.push(t):o.push(t):1&l?i.push(t):a.push(t),l++):(s=!0,l=0);return SemanticUtil$1.purgeNodes(n).length||SemanticUtil$1.purgeNodes(o).length?semantic_processor_1$2.default.getInstance().tensor(r,this.parseList(o),this.parseList(n),this.parseList(a),this.parseList(i)):semantic_processor_1$2.default.getInstance().pseudoTensor(r,this.parseList(a),this.parseList(i))}empty_(t,e){return this.getFactory().makeEmptyNode()}action_(t,e){return e.length>1?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!==DomUtil$i.NodeType.TEXT_NODE){const r=this.getFactory().makeUnprocessed(t);return r.role=e[0].tagName,SemanticUtil$1.addAttributes(r,e[0]),r}return this.getFactory().makeLeafNode(t.textContent,semantic_processor_1$2.default.getInstance().font(t.getAttribute("mathvariant")))}}semantic_mathml.SemanticMathml=SemanticMathml;var semantic_heuristics={},semantic_heuristic={};Object.defineProperty(semantic_heuristic,"__esModule",{value:!0}),semantic_heuristic.SemanticMultiHeuristic=semantic_heuristic.SemanticTreeHeuristic=semantic_heuristic.SemanticAbstractHeuristic=void 0;class SemanticAbstractHeuristic{constructor(t,e,r=(t=>!1)){this.name=t,this.apply=e,this.applicable=r}}semantic_heuristic.SemanticAbstractHeuristic=SemanticAbstractHeuristic;class SemanticTreeHeuristic extends SemanticAbstractHeuristic{}semantic_heuristic.SemanticTreeHeuristic=SemanticTreeHeuristic;class SemanticMultiHeuristic extends SemanticAbstractHeuristic{}semantic_heuristic.SemanticMultiHeuristic=SemanticMultiHeuristic,Object.defineProperty(semantic_heuristics,"__esModule",{value:!0});const debugger_1$1=_debugger,engine_1$3=engine,SemanticAttr=semantic_attr,SemanticHeuristics=semantic_heuristic_factory,semantic_heuristic_1=semantic_heuristic,SemanticPred$1=semantic_pred,semantic_processor_1$1=semantic_processor,SemanticUtil=semantic_util;function combineJuxtaposition(t){for(let e,r=t.childNodes.length-1;e=t.childNodes[r];r--)SemanticPred$1.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}function juxtapositionPrePost(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=convertPrePost(i,n,r)}return i.length||n.length?(e.push(o),r.push(n)):(i.push(o),convertPrePost(i,n,r)),{rel:e,comp:r}}function convertPrePost(t,e,r){let n=null;if(!t.length)return n;const o=r[r.length-1],i=o&&o.length,a=e&&e.length,s=semantic_processor_1$1.default.getInstance();if(i&&a){if("infixop"===e[0].type&&"implicit"===e[0].role)return n=t.pop(),o.push(s.postfixNode_(o.pop(),t)),n;n=t.shift();const r=s.prefixNode_(e.shift(),t);return e.unshift(r),n}return i?(o.push(s.postfixNode_(o.pop(),t)),n):(a&&e.unshift(s.prefixNode_(e.shift(),t)),n)}function recurseJuxtaposition(t,e,r){if(!e.length)return t;const n=t.pop(),o=e.shift(),i=r.shift();if(SemanticPred$1.isImplicitOp(o)){debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 2");const a=(n?[n,o]:[o]).concat(i);return recurseJuxtaposition(t.concat(a),e,r)}if(!n)return debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 3"),recurseJuxtaposition([o].concat(i),e,r);const a=i.shift();if(!a){debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 9");const i=SemanticHeuristics.factory.makeBranchNode("infixop",[n,e.shift()],[o],o.textContent);return i.role="implicit",SemanticHeuristics.run("combine_juxtaposition",i),e.unshift(i),recurseJuxtaposition(t,e,r)}if(SemanticPred$1.isOperator(n)||SemanticPred$1.isOperator(a))return debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 4"),recurseJuxtaposition(t.concat([n,o,a]).concat(i),e,r);let s=null;return SemanticPred$1.isImplicitOp(n)&&SemanticPred$1.isImplicitOp(a)?(debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 5"),n.contentNodes.push(o),n.contentNodes=n.contentNodes.concat(a.contentNodes),n.childNodes.push(a),n.childNodes=n.childNodes.concat(a.childNodes),a.childNodes.forEach((t=>t.parent=n)),o.parent=n,n.addMathmlNodes(o.mathml),n.addMathmlNodes(a.mathml),s=n):SemanticPred$1.isImplicitOp(n)?(debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 6"),n.contentNodes.push(o),n.childNodes.push(a),a.parent=n,o.parent=n,n.addMathmlNodes(o.mathml),n.addMathmlNodes(a.mathml),s=n):SemanticPred$1.isImplicitOp(a)?(debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 7"),a.contentNodes.unshift(o),a.childNodes.unshift(n),n.parent=a,o.parent=a,a.addMathmlNodes(o.mathml),a.addMathmlNodes(n.mathml),s=a):(debugger_1$1.Debugger.getInstance().output("Juxta Heuristic Case 8"),s=SemanticHeuristics.factory.makeBranchNode("infixop",[n,a],[o],o.textContent),s.role="implicit"),t.push(s),recurseJuxtaposition(t.concat(i),e,r)}SemanticHeuristics.add(new semantic_heuristic_1.SemanticTreeHeuristic("combine_juxtaposition",combineJuxtaposition)),SemanticHeuristics.add(new semantic_heuristic_1.SemanticTreeHeuristic("propagateSimpleFunction",(t=>("infixop"!==t.type&&"fraction"!==t.type||!t.childNodes.every(SemanticPred$1.isSimpleFunction)||(t.role="composed function"),t)),(t=>"clearspeak"===engine_1$3.default.getInstance().domain))),SemanticHeuristics.add(new semantic_heuristic_1.SemanticTreeHeuristic("simpleNamedFunction",(t=>("unit"!==t.role&&-1!==["f","g","h","F","G","H"].indexOf(t.textContent)&&(t.role="simple function"),t)),(t=>"clearspeak"===engine_1$3.default.getInstance().domain))),SemanticHeuristics.add(new semantic_heuristic_1.SemanticTreeHeuristic("propagateComposedFunction",(t=>("fenced"===t.type&&"composed function"===t.childNodes[0].role&&(t.role="composed function"),t)),(t=>"clearspeak"===engine_1$3.default.getInstance().domain))),SemanticHeuristics.add(new semantic_heuristic_1.SemanticTreeHeuristic("multioperator",(t=>{if("unknown"!==t.role||t.textContent.length<=1)return;const e=[...t.textContent].map(SemanticAttr.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)}))),SemanticHeuristics.add(new semantic_heuristic_1.SemanticMultiHeuristic("convert_juxtaposition",(t=>{let e=SemanticUtil.partitionNodes(t,(function(t){return t.textContent===SemanticAttr.invisibleTimes()&&"operator"===t.type}));e=e.rel.length?juxtapositionPrePost(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=SemanticUtil.partitionNodes(t,(function(t){return t.textContent===SemanticAttr.invisibleTimes()&&("operator"===t.type||"infixop"===t.type)})),e.rel.length?recurseJuxtaposition(e.comp.shift(),e.rel,e.comp):t}))),SemanticHeuristics.add(new semantic_heuristic_1.SemanticTreeHeuristic("simple2prefix",(t=>(t.textContent.length>1&&!t.textContent[0].match(/[A-Z]/)&&(t.role="prefix function"),t)),(t=>"braille"===engine_1$3.default.getInstance().modality&&"identifier"===t.type))),SemanticHeuristics.add(new semantic_heuristic_1.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}))))),Object.defineProperty(semantic_tree,"__esModule",{value:!0}),semantic_tree.SemanticTree=void 0;const DomUtil$h=dom_util,semantic_annotations_1=semantic_annotations,semantic_annotator_1=semantic_annotator,semantic_mathml_1=semantic_mathml,semantic_node_1$1=semantic_node,SemanticPred=semantic_pred;class SemanticTree{constructor(t){this.mathml=t,this.parser=new semantic_mathml_1.SemanticMathml,this.root=this.parser.parse(t),this.collator=this.parser.getFactory().leafMap.collateMeaning();const e=this.collator.newDefault();e&&(this.parser=new semantic_mathml_1.SemanticMathml,this.parser.getFactory().defaultMap=e,this.root=this.parser.parse(t)),unitVisitor.visit(this.root,{}),(0,semantic_annotations_1.annotate)(this.root)}static empty(){const t=DomUtil$h.parseInput("<math/>"),e=new SemanticTree(t);return e.mathml=t,e}static fromNode(t,e){const r=SemanticTree.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=SemanticTree.fromNode(r);return e&&(n.mathml=e),n}static fromXml(t){const e=SemanticTree.empty();return t.childNodes[0]&&(e.root=semantic_node_1$1.SemanticNode.fromXml(t.childNodes[0])),e}xml(t){const e=DomUtil$h.parseInput("<stree></stree>"),r=this.root.xml(e.ownerDocument,t);return e.appendChild(r),e}toString(t){return DomUtil$h.serializeXml(this.xml(t))}formatXml(t){const e=this.toString(t);return DomUtil$h.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}}semantic_tree.SemanticTree=SemanticTree;const unitVisitor=new semantic_annotator_1.SemanticVisitor("general","unit",((t,e)=>{if("infixop"===t.type&&("multiplication"===t.role||"implicit"===t.role)){const e=t.childNodes;e.length&&(SemanticPred.isPureUnit(e[0])||SemanticPred.isUnitCounter(e[0]))&&t.childNodes.slice(1).every(SemanticPred.isPureUnit)&&(t.role="unit")}return!1}));Object.defineProperty(semantic,"__esModule",{value:!0}),semantic.getTreeFromString=semantic.getTree=semantic.xmlTree=void 0;const DomUtil$g=dom_util,semantic_tree_1$2=semantic_tree;function xmlTree(t){return getTree(t).xml()}function getTree(t){return new semantic_tree_1$2.SemanticTree(t)}function getTreeFromString(t){return getTree(DomUtil$g.parseInput(t))}semantic.xmlTree=xmlTree,semantic.getTree=getTree,semantic.getTreeFromString=getTreeFromString;var enrich_mathml={},semantic_skeleton={},enrich_attr={};!function(t){var e;function r(t){return t.map((function(t){return t.id})).join(",")}function n(t,r){const n=[];"mglyph"===r.role&&n.push("image"),r.attributes.href&&n.push("link"),n.length&&t.setAttribute(e.POSTFIX,n.join(" "))}Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=t.removeAttributePrefix=t.setPostfix=t.setAttributes=t.makeIdList=t.EnrichAttributes=t.Attribute=t.Prefix=void 0,t.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.ATTRIBUTES="data-semantic-attributes",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"}(e=t.Attribute||(t.Attribute={})),t.EnrichAttributes=[e.ADDED,e.ALTERNATIVE,e.CHILDREN,e.COLLAPSED,e.CONTENT,e.EMBELLISHED,e.FENCEPOINTER,e.FONT,e.ID,e.ANNOTATION,e.ATTRIBUTES,e.OPERATOR,e.OWNS,e.PARENT,e.POSTFIX,e.PREFIX,e.ROLE,e.SPEECH,e.STRUCTURE,e.TYPE],t.makeIdList=r,t.setAttributes=function(o,i){o.setAttribute(e.TYPE,i.type);const a=i.allAttributes();for(let e,r=0;e=a[r];r++)o.setAttribute(t.Prefix+e[0].toLowerCase(),e[1]);i.childNodes.length&&o.setAttribute(e.CHILDREN,r(i.childNodes)),i.contentNodes.length&&o.setAttribute(e.CONTENT,r(i.contentNodes)),i.parent&&o.setAttribute(e.PARENT,i.parent.id.toString());const s=i.attributesXml();s&&o.setAttribute(e.ATTRIBUTES,s),n(o,i)},t.setPostfix=n,t.removeAttributePrefix=function(e){return e.toString().replace(new RegExp(t.Prefix,"g"),"")},t.addPrefix=function(e){return t.Prefix+e}}(enrich_attr),getDefaultExportFromCjs(enrich_attr),Object.defineProperty(semantic_skeleton,"__esModule",{value:!0}),semantic_skeleton.SemanticSkeleton=void 0;const BaseUtil=base_util,XpathUtil$5=xpath_util,enrich_attr_1$i=enrich_attr;class SemanticSkeleton{constructor(t){this.parents=null,this.levelsMap=null,t=0===t?t:t||[],this.array=t}static fromTree(t){return SemanticSkeleton.fromNode(t.root)}static fromNode(t){return new SemanticSkeleton(SemanticSkeleton.fromNode_(t))}static fromString(t){return new SemanticSkeleton(SemanticSkeleton.fromString_(t))}static simpleCollapseStructure(t){return"number"==typeof t}static contentCollapseStructure(t){return!!t&&!SemanticSkeleton.simpleCollapseStructure(t)&&"c"===t[0]}static interleaveIds(t,e){return BaseUtil.interleaveLists(SemanticSkeleton.collapsedLeafs(t),SemanticSkeleton.collapsedLeafs(e))}static collapsedLeafs(...t){return t.reduce(((t,e)=>{return t.concat((r=e,SemanticSkeleton.simpleCollapseStructure(r)?[r]:SemanticSkeleton.contentCollapseStructure(r[1])?r.slice(2):r.slice(1)));var r}),[])}static fromStructure(t,e){return new SemanticSkeleton(SemanticSkeleton.tree_(t,e.root))}static combineContentChildren(t,e,r){switch(t.type){case"relseq":case"infixop":case"multirel":return BaseUtil.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 SemanticSkeleton.simpleCollapseStructure(t)?t.toString():SemanticSkeleton.contentCollapseStructure(t)?"(c "+t.slice(1).map(SemanticSkeleton.makeSexp_).join(" ")+")":"("+t.map(SemanticSkeleton.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(SemanticSkeleton.fromNode_),r.unshift("c"));const n=t.childNodes;if(!n.length)return e.length?[t.id,r]:t.id;const o=n.map(SemanticSkeleton.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],o=XpathUtil$5.evalXPath(`.//self::*[@${enrich_attr_1$i.Attribute.ID}=${r}]`,t)[0],i=SemanticSkeleton.combineContentChildren(e,e.contentNodes.map((function(t){return t})),e.childNodes.map((function(t){return t})));o&&SemanticSkeleton.addOwns_(o,i);for(let e,r=0;e=i[r];r++)n.push(SemanticSkeleton.tree_(t,e));return n}static addOwns_(t,e){const r=t.getAttribute(enrich_attr_1$i.Attribute.COLLAPSED),n=r?SemanticSkeleton.realLeafs_(SemanticSkeleton.fromString(r).array):e.map((t=>t.id));t.setAttribute(enrich_attr_1$i.Attribute.OWNS,n.join(" "))}static realLeafs_(t){if(SemanticSkeleton.simpleCollapseStructure(t))return[t];if(SemanticSkeleton.contentCollapseStructure(t))return[];let e=[];for(let r=1;r<t.length;r++)e=e.concat(SemanticSkeleton.realLeafs_(t[r]));return e}populate(){this.parents&&this.levelsMap||(this.parents={},this.levelsMap={},this.populate_(this.array,this.array,[]))}toString(){return SemanticSkeleton.makeSexp_(this.array)}populate_(t,e,r){if(SemanticSkeleton.simpleCollapseStructure(t))return this.levelsMap[t]=e,void(this.parents[t]=t===r[0]?r.slice(1):r);const n=SemanticSkeleton.contentCollapseStructure(t)?t.slice(1):t,o=[n[0]].concat(r);for(let e=0,r=n.length;e<r;e++){const r=n[e];this.populate_(r,t,o)}}isRoot(t){return t===this.levelsMap[t][0]}directChildren(t){if(!this.isRoot(t))return[];return this.levelsMap[t].slice(1).map((t=>SemanticSkeleton.simpleCollapseStructure(t)?t:SemanticSkeleton.contentCollapseStructure(t)?t[1]:t[0]))}subtreeNodes(t){if(!this.isRoot(t))return[];const e=(t,r)=>{SemanticSkeleton.simpleCollapseStructure(t)?r.push(t):(SemanticSkeleton.contentCollapseStructure(t)&&(t=t.slice(1)),t.forEach((t=>e(t,r))))},r=this.levelsMap[t],n=[];return e(r.slice(1),n),n}}semantic_skeleton.SemanticSkeleton=SemanticSkeleton;var enrich_case={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.factory=t.getCase=void 0,t.getCase=function(e){for(let r,n=0;r=t.factory[n];n++)if(r.test(e))return r.constr(e);return null},t.factory=[]}(enrich_case),getDefaultExportFromCjs(enrich_case),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.printNodeList__=t.collapsePunctuated=t.getInnerNode=t.setOperatorAttribute_=t.createInvisibleOperator_=t.rewriteMfenced=t.cloneContentNode=t.addCollapsedAttribute=t.parentNode_=t.isIgnorable_=t.unitChild_=t.descendNode_=t.ascendNewNode=t.validLca_=t.pathToRoot_=t.attachedElement_=t.prunePath_=t.mathmlLca_=t.lcaType=t.functionApplication_=t.isDescendant_=t.insertNewChild_=t.mergeChildren_=t.collectChildNodes_=t.collateChildNodes_=t.childrenSubset_=t.moveSemanticAttributes_=t.introduceLayerAboveLca=t.introduceNewLayer=t.walkTree=t.enrich=t.SETTINGS=void 0;const e=_debugger,r=dom_util,n=engine,o=semantic_attr,i=semantic_heuristic_factory,a=semantic_skeleton,s=semantic_util,l=enrich_attr,c=enrich_case;function u(t){const r=(0,c.getCase)(t);let n;if(r)return n=r.getMathml(),O(n);if(1===t.mathml.length)return e.Debugger.getInstance().output("Walktree Case 0"),n=t.mathml[0],l.setAttributes(n,t),t.childNodes.length&&(e.Debugger.getInstance().output("Walktree Case 0.1"),t.childNodes.forEach((function(t){"empty"===t.type&&n.appendChild(u(t))}))),O(n);const o=t.contentNodes.map(w);I(t,o);const i=t.childNodes.map(u),s=a.SemanticSkeleton.combineContentChildren(t,o,i);if(n=t.mathmlTree,null===n)e.Debugger.getInstance().output("Walktree Case 1"),n=d(s,t);else{const t=E(s);e.Debugger.getInstance().output("Walktree Case 2"),t?(e.Debugger.getInstance().output("Walktree Case 2.1"),n=t.parentNode):(e.Debugger.getInstance().output("Walktree Case 2.2"),n=k(n))}return n=P(n),g(n,s,t),l.setAttributes(n,t),O(n)}function d(t,n){const o=M(t);let i=o.node;const a=o.type;if(a!==x.VALID||!s.hasEmptyTag(i))if(e.Debugger.getInstance().output("Walktree Case 1.1"),i=r.createElement("mrow"),a===x.PRUNED)e.Debugger.getInstance().output("Walktree Case 1.1.0"),i=p(i,o.node,t);else if(t[0]){e.Debugger.getInstance().output("Walktree Case 1.1.1");const n=E(t),o=h(n.parentNode,t);r.replaceNode(n,i),o.forEach((function(t){i.appendChild(t)}))}return n.mathmlTree||(n.mathmlTree=i),i}function p(t,n,o){let i=A(n);if(s.hasMathTag(i)){e.Debugger.getInstance().output("Walktree Case 1.1.0.0"),m(i,t),r.toArray(i.childNodes).forEach((function(e){t.appendChild(e)}));const n=t;t=i,i=n}const a=o.indexOf(n);return o[a]=i,r.replaceNode(i,t),t.appendChild(i),o.forEach((function(e){t.appendChild(e)})),t}function m(t,e){for(const r of l.EnrichAttributes)t.hasAttribute(r)&&(e.setAttribute(r,t.getAttribute(r)),t.removeAttribute(r))}function h(t,e){const n=r.toArray(t.childNodes);let o=1/0,i=-1/0;return e.forEach((function(t){const e=n.indexOf(t);-1!==e&&(o=Math.min(o,e),i=Math.max(i,e))})),n.slice(o,i+1)}function f(t,e,n){const o=[];let i=r.toArray(t.childNodes),a=!1;for(;i.length;){const t=i.shift();if(t.hasAttribute(l.Attribute.TYPE)){o.push(t);continue}const e=_(t);0!==e.length&&(1!==e.length?(a?t.setAttribute("AuxiliaryImplicit",!0):a=!0,i=e.concat(i)):o.push(t))}const s=[],c=n.childNodes.map((function(t){return t.mathmlTree}));for(;c.length;){const t=c.pop();if(t){if(-1!==o.indexOf(t))break;-1!==e.indexOf(t)&&s.unshift(t)}}return o.concat(s)}function _(t){const e=[];let n=r.toArray(t.childNodes);for(;n.length;){const t=n.shift();t.nodeType===r.NodeType.ELEMENT_NODE&&(t.hasAttribute(l.Attribute.TYPE)?e.push(t):n=r.toArray(t.childNodes).concat(n))}return e}function g(t,e,n){const o="implicit"===n.role&&i.flags.combine_juxtaposition?f(t,e,n):r.toArray(t.childNodes);if(!o.length)return void e.forEach((function(e){t.appendChild(e)}));let a=0;for(;e.length;){const r=e[0];o[a]===r||v(o[a],r)?(e.shift(),a++):o[a]&&-1===e.indexOf(o[a])?a++:(b(r,t)||y(t,o[a],r),e.shift())}}function y(t,e,r){if(!e)return void t.insertBefore(r,null);let n=e,o=N(n);for(;o&&o.firstChild===n&&!n.hasAttribute("AuxiliaryImplicit")&&o!==t;)n=o,o=N(n);o&&(o.insertBefore(r,n),n.removeAttribute("AuxiliaryImplicit"))}function b(t,e){if(!t)return!1;do{if((t=t.parentNode)===e)return!0}while(t);return!1}function v(t,e){const n=o.functionApplication();if(t&&e&&t.textContent&&e.textContent&&t.textContent===n&&e.textContent===n&&"true"===e.getAttribute(l.Attribute.ADDED)){for(let r,n=0;r=t.attributes[n];n++)e.hasAttribute(r.nodeName)||e.setAttribute(r.nodeName,r.nodeValue);return r.replaceNode(t,e),!0}return!1}var x;function M(t){const e=E(t);if(!e)return{type:x.INVALID,node:null};const r=E(t.slice().reverse());if(e===r)return{type:x.VALID,node:e};const n=C(e),o=S(n,t),i=C(r,(function(t){return-1!==o.indexOf(t)})),a=i[0],s=o.indexOf(a);return-1===s?{type:x.INVALID,node:null}:{type:o.length!==n.length?x.PRUNED:$(o[s+1],i[1])?x.VALID:x.INVALID,node:a}}function S(t,e){let r=0;for(;t[r]&&-1===e.indexOf(t[r]);)r++;return t.slice(0,r+1)}function E(t){let e=0,r=null;for(;!r&&e<t.length;)t[e].parentNode&&(r=t[e]),e++;return r}function C(t,e){const r=e||(t=>!1),n=[t];for(;!r(t)&&!s.hasMathTag(t)&&t.parentNode;)t=N(t),n.unshift(t);return n}function $(t,e){return!(!t||!e||t.previousSibling||e.nextSibling)}function O(t){for(;!s.hasMathTag(t)&&j(t);)t=N(t);return t}function A(t){const e=r.toArray(t.childNodes);if(!e)return t;const n=e.filter((function(t){return t.nodeType===r.NodeType.ELEMENT_NODE&&!s.hasIgnoreTag(t)}));return 1===n.length&&s.hasEmptyTag(n[0])&&!n[0].hasAttribute(l.Attribute.TYPE)?A(n[0]):t}function j(t){const e=N(t);return!(!e||!s.hasEmptyTag(e))&&r.toArray(e.childNodes).every((function(e){return e===t||T(e)}))}function T(t){if(t.nodeType!==r.NodeType.ELEMENT_NODE)return!0;if(!t||s.hasIgnoreTag(t))return!0;const e=r.toArray(t.childNodes);return!(!s.hasEmptyTag(t)&&e.length||s.hasDisplayTag(t)||t.hasAttribute(l.Attribute.TYPE)||s.isOrphanedGlyph(t))&&r.toArray(t.childNodes).every(T)}function N(t){return t.parentNode}function w(e){if(e.mathml.length)return u(e);const n=t.SETTINGS.implicit?L(e):r.createElement("mrow");return e.mathml=[n],n}function P(t){if("MFENCED"!==r.tagName(t))return t;const e=r.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 r.toArray(t.childNodes).forEach((function(t){e.appendChild(t)})),r.replaceNode(t,e),e}function L(t){const e=r.createElement("mo"),n=r.createTextNode(t.textContent);return e.appendChild(n),l.setAttributes(e,t),e.setAttribute(l.Attribute.ADDED,"true"),e}function I(t,e){const r=t.type+(t.textContent?","+t.textContent:"");e.forEach((function(t){k(t).setAttribute(l.Attribute.OPERATOR,r)}))}function k(t){const e=r.toArray(t.childNodes);if(!e)return t;const n=e.filter((function(t){return!T(t)})),o=[];for(let t,e=0;t=n[e];e++)if(s.hasEmptyTag(t)){const e=k(t);e&&e!==t&&o.push(e)}else o.push(t);return 1===o.length?o[0]:t}function R(t,e,n=!1){const o=l.removeAttributePrefix(r.formatXml(t.toString()));return n?e+":\n```html\n"+o+"\n```\n":o}t.SETTINGS={collapsed:!0,implicit:!0,wiki:!0},t.enrich=function(o,i){const s=r.cloneNode(o);return u(i.root),n.default.getInstance().structure&&o.setAttribute(l.Attribute.STRUCTURE,a.SemanticSkeleton.fromStructure(o,i).toString()),e.Debugger.getInstance().generateOutput((()=>[R(s,"Original MathML",t.SETTINGS.wiki),R(i,"Semantic Tree",t.SETTINGS.wiki),R(o,"Semantically enriched MathML",t.SETTINGS.wiki)])),o},t.walkTree=u,t.introduceNewLayer=d,t.introduceLayerAboveLca=p,t.moveSemanticAttributes_=m,t.childrenSubset_=h,t.collateChildNodes_=f,t.collectChildNodes_=_,t.mergeChildren_=g,t.insertNewChild_=y,t.isDescendant_=b,t.functionApplication_=v,function(t){t.VALID="valid",t.INVALID="invalid",t.PRUNED="pruned"}(x=t.lcaType||(t.lcaType={})),t.mathmlLca_=M,t.prunePath_=S,t.attachedElement_=E,t.pathToRoot_=C,t.validLca_=$,t.ascendNewNode=O,t.descendNode_=A,t.unitChild_=j,t.isIgnorable_=T,t.parentNode_=N,t.addCollapsedAttribute=function(t,e){const r=new a.SemanticSkeleton(e);t.setAttribute(l.Attribute.COLLAPSED,r.toString())},t.cloneContentNode=w,t.rewriteMfenced=P,t.createInvisibleOperator_=L,t.setOperatorAttribute_=I,t.getInnerNode=k,t.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 a=[t.id,i];for(let e,i=0;e=t.childNodes[i];i++){const t=u(e);n.push(t);const i=k(t);o&&!r&&i.setAttribute(l.Attribute.PARENT,o.id.toString()),a.push(e.id)}return a},t.printNodeList__=function(t,e){console.info(t),r.toArray(e).forEach((function(t){console.info(t.toString())})),console.info("<<<<<<<<<<<<<<<<<")}}(enrich_mathml),getDefaultExportFromCjs(enrich_mathml);var enrich_case_factory={},case_binomial={},abstract_enrich_case={};Object.defineProperty(abstract_enrich_case,"__esModule",{value:!0}),abstract_enrich_case.AbstractEnrichCase=void 0;class AbstractEnrichCase{constructor(t){this.semantic=t}}abstract_enrich_case.AbstractEnrichCase=AbstractEnrichCase,Object.defineProperty(case_binomial,"__esModule",{value:!0}),case_binomial.CaseBinomial=void 0;const DomUtil$f=dom_util,abstract_enrich_case_1$8=abstract_enrich_case,enrich_mathml_1=enrich_mathml,enrich_attr_1$h=enrich_attr;class CaseBinomial extends abstract_enrich_case_1$8.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,enrich_mathml_1.walkTree)(t),this.mml.hasAttribute(enrich_attr_1$h.Attribute.TYPE)){const t=DomUtil$f.createElement("mrow");t.setAttribute(enrich_attr_1$h.Attribute.ADDED,"true"),DomUtil$f.replaceNode(this.mml,t),t.appendChild(this.mml),this.mml=t}return(0,enrich_attr_1$h.setAttributes)(this.mml,this.semantic),this.mml}}case_binomial.CaseBinomial=CaseBinomial;var case_double_script={};Object.defineProperty(case_double_script,"__esModule",{value:!0}),case_double_script.CaseDoubleScript=void 0;const DomUtil$e=dom_util,abstract_enrich_case_1$7=abstract_enrich_case,EnrichMathml$a=enrich_mathml,enrich_attr_1$g=enrich_attr;class CaseDoubleScript extends abstract_enrich_case_1$7.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=DomUtil$e.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=EnrichMathml$a.walkTree(r),i=EnrichMathml$a.walkTree(e),a=EnrichMathml$a.walkTree(n);return(0,enrich_attr_1$g.setAttributes)(this.mml,this.semantic),this.mml.setAttribute(enrich_attr_1$g.Attribute.CHILDREN,(0,enrich_attr_1$g.makeIdList)([e,n,r])),[i,a,o].forEach((t=>EnrichMathml$a.getInnerNode(t).setAttribute(enrich_attr_1$g.Attribute.PARENT,this.mml.getAttribute(enrich_attr_1$g.Attribute.ID)))),this.mml.setAttribute(enrich_attr_1$g.Attribute.TYPE,t.role),EnrichMathml$a.addCollapsedAttribute(this.mml,[this.semantic.id,[t.id,e.id,n.id],r.id]),this.mml}}case_double_script.CaseDoubleScript=CaseDoubleScript;var case_embellished={},case_multiscripts={},case_multiindex={};Object.defineProperty(case_multiindex,"__esModule",{value:!0}),case_multiindex.CaseMultiindex=void 0;const DomUtil$d=dom_util,abstract_enrich_case_1$6=abstract_enrich_case,EnrichMathml$9=enrich_mathml,enrich_attr_1$f=enrich_attr;class CaseMultiindex extends abstract_enrich_case_1$6.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static multiscriptIndex(t){return"punctuated"===t.type&&"dummy"===t.contentNodes[0].role?EnrichMathml$9.collapsePunctuated(t):(EnrichMathml$9.walkTree(t),t.id)}static createNone_(t){const e=DomUtil$d.createElement("none");return t&&(0,enrich_attr_1$f.setAttributes)(e,t),e.setAttribute(enrich_attr_1$f.Attribute.ADDED,"true"),e}completeMultiscript(t,e){const r=DomUtil$d.toArray(this.mml.childNodes).slice(1);let n=0;const o=t=>{for(let e,o=0;e=t[o];o++){const t=r[n];if(t&&e===parseInt(EnrichMathml$9.getInnerNode(t).getAttribute(enrich_attr_1$f.Attribute.ID)))EnrichMathml$9.getInnerNode(t).setAttribute(enrich_attr_1$f.Attribute.PARENT,this.semantic.id.toString()),n++;else{const r=this.semantic.querySelectorAll((t=>t.id===e));this.mml.insertBefore(CaseMultiindex.createNone_(r[0]),t||null)}}};o(t),r[n]&&"MPRESCRIPTS"!==DomUtil$d.tagName(r[n])?this.mml.insertBefore(r[n],DomUtil$d.createElement("mprescripts")):n++,o(e)}}case_multiindex.CaseMultiindex=CaseMultiindex,Object.defineProperty(case_multiscripts,"__esModule",{value:!0}),case_multiscripts.CaseMultiscripts=void 0;const DomUtil$c=dom_util,semantic_skeleton_1$3=semantic_skeleton,case_multiindex_1$1=case_multiindex,EnrichMathml$8=enrich_mathml,enrich_attr_1$e=enrich_attr;class CaseMultiscripts extends case_multiindex_1$1.CaseMultiindex{static test(t){if(!t.mathmlTree)return!1;return"MMULTISCRIPTS"===DomUtil$c.tagName(t.mathmlTree)&&("superscript"===t.type||"subscript"===t.type)}constructor(t){super(t)}getMathml(){let t,e,r;if((0,enrich_attr_1$e.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=case_multiindex_1$1.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),r=case_multiindex_1$1.CaseMultiindex.multiscriptIndex(n.childNodes[1]);const o=[this.semantic.id,[n.id,t.id,r],e];EnrichMathml$8.addCollapsedAttribute(this.mml,o),this.mml.setAttribute(enrich_attr_1$e.Attribute.TYPE,n.role),this.completeMultiscript(semantic_skeleton_1$3.SemanticSkeleton.interleaveIds(r,e),[])}else{t=this.semantic.childNodes[0],e=case_multiindex_1$1.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);const r=[this.semantic.id,t.id,e];EnrichMathml$8.addCollapsedAttribute(this.mml,r)}const n=semantic_skeleton_1$3.SemanticSkeleton.collapsedLeafs(r||[],e),o=EnrichMathml$8.walkTree(t);return EnrichMathml$8.getInnerNode(o).setAttribute(enrich_attr_1$e.Attribute.PARENT,this.semantic.id.toString()),n.unshift(t.id),this.mml.setAttribute(enrich_attr_1$e.Attribute.CHILDREN,n.join(",")),this.mml}}case_multiscripts.CaseMultiscripts=CaseMultiscripts;var case_tensor={};Object.defineProperty(case_tensor,"__esModule",{value:!0}),case_tensor.CaseTensor=void 0;const semantic_skeleton_1$2=semantic_skeleton,case_multiindex_1=case_multiindex,EnrichMathml$7=enrich_mathml,enrich_attr_1$d=enrich_attr;class CaseTensor extends case_multiindex_1.CaseMultiindex{static test(t){return!!t.mathmlTree&&"tensor"===t.type}constructor(t){super(t)}getMathml(){EnrichMathml$7.walkTree(this.semantic.childNodes[0]);const t=case_multiindex_1.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),e=case_multiindex_1.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[2]),r=case_multiindex_1.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[3]),n=case_multiindex_1.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[4]);(0,enrich_attr_1$d.setAttributes)(this.mml,this.semantic);const o=[this.semantic.id,this.semantic.childNodes[0].id,t,e,r,n];EnrichMathml$7.addCollapsedAttribute(this.mml,o);const i=semantic_skeleton_1$2.SemanticSkeleton.collapsedLeafs(t,e,r,n);return i.unshift(this.semantic.childNodes[0].id),this.mml.setAttribute(enrich_attr_1$d.Attribute.CHILDREN,i.join(",")),this.completeMultiscript(semantic_skeleton_1$2.SemanticSkeleton.interleaveIds(r,n),semantic_skeleton_1$2.SemanticSkeleton.interleaveIds(t,e)),this.mml}}case_tensor.CaseTensor=CaseTensor,Object.defineProperty(case_embellished,"__esModule",{value:!0}),case_embellished.CaseEmbellished=void 0;const DomUtil$b=dom_util,semantic_node_1=semantic_node,abstract_enrich_case_1$5=abstract_enrich_case,case_double_script_1$1=case_double_script,case_multiscripts_1$1=case_multiscripts,case_tensor_1$1=case_tensor,EnrichMathml$6=enrich_mathml,enrich_attr_1$c=enrich_attr;class CaseEmbellished extends abstract_enrich_case_1$5.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=DomUtil$b.createElement("mrow"),r=new semantic_node_1.SemanticNode(t);return r.type="empty",r.mathmlTree=e,r}static fencedMap_(t,e){e[t.id]=t.mathmlTree,t.embellished&&CaseEmbellished.fencedMap_(t.childNodes[0],e)}getMathml(){this.getFenced_(),this.fencedMml=EnrichMathml$6.walkTree(this.fenced),this.getFencesMml_(),"empty"!==this.fenced.type||this.fencedMml.parentNode||(this.fencedMml.setAttribute(enrich_attr_1$c.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],CaseEmbellished.fencedMap_(this.ofence,this.ofenceMap),CaseEmbellished.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=EnrichMathml$6.ascendNewNode(this.ofenceMml)),this.cfenceMml&&(this.cfenceMml=EnrichMathml$6.ascendNewNode(this.cfenceMml))}rewrite_(){let t=this.semantic,e=null;const r=this.introduceNewLayer_();for((0,enrich_attr_1$c.setAttributes)(r,this.fenced.parent);!this.fencedElement(t);){const n=t.mathmlTree,o=this.specialCase_(t,n);if(o)t=o;else{(0,enrich_attr_1$c.setAttributes)(n,t);const e=[];for(let r,n=1;r=t.childNodes[n];n++)e.push(EnrichMathml$6.walkTree(r));t=t.childNodes[0]}const i=DomUtil$b.createElement("dummy"),a=n.childNodes[0];DomUtil$b.replaceNode(n,i),DomUtil$b.replaceNode(r,n),DomUtil$b.replaceNode(n.childNodes[0],r),DomUtil$b.replaceNode(i,a),e||(e=n)}return EnrichMathml$6.walkTree(this.ofence),EnrichMathml$6.walkTree(this.cfence),this.cleanupParents_(),e||r}specialCase_(t,e){const r=DomUtil$b.tagName(e);let n,o=null;if("MSUBSUP"===r?(o=t.childNodes[0],n=case_double_script_1$1.CaseDoubleScript):"MMULTISCRIPTS"===r&&("superscript"===t.type||"subscript"===t.type?n=case_multiscripts_1$1.CaseMultiscripts:"tensor"===t.type&&(n=case_tensor_1$1.CaseTensor),o=n&&t.childNodes[0]&&"subsup"===t.childNodes[0].role?t.childNodes[0]:t),!o)return null;const i=o.childNodes[0],a=CaseEmbellished.makeEmptyNode_(i.id);return o.childNodes[0]=a,e=new n(t).getMathml(),o.childNodes[0]=i,this.parentCleanup.push(e),o.childNodes[0]}introduceNewLayer_(){const t=this.fullFence(this.ofenceMml),e=this.fullFence(this.cfenceMml);let r=DomUtil$b.createElement("mrow");if(DomUtil$b.replaceNode(this.fencedMml,r),this.fencedMmlNodes.forEach((t=>r.appendChild(t))),r.insertBefore(t,this.fencedMml),r.appendChild(e),!r.parentNode){const t=DomUtil$b.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(enrich_attr_1$c.Attribute.PARENT);t.childNodes[0].setAttribute(enrich_attr_1$c.Attribute.PARENT,e)}))}}case_embellished.CaseEmbellished=CaseEmbellished;var case_limit={};Object.defineProperty(case_limit,"__esModule",{value:!0}),case_limit.CaseLimit=void 0;const DomUtil$a=dom_util,abstract_enrich_case_1$4=abstract_enrich_case,EnrichMathml$5=enrich_mathml,enrich_attr_1$b=enrich_attr;class CaseLimit extends abstract_enrich_case_1$4.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=DomUtil$a.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&&EnrichMathml$5.walkTree(t)}getMathml(){const t=this.semantic.childNodes;return"limboth"!==this.semantic.type&&this.mml.childNodes.length>=3&&(this.mml=EnrichMathml$5.introduceNewLayer([this.mml],this.semantic)),(0,enrich_attr_1$b.setAttributes)(this.mml,this.semantic),t[0].mathmlTree||(t[0].mathmlTree=this.semantic.mathmlTree),t.forEach(CaseLimit.walkTree_),this.mml}}case_limit.CaseLimit=CaseLimit;var case_line={};Object.defineProperty(case_line,"__esModule",{value:!0}),case_line.CaseLine=void 0;const abstract_enrich_case_1$3=abstract_enrich_case,EnrichMathml$4=enrich_mathml,enrich_attr_1$a=enrich_attr;class CaseLine extends abstract_enrich_case_1$3.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return!!t.mathmlTree&&"line"===t.type}getMathml(){return this.semantic.contentNodes.length&&EnrichMathml$4.walkTree(this.semantic.contentNodes[0]),this.semantic.childNodes.length&&EnrichMathml$4.walkTree(this.semantic.childNodes[0]),(0,enrich_attr_1$a.setAttributes)(this.mml,this.semantic),this.mml}}case_line.CaseLine=CaseLine;var case_proof={};Object.defineProperty(case_proof,"__esModule",{value:!0}),case_proof.CaseProof=void 0;const abstract_enrich_case_1$2=abstract_enrich_case,EnrichMathml$3=enrich_mathml,enrich_attr_1$9=enrich_attr;class CaseProof extends abstract_enrich_case_1$2.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){EnrichMathml$3.walkTree(t),(0,enrich_attr_1$9.setAttributes)(t.mathmlTree,t)})),this.semantic.childNodes.forEach((function(t){EnrichMathml$3.walkTree(t)})),(0,enrich_attr_1$9.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}}case_proof.CaseProof=CaseProof;var case_table={};Object.defineProperty(case_table,"__esModule",{value:!0}),case_table.CaseTable=void 0;const DomUtil$9=dom_util,abstract_enrich_case_1$1=abstract_enrich_case,EnrichMathml$2=enrich_mathml,enrich_attr_1$8=enrich_attr;class CaseTable extends abstract_enrich_case_1$1.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=EnrichMathml$2.cloneContentNode(this.semantic.contentNodes[0]),e=this.semantic.contentNodes[1]?EnrichMathml$2.cloneContentNode(this.semantic.contentNodes[1]):null;if(this.inner=this.semantic.childNodes.map(EnrichMathml$2.walkTree),this.mml)if("MFENCED"===DomUtil$9.tagName(this.mml)){const r=this.mml.childNodes;this.mml.insertBefore(t,r[0]||null),e&&this.mml.appendChild(e),this.mml=EnrichMathml$2.rewriteMfenced(this.mml)}else{const r=[t,this.mml];e&&r.push(e),this.mml=EnrichMathml$2.introduceNewLayer(r,this.semantic)}else this.mml=EnrichMathml$2.introduceNewLayer([t].concat(this.inner,[e]),this.semantic);return(0,enrich_attr_1$8.setAttributes)(this.mml,this.semantic),this.mml}}case_table.CaseTable=CaseTable;var case_text={};Object.defineProperty(case_text,"__esModule",{value:!0}),case_text.CaseText=void 0;const abstract_enrich_case_1=abstract_enrich_case,EnrichMathml$1=enrich_mathml,enrich_attr_1$7=enrich_attr;class CaseText extends abstract_enrich_case_1.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=EnrichMathml$1.collapsePunctuated(this.semantic,t);return this.mml=EnrichMathml$1.introduceNewLayer(t,this.semantic),(0,enrich_attr_1$7.setAttributes)(this.mml,this.semantic),this.mml.removeAttribute(enrich_attr_1$7.Attribute.CONTENT),EnrichMathml$1.addCollapsedAttribute(this.mml,e),this.mml}}case_text.CaseText=CaseText,Object.defineProperty(enrich_case_factory,"__esModule",{value:!0});const case_binomial_1=case_binomial,case_double_script_1=case_double_script,case_embellished_1=case_embellished,case_limit_1=case_limit,case_line_1=case_line,case_multiscripts_1=case_multiscripts,case_proof_1=case_proof,case_table_1=case_table,case_tensor_1=case_tensor,case_text_1=case_text,enrich_case_1=enrich_case;enrich_case_1.factory.push({test:case_limit_1.CaseLimit.test,constr:t=>new case_limit_1.CaseLimit(t)},{test:case_embellished_1.CaseEmbellished.test,constr:t=>new case_embellished_1.CaseEmbellished(t)},{test:case_double_script_1.CaseDoubleScript.test,constr:t=>new case_double_script_1.CaseDoubleScript(t)},{test:case_tensor_1.CaseTensor.test,constr:t=>new case_tensor_1.CaseTensor(t)},{test:case_multiscripts_1.CaseMultiscripts.test,constr:t=>new case_multiscripts_1.CaseMultiscripts(t)},{test:case_line_1.CaseLine.test,constr:t=>new case_line_1.CaseLine(t)},{test:case_binomial_1.CaseBinomial.test,constr:t=>new case_binomial_1.CaseBinomial(t)},{test:case_proof_1.CaseProof.test,constr:t=>new case_proof_1.CaseProof(t)},{test:case_table_1.CaseTable.test,constr:t=>new case_table_1.CaseTable(t)},{test:case_text_1.CaseText.test,constr:t=>new case_text_1.CaseText(t)}),Object.defineProperty(enrich,"__esModule",{value:!0}),enrich.prepareMmlString=enrich.testTranslation=enrich.semanticMathml=enrich.semanticMathmlSync=enrich.semanticMathmlNode=void 0;const debugger_1=_debugger,DomUtil$8=dom_util,engine_1$2=engine,Semantic$1=semantic,EnrichMathml=enrich_mathml;function semanticMathmlNode(t){const e=DomUtil$8.cloneNode(t),r=Semantic$1.getTree(e);return EnrichMathml.enrich(e,r)}function semanticMathmlSync(t){return semanticMathmlNode(DomUtil$8.parseInput(t))}function semanticMathml(t,e){engine_1$2.EnginePromise.getall().then((()=>{const r=DomUtil$8.parseInput(t);e(semanticMathmlNode(r))}))}function testTranslation(t){debugger_1.Debugger.getInstance().init();const e=semanticMathmlSync(prepareMmlString(t));return debugger_1.Debugger.getInstance().exit(),e}function prepareMmlString(t){return t.match(/^<math/)||(t="<math>"+t),t.match(/\/math>$/)||(t+="</math>"),t}enrich.semanticMathmlNode=semanticMathmlNode,enrich.semanticMathmlSync=semanticMathmlSync,enrich.semanticMathml=semanticMathml,enrich.testTranslation=testTranslation,enrich.prepareMmlString=prepareMmlString;var highlighter_factory={},chtml_highlighter={},css_highlighter={},abstract_highlighter={};Object.defineProperty(abstract_highlighter,"__esModule",{value:!0}),abstract_highlighter.AbstractHighlighter=void 0;const XpathUtil$4=xpath_util,enrich_attr_1$6=enrich_attr;class AbstractHighlighter{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(AbstractHighlighter.ATTR)}setHighlighted(t){t.setAttribute(AbstractHighlighter.ATTR,"true")}unsetHighlighted(t){t.removeAttribute(AbstractHighlighter.ATTR)}colorizeAll(t){XpathUtil$4.evalXPath(`.//*[@${enrich_attr_1$6.Attribute.ID}]`,t).forEach((t=>this.colorize(t)))}uncolorizeAll(t){XpathUtil$4.evalXPath(`.//*[@${enrich_attr_1$6.Attribute.ID}]`,t).forEach((t=>this.uncolorize(t)))}colorize(t){const e=(0,enrich_attr_1$6.addPrefix)("foreground");t.hasAttribute(e)&&(t.setAttribute(e+"-old",t.style.color),t.style.color=t.getAttribute(e))}uncolorize(t){const e=(0,enrich_attr_1$6.addPrefix)("foreground")+"-old";t.hasAttribute(e)&&(t.style.color=t.getAttribute(e))}}abstract_highlighter.AbstractHighlighter=AbstractHighlighter,AbstractHighlighter.ATTR="sre-highlight",Object.defineProperty(css_highlighter,"__esModule",{value:!0}),css_highlighter.CssHighlighter=void 0;const abstract_highlighter_1$4=abstract_highlighter;class CssHighlighter extends abstract_highlighter_1$4.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}}css_highlighter.CssHighlighter=CssHighlighter,Object.defineProperty(chtml_highlighter,"__esModule",{value:!0}),chtml_highlighter.ChtmlHighlighter=void 0;const css_highlighter_1$1=css_highlighter;class ChtmlHighlighter extends css_highlighter_1$1.CssHighlighter{constructor(){super()}isMactionNode(t){return t.tagName.toUpperCase()===this.mactionName.toUpperCase()}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}}chtml_highlighter.ChtmlHighlighter=ChtmlHighlighter;var color_picker={};Object.defineProperty(color_picker,"__esModule",{value:!0}),color_picker.ContrastPicker=color_picker.ColorPicker=void 0;const namedColors={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 getChannelColor(t,e){const r=t||{color:e};let n=Object.prototype.hasOwnProperty.call(r,"color")?namedColors[r.color]:r;return n||(n=namedColors[e]),n.alpha=Object.prototype.hasOwnProperty.call(r,"alpha")?r.alpha:1,normalizeColor(n)}function normalizeColor(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}class ColorPicker{constructor(t,e){this.foreground=getChannelColor(e,ColorPicker.DEFAULT_FOREGROUND_),this.background=getChannelColor(t,ColorPicker.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"#"+ColorPicker.toHex(t.red)+ColorPicker.toHex(t.green)+ColorPicker.toHex(t.blue)};return{background:t(this.background),alphaback:this.background.alpha.toString(),foreground:t(this.foreground),alphafore:this.foreground.alpha.toString()}}}function hsl2rgb(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 a=0,s=0,l=0;return 0<=t&&t<60?[a,s,l]=[n,o,0]:60<=t&&t<120?[a,s,l]=[o,n,0]:120<=t&&t<180?[a,s,l]=[0,n,o]:180<=t&&t<240?[a,s,l]=[0,o,n]:240<=t&&t<300?[a,s,l]=[o,0,n]:300<=t&&t<360&&([a,s,l]=[n,0,o]),{red:a+i,green:s+i,blue:l+i}}function rgb2RGB(t){return{red:Math.round(255*t.red),green:Math.round(255*t.green),blue:Math.round(255*t.blue)}}function RGB2hex(t){return"rgb("+t.red+","+t.green+","+t.blue+")"}color_picker.ColorPicker=ColorPicker,ColorPicker.DEFAULT_BACKGROUND_="blue",ColorPicker.DEFAULT_FOREGROUND_="black";class ContrastPicker{constructor(){this.hue=10,this.sat=100,this.light=50,this.incr=50}generate(){return RGB2hex(rgb2RGB(hsl2rgb(this.hue,this.sat,this.light)))}increment(){this.hue=(this.hue+this.incr)%360}}color_picker.ContrastPicker=ContrastPicker;var html_highlighter={};Object.defineProperty(html_highlighter,"__esModule",{value:!0}),html_highlighter.HtmlHighlighter=void 0;const DomUtil$7=dom_util,abstract_highlighter_1$3=abstract_highlighter;class HtmlHighlighter extends abstract_highlighter_1$3.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 n=t.bbox;if(n&&n.w){const o=.05,i=0,a=DomUtil$7.createElement("span"),s=parseFloat(t.style.paddingLeft||"0");a.style.backgroundColor=r.background,a.style.opacity=r.alphaback.toString(),a.style.display="inline-block",a.style.height=n.h+n.d+2*o+"em",a.style.verticalAlign=-n.d+"em",a.style.marginTop=a.style.marginBottom=-o+"em",a.style.width=n.w+2*i+"em",a.style.marginLeft=s-i+"em",a.style.marginRight=-n.w-i-s+"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)}}html_highlighter.HtmlHighlighter=HtmlHighlighter;var mml_css_highlighter={};Object.defineProperty(mml_css_highlighter,"__esModule",{value:!0}),mml_css_highlighter.MmlCssHighlighter=void 0;const css_highlighter_1=css_highlighter;class MmlCssHighlighter extends css_highlighter_1.CssHighlighter{constructor(){super(),this.mactionName="maction"}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}isMactionNode(t){return t.tagName===this.mactionName}}mml_css_highlighter.MmlCssHighlighter=MmlCssHighlighter;var mml_highlighter={};Object.defineProperty(mml_highlighter,"__esModule",{value:!0}),mml_highlighter.MmlHighlighter=void 0;const abstract_highlighter_1$2=abstract_highlighter;class MmlHighlighter extends abstract_highlighter_1$2.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}}mml_highlighter.MmlHighlighter=MmlHighlighter;var svg_highlighter={};Object.defineProperty(svg_highlighter,"__esModule",{value:!0}),svg_highlighter.SvgHighlighter=void 0;const DomUtil$6=dom_util,abstract_highlighter_1$1=abstract_highlighter;class SvgHighlighter extends abstract_highlighter_1$1.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=DomUtil$6.createElementNS("http://www.w3.org/2000/svg","rect");let n;if("use"===t.nodeName){const e=DomUtil$6.createElementNS("http://www.w3.org/2000/svg","g");t.parentNode.insertBefore(e,t),e.appendChild(t),n=e.getBBox(),e.parentNode.replaceChild(t,e)}else n=t.getBBox();r.setAttribute("x",(n.x-40).toString()),r.setAttribute("y",(n.y-40).toString()),r.setAttribute("width",(n.width+80).toString()),r.setAttribute("height",(n.height+80).toString());const o=t.getAttribute("transform");return o&&r.setAttribute("transform",o),r.setAttribute("fill",this.colorString().background),r.setAttribute(abstract_highlighter_1$1.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))}}svg_highlighter.SvgHighlighter=SvgHighlighter;var svg_v3_highlighter={};Object.defineProperty(svg_v3_highlighter,"__esModule",{value:!0}),svg_v3_highlighter.SvgV3Highlighter=void 0;const DomUtil$5=dom_util,XpathUtil$3=xpath_util,abstract_highlighter_1=abstract_highlighter,color_picker_1$1=color_picker,svg_highlighter_1=svg_highlighter;class SvgV3Highlighter extends svg_highlighter_1.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=DomUtil$5.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("sre-highlighter-added","true");const n=t.getBBox();r.setAttribute("x",(n.x-40).toString()),r.setAttribute("y",(n.y-40).toString()),r.setAttribute("width",(n.width+80).toString()),r.setAttribute("height",(n.height+80).toString());const o=t.getAttribute("transform");if(o&&r.setAttribute("transform",o),r.setAttribute("fill",this.colorString().background),t.setAttribute(abstract_highlighter_1.AbstractHighlighter.ATTR,"true"),t.parentNode.insertBefore(r,t),e={node:t,foreground:t.getAttribute("fill")},"rect"===t.nodeName){const e=new color_picker_1$1.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(XpathUtil$3.evalXPath(`.//*[@data-mml-node="${this.mactionName}"]`,t))}}svg_v3_highlighter.SvgV3Highlighter=SvgV3Highlighter,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.highlighterMapping_=t.addEvents=t.highlighter=void 0;const e=chtml_highlighter,r=color_picker,n=css_highlighter,o=html_highlighter,i=mml_css_highlighter,a=mml_highlighter,s=svg_highlighter,l=svg_v3_highlighter;t.highlighter=function(e,n,o){const i=new r.ColorPicker(e,n),a="NativeMML"===o.renderer&&"Safari"===o.browser?"MML-CSS":"SVG"===o.renderer&&"v3"===o.browser?"SVG-V3":o.renderer,s=new(t.highlighterMapping_[a]||t.highlighterMapping_.NativeMML);return s.setColor(i),s},t.addEvents=function(e,r,n){const o=t.highlighterMapping_[n.renderer];o&&(new o).addEvents(e,r)},t.highlighterMapping_={SVG:s.SvgHighlighter,"SVG-V3":l.SvgV3Highlighter,NativeMML:a.MmlHighlighter,"HTML-CSS":o.HtmlHighlighter,"MML-CSS":i.MmlCssHighlighter,CommonHTML:n.CssHighlighter,CHTML:e.ChtmlHighlighter}}(highlighter_factory),getDefaultExportFromCjs(highlighter_factory);var speech_generator_factory={},adhoc_speech_generator={},abstract_speech_generator={},rebuild_stree={},walker_util={};Object.defineProperty(walker_util,"__esModule",{value:!0}),walker_util.getBySemanticId=walker_util.getSemanticRoot=walker_util.getAttribute=walker_util.splitAttribute=void 0;const DomUtil$4=dom_util,enrich_attr_1$5=enrich_attr;function splitAttribute(t){return t?t.split(/,/):[]}function getAttribute(t,e){return t.getAttribute(e)}function getSemanticRoot(t){if(t.hasAttribute(enrich_attr_1$5.Attribute.TYPE)&&!t.hasAttribute(enrich_attr_1$5.Attribute.PARENT))return t;const e=DomUtil$4.querySelectorAllByAttr(t,enrich_attr_1$5.Attribute.TYPE);for(let t,r=0;t=e[r];r++)if(!t.hasAttribute(enrich_attr_1$5.Attribute.PARENT))return t;return t}function getBySemanticId(t,e){return t.getAttribute(enrich_attr_1$5.Attribute.ID)===e?t:DomUtil$4.querySelectorAllByAttrValue(t,enrich_attr_1$5.Attribute.ID,e)[0]}walker_util.splitAttribute=splitAttribute,walker_util.getAttribute=getAttribute,walker_util.getSemanticRoot=getSemanticRoot,walker_util.getBySemanticId=getBySemanticId,Object.defineProperty(rebuild_stree,"__esModule",{value:!0}),rebuild_stree.RebuildStree=void 0;const enrich_attr_1$4=enrich_attr,semantic_attr_1=semantic_attr,semantic_node_factory_1=semantic_node_factory,semantic_processor_1=semantic_processor,semantic_skeleton_1$1=semantic_skeleton,semantic_tree_1$1=semantic_tree,WalkerUtil$8=walker_util;class RebuildStree{constructor(t){this.mathml=t,this.factory=new semantic_node_factory_1.SemanticNodeFactory,this.nodeDict={},this.mmlRoot=WalkerUtil$8.getSemanticRoot(t),this.streeRoot=this.assembleTree(this.mmlRoot),this.stree=semantic_tree_1$1.SemanticTree.fromNode(this.streeRoot,this.mathml),this.xml=this.stree.xml(),semantic_processor_1.default.getInstance().setNodeFactory(this.factory)}static textContent(t,e,r){if(!r&&e.textContent)return void(t.textContent=e.textContent);const n=WalkerUtil$8.splitAttribute(WalkerUtil$8.getAttribute(e,enrich_attr_1$4.Attribute.OPERATOR));n.length>1&&(t.textContent=n[1])}static isPunctuated(t){return!semantic_skeleton_1$1.SemanticSkeleton.simpleCollapseStructure(t)&&t[1]&&semantic_skeleton_1$1.SemanticSkeleton.contentCollapseStructure(t[1])}getTree(){return this.stree}assembleTree(t){const e=this.makeNode(t),r=WalkerUtil$8.splitAttribute(WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.CHILDREN)),n=WalkerUtil$8.splitAttribute(WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.CONTENT));if(0===n.length&&0===r.length)return RebuildStree.textContent(e,t),e;if(n.length>0){const t=WalkerUtil$8.getBySemanticId(this.mathml,n[0]);t&&RebuildStree.textContent(e,t,!0)}e.contentNodes=n.map((t=>this.setParent(t,e))),e.childNodes=r.map((t=>this.setParent(t,e)));const o=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.COLLAPSED);return o?this.postProcess(e,o):e}makeNode(t){const e=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.TYPE),r=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.ROLE),n=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.FONT),o=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.ANNOTATION)||"",i=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.ATTRIBUTES)||"",a=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.ID),s=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.EMBELLISHED),l=WalkerUtil$8.getAttribute(t,enrich_attr_1$4.Attribute.FENCEPOINTER),c=this.createNode(parseInt(a,10));return c.type=e,c.role=r,c.font=n||"unknown",c.parseAnnotation(o),c.parseAttributes(i),l&&(c.fencePointer=l),s&&(c.embellished=s),c}makePunctuation(t){const e=this.createNode(t);return e.updateContent((0,semantic_attr_1.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(RebuildStree.isPunctuated(e))return this.makePunctuated(t,e,r),void(e=e[0]);semantic_skeleton_1$1.SemanticSkeleton.simpleCollapseStructure(e)&&!this.nodeDict[e.toString()]&&this.makeEmpty(t,e,r)}postProcess(t,e){const r=semantic_skeleton_1$1.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(RebuildStree.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;n<o;n++){const o=t[n];r.childNodes.push(semantic_skeleton_1$1.SemanticSkeleton.simpleCollapseStructure(o)?this.nodeDict[o]:e(o))}return r};e(t)}setParent(t,e){const r=WalkerUtil$8.getBySemanticId(this.mathml,t),n=this.assembleTree(r);return n.parent=e,n}}rebuild_stree.RebuildStree=RebuildStree;var speech_generator_util={};Object.defineProperty(speech_generator_util,"__esModule",{value:!0}),speech_generator_util.computeSummary_=speech_generator_util.retrieveSummary=speech_generator_util.connectAllMactions=speech_generator_util.connectMactions=speech_generator_util.nodeAtPosition_=speech_generator_util.computePrefix_=speech_generator_util.retrievePrefix=speech_generator_util.addPrefix=speech_generator_util.addModality=speech_generator_util.addSpeech=speech_generator_util.recomputeMarkup=speech_generator_util.computeMarkup=speech_generator_util.recomputeSpeech=speech_generator_util.computeSpeech=void 0;const AuralRendering$2=aural_rendering,DomUtil$3=dom_util,XpathUtil$2=xpath_util,enrich_attr_1$3=enrich_attr,speech_rule_engine_1$1=speech_rule_engine,semantic_tree_1=semantic_tree,WalkerUtil$7=walker_util;function computeSpeech(t){return speech_rule_engine_1$1.SpeechRuleEngine.getInstance().evaluateNode(t)}function recomputeSpeech(t){return computeSpeech(semantic_tree_1.SemanticTree.fromNode(t).xml())}function computeMarkup(t){const e=computeSpeech(t);return AuralRendering$2.markup(e)}function recomputeMarkup(t){const e=recomputeSpeech(t);return AuralRendering$2.markup(e)}function addSpeech(t,e,r){const n=DomUtil$3.querySelectorAllByAttrValue(r,"id",e.id.toString())[0],o=n?AuralRendering$2.markup(computeSpeech(n)):recomputeMarkup(e);t.setAttribute(enrich_attr_1$3.Attribute.SPEECH,o)}function addModality(t,e,r){const n=recomputeMarkup(e);t.setAttribute(r,n)}function addPrefix(t,e){const r=retrievePrefix(e);r&&t.setAttribute(enrich_attr_1$3.Attribute.PREFIX,r)}function retrievePrefix(t){const e=computePrefix_(t);return AuralRendering$2.markup(e)}function computePrefix_(t){const e=semantic_tree_1.SemanticTree.fromRoot(t),r=XpathUtil$2.evalXPath('.//*[@id="'+t.id+'"]',e.xml());let n=r[0];return r.length>1&&(n=nodeAtPosition_(t,r)||n),n?speech_rule_engine_1$1.SpeechRuleEngine.getInstance().runInSetting({modality:"prefix",domain:"default",style:"default",strict:!0,speech:!0},(function(){return speech_rule_engine_1$1.SpeechRuleEngine.getInstance().evaluateNode(n)})):[]}function nodeAtPosition_(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 connectMactions(t,e,r){const n=DomUtil$3.querySelectorAll(e,"maction");for(let e,o=0;e=n[o];o++){const n=e.getAttribute("id"),o=DomUtil$3.querySelectorAllByAttrValue(t,"id",n)[0];if(!o)continue;const i=e.childNodes[1],a=i.getAttribute(enrich_attr_1$3.Attribute.ID);let s=WalkerUtil$7.getBySemanticId(t,a);if(s&&"dummy"!==s.getAttribute(enrich_attr_1$3.Attribute.TYPE))continue;if(s=o.childNodes[0],s.getAttribute("sre-highlighter-added"))continue;const l=i.getAttribute(enrich_attr_1$3.Attribute.PARENT);l&&s.setAttribute(enrich_attr_1$3.Attribute.PARENT,l),s.setAttribute(enrich_attr_1$3.Attribute.TYPE,"dummy"),s.setAttribute(enrich_attr_1$3.Attribute.ID,a);DomUtil$3.querySelectorAllByAttrValue(r,"id",a)[0].setAttribute("alternative",a)}}function connectAllMactions(t,e){const r=DomUtil$3.querySelectorAll(t,"maction");for(let t,n=0;t=r[n];n++){const r=t.childNodes[1].getAttribute(enrich_attr_1$3.Attribute.ID);DomUtil$3.querySelectorAllByAttrValue(e,"id",r)[0].setAttribute("alternative",r)}}function retrieveSummary(t){const e=computeSummary_(t);return AuralRendering$2.markup(e)}function computeSummary_(t){return t?speech_rule_engine_1$1.SpeechRuleEngine.getInstance().runInSetting({modality:"summary",strict:!1,speech:!0},(function(){return speech_rule_engine_1$1.SpeechRuleEngine.getInstance().evaluateNode(t)})):[]}speech_generator_util.computeSpeech=computeSpeech,speech_generator_util.recomputeSpeech=recomputeSpeech,speech_generator_util.computeMarkup=computeMarkup,speech_generator_util.recomputeMarkup=recomputeMarkup,speech_generator_util.addSpeech=addSpeech,speech_generator_util.addModality=addModality,speech_generator_util.addPrefix=addPrefix,speech_generator_util.retrievePrefix=retrievePrefix,speech_generator_util.computePrefix_=computePrefix_,speech_generator_util.nodeAtPosition_=nodeAtPosition_,speech_generator_util.connectMactions=connectMactions,speech_generator_util.connectAllMactions=connectAllMactions,speech_generator_util.retrieveSummary=retrieveSummary,speech_generator_util.computeSummary_=computeSummary_,Object.defineProperty(abstract_speech_generator,"__esModule",{value:!0}),abstract_speech_generator.AbstractSpeechGenerator=void 0;const engine_setup_1$1=engine_setup,EnrichAttr=enrich_attr,rebuild_stree_1$2=rebuild_stree,SpeechGeneratorUtil$4=speech_generator_util;class AbstractSpeechGenerator{constructor(){this.modality=EnrichAttr.addPrefix("speech"),this.rebuilt_=null,this.options_={}}getRebuilt(){return this.rebuilt_}setRebuilt(t){this.rebuilt_=t}setOptions(t){this.options_=t||{},this.modality=EnrichAttr.addPrefix(this.options_.modality||"speech")}getOptions(){return this.options_}start(){}end(){}generateSpeech(t,e){return this.rebuilt_||(this.rebuilt_=new rebuild_stree_1$2.RebuildStree(e)),(0,engine_setup_1$1.setup)(this.options_),SpeechGeneratorUtil$4.computeMarkup(this.getRebuilt().xml)}}abstract_speech_generator.AbstractSpeechGenerator=AbstractSpeechGenerator,Object.defineProperty(adhoc_speech_generator,"__esModule",{value:!0}),adhoc_speech_generator.AdhocSpeechGenerator=void 0;const abstract_speech_generator_1$5=abstract_speech_generator;class AdhocSpeechGenerator extends abstract_speech_generator_1$5.AbstractSpeechGenerator{getSpeech(t,e){const r=this.generateSpeech(t,e);return t.setAttribute(this.modality,r),r}}adhoc_speech_generator.AdhocSpeechGenerator=AdhocSpeechGenerator;var color_generator={};Object.defineProperty(color_generator,"__esModule",{value:!0}),color_generator.ColorGenerator=void 0;const enrich_attr_1$2=enrich_attr,color_picker_1=color_picker,rebuild_stree_1$1=rebuild_stree,WalkerUtil$6=walker_util,abstract_speech_generator_1$4=abstract_speech_generator;class ColorGenerator extends abstract_speech_generator_1$4.AbstractSpeechGenerator{constructor(){super(...arguments),this.modality=(0,enrich_attr_1$2.addPrefix)("foreground"),this.contrast=new color_picker_1.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=[];ColorGenerator.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=>ColorGenerator.visitStree_(t,e,r)))}}else r[t.id]||e.push(t.id)}getSpeech(t,e){return WalkerUtil$6.getAttribute(t,this.modality)}generateSpeech(t,e){return this.getRebuilt()||this.setRebuilt(new rebuild_stree_1$1.RebuildStree(t)),this.colorLeaves_(t),WalkerUtil$6.getAttribute(t,this.modality)}colorLeaves_(t){const e=[];ColorGenerator.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=WalkerUtil$6.getBySemanticId(t,e);return!!n&&(n.setAttribute(this.modality,r),!0)}}color_generator.ColorGenerator=ColorGenerator;var direct_speech_generator={};Object.defineProperty(direct_speech_generator,"__esModule",{value:!0}),direct_speech_generator.DirectSpeechGenerator=void 0;const WalkerUtil$5=walker_util,abstract_speech_generator_1$3=abstract_speech_generator;class DirectSpeechGenerator extends abstract_speech_generator_1$3.AbstractSpeechGenerator{getSpeech(t,e){return WalkerUtil$5.getAttribute(t,this.modality)}}direct_speech_generator.DirectSpeechGenerator=DirectSpeechGenerator;var dummy_speech_generator={};Object.defineProperty(dummy_speech_generator,"__esModule",{value:!0}),dummy_speech_generator.DummySpeechGenerator=void 0;const abstract_speech_generator_1$2=abstract_speech_generator;class DummySpeechGenerator extends abstract_speech_generator_1$2.AbstractSpeechGenerator{getSpeech(t,e){return""}}dummy_speech_generator.DummySpeechGenerator=DummySpeechGenerator;var node_speech_generator={},tree_speech_generator={};Object.defineProperty(tree_speech_generator,"__esModule",{value:!0}),tree_speech_generator.TreeSpeechGenerator=void 0;const enrich_attr_1$1=enrich_attr,WalkerUtil$4=walker_util,abstract_speech_generator_1$1=abstract_speech_generator,SpeechGeneratorUtil$3=speech_generator_util;class TreeSpeechGenerator extends abstract_speech_generator_1$1.AbstractSpeechGenerator{getSpeech(t,e){const r=this.generateSpeech(t,e),n=this.getRebuilt().nodeDict;for(const r in n){const o=n[r],i=WalkerUtil$4.getBySemanticId(e,r),a=WalkerUtil$4.getBySemanticId(t,r);i&&a&&(this.modality&&this.modality!==enrich_attr_1$1.Attribute.SPEECH?SpeechGeneratorUtil$3.addModality(a,o,this.modality):SpeechGeneratorUtil$3.addSpeech(a,o,this.getRebuilt().xml),this.modality===enrich_attr_1$1.Attribute.SPEECH&&SpeechGeneratorUtil$3.addPrefix(a,o))}return r}}tree_speech_generator.TreeSpeechGenerator=TreeSpeechGenerator,Object.defineProperty(node_speech_generator,"__esModule",{value:!0}),node_speech_generator.NodeSpeechGenerator=void 0;const WalkerUtil$3=walker_util,tree_speech_generator_1=tree_speech_generator;class NodeSpeechGenerator extends tree_speech_generator_1.TreeSpeechGenerator{getSpeech(t,e){return super.getSpeech(t,e),WalkerUtil$3.getAttribute(t,this.modality)}}node_speech_generator.NodeSpeechGenerator=NodeSpeechGenerator;var summary_speech_generator={};Object.defineProperty(summary_speech_generator,"__esModule",{value:!0}),summary_speech_generator.SummarySpeechGenerator=void 0;const abstract_speech_generator_1=abstract_speech_generator,SpeechGeneratorUtil$2=speech_generator_util;class SummarySpeechGenerator extends abstract_speech_generator_1.AbstractSpeechGenerator{getSpeech(t,e){return SpeechGeneratorUtil$2.connectAllMactions(e,this.getRebuilt().xml),this.generateSpeech(t,e)}}summary_speech_generator.SummarySpeechGenerator=SummarySpeechGenerator,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.generatorMapping_=t.generator=void 0;const e=adhoc_speech_generator,r=color_generator,n=direct_speech_generator,o=dummy_speech_generator,i=node_speech_generator,a=summary_speech_generator,s=tree_speech_generator;t.generator=function(e){return(t.generatorMapping_[e]||t.generatorMapping_.Direct)()},t.generatorMapping_={Adhoc:()=>new e.AdhocSpeechGenerator,Color:()=>new r.ColorGenerator,Direct:()=>new n.DirectSpeechGenerator,Dummy:()=>new o.DummySpeechGenerator,Node:()=>new i.NodeSpeechGenerator,Summary:()=>new a.SummarySpeechGenerator,Tree:()=>new s.TreeSpeechGenerator}}(speech_generator_factory),getDefaultExportFromCjs(speech_generator_factory);var walker_factory={},dummy_walker={},abstract_walker={},clearspeak_preferences={};Object.defineProperty(clearspeak_preferences,"__esModule",{value:!0}),clearspeak_preferences.Parser=clearspeak_preferences.Comparator=clearspeak_preferences.ClearspeakPreferences=void 0;const engine_1$1=engine,EngineConst$2=engine_const,dynamic_cstr_1=dynamic_cstr,dynamic_cstr_2=dynamic_cstr,MathCompoundStore=math_compound_store,speech_rule_engine_1=speech_rule_engine;class ClearspeakPreferences extends dynamic_cstr_1.DynamicCstr{constructor(t,e){super(t),this.preference=e}static comparator(){return new Comparator(engine_1$1.default.getInstance().dynamicCstr,dynamic_cstr_2.DynamicProperties.createProp([dynamic_cstr_1.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_2.Axis.LOCALE]],[dynamic_cstr_1.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_2.Axis.MODALITY]],[dynamic_cstr_1.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_2.Axis.DOMAIN]],[dynamic_cstr_1.DynamicCstr.DEFAULT_VALUES[dynamic_cstr_2.Axis.STYLE]]))}static fromPreference(t){const e=t.split(":"),r={},n=PREFERENCES.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!==ClearspeakPreferences.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;n<e.length;n++)r.push(e[n]+"_"+t[e[n]]);return r.length?r.join(":"):dynamic_cstr_1.DynamicCstr.DEFAULT_VALUE}static getLocalePreferences(t){const e=t||MathCompoundStore.enumerate(speech_rule_engine_1.SpeechRuleEngine.getInstance().enumerate());return ClearspeakPreferences.getLocalePreferences_(e)}static smartPreferences(t,e){const r=ClearspeakPreferences.getLocalePreferences()[e];if(!r)return[];const n=t.explorers.speech,o=ClearspeakPreferences.relevantPreferences(n.walker.getFocus().getSemanticPrimary()),i=EngineConst$2.DOMAIN_TO_STYLES.clearspeak;return[{type:"radio",content:"No Preferences",id:"clearspeak-default",variable:"speechRules"},{type:"radio",content:"Current Preferences",id:"clearspeak-"+i,variable:"speechRules"},{type:"rule"},{type:"label",content:"Preferences for "+o},{type:"rule"}].concat(r[o].map((function(t){const e=t.split("_");return{type:"radio",content:e[1],id:"clearspeak-"+ClearspeakPreferences.addPreference(i,e[0],e[1]),variable:"speechRules"}})))}static relevantPreferences(t){const e=SEMANTIC_MAPPING_[t.type];return e&&(e[t.role]||e[""])||"ImpliedTimes"}static findPreference(t,e){if("default"===t)return ClearspeakPreferences.AUTO;return ClearspeakPreferences.fromPreference(t)[e]||ClearspeakPreferences.AUTO}static addPreference(t,e,r){if("default"===t)return e+"_"+r;const n=ClearspeakPreferences.fromPreference(t);return n[e]=r,ClearspeakPreferences.toPreference(n)}static getLocalePreferences_(t){const e={};for(const r in t){if(!t[r].speech||!t[r].speech.clearspeak)continue;const n=Object.keys(t[r].speech.clearspeak),o=e[r]={};for(const t in PREFERENCES.getProperties()){const e=PREFERENCES.getProperties()[t],r=[t+"_Auto"];if(e)for(const o of e)-1!==n.indexOf(t+"_"+o)&&r.push(t+"_"+o);o[t]=r}}return e}equal(t){if(!super.equal(t))return!1;const e=Object.keys(this.preference),r=t.preference;if(e.length!==Object.keys(r).length)return!1;for(let t,n=0;t=e[n];n++)if(this.preference[t]!==r[t])return!1;return!0}}clearspeak_preferences.ClearspeakPreferences=ClearspeakPreferences,ClearspeakPreferences.AUTO="Auto";const PREFERENCES=new dynamic_cstr_2.DynamicProperties({AbsoluteValue:["Auto","AbsEnd","Cardinality","Determinant"],Bar:["Auto","Conjugate"],Caps:["Auto","SayCaps"],CombinationPermutation:["Auto","ChoosePermute"],Currency:["Auto","Position","Prefix"],Ellipses:["Auto","AndSoOn"],Enclosed:["Auto","EndEnclose"],Exponent:["Auto","AfterPower","Ordinal","OrdinalPower","Exponent"],Fraction:["Auto","EndFrac","FracOver","General","GeneralEndFrac","Ordinal","Over","OverEndFrac","Per"],Functions:["Auto","None","Reciprocal"],ImpliedTimes:["Auto","MoreImpliedTimes","None"],Log:["Auto","LnAsNaturalLog"],Matrix:["Auto","Combinatoric","EndMatrix","EndVector","SilentColNum","SpeakColNum","Vector"],MultiLineLabel:["Auto","Case","Constraint","Equation","Line","None","Row","Step"],MultiLineOverview:["Auto","None"],MultiLinePausesBetweenColumns:["Auto","Long","Short"],MultsymbolDot:["Auto","Dot"],MultsymbolX:["Auto","By","Cross"],Paren:["Auto","CoordPoint","Interval","Silent","Speak","SpeakNestingLevel"],Prime:["Auto","Angle","Length"],Roots:["Auto","PosNegSqRoot","PosNegSqRootEnd","RootEnd"],SetMemberSymbol:["Auto","Belongs","Element","Member","In"],Sets:["Auto","SilentBracket","woAll"],TriangleSymbol:["Auto","Delta"],Trig:["Auto","ArcTrig","TrigInverse","Reciprocal"],VerticalLine:["Auto","Divides","Given","SuchThat"]});class Comparator extends dynamic_cstr_2.DefaultComparator{constructor(t,e){super(t,e),this.preference=t instanceof ClearspeakPreferences?t.preference:{}}match(t){if(!(t instanceof ClearspeakPreferences))return super.match(t);if("default"===t.getComponents()[dynamic_cstr_2.Axis.STYLE])return!0;const e=Object.keys(t.preference);for(let r,n=0;r=e[n];n++)if(this.preference[r]!==t.preference[r])return!1;return!0}compare(t,e){const r=super.compare(t,e);if(0!==r)return r;const n=t instanceof ClearspeakPreferences,o=e instanceof ClearspeakPreferences;if(!n&&o)return 1;if(n&&!o)return-1;if(!n&&!o)return 0;const i=Object.keys(t.preference).length,a=Object.keys(e.preference).length;return i>a?-1:i<a?1:0}}clearspeak_preferences.Comparator=Comparator;class Parser$1 extends dynamic_cstr_2.DynamicCstrParser{constructor(){super([dynamic_cstr_2.Axis.LOCALE,dynamic_cstr_2.Axis.MODALITY,dynamic_cstr_2.Axis.DOMAIN,dynamic_cstr_2.Axis.STYLE])}parse(t){const e=super.parse(t);let r=e.getValue(dynamic_cstr_2.Axis.STYLE);const n=e.getValue(dynamic_cstr_2.Axis.LOCALE),o=e.getValue(dynamic_cstr_2.Axis.MODALITY);let i={};return r!==dynamic_cstr_1.DynamicCstr.DEFAULT_VALUE&&(i=this.fromPreference(r),r=this.toPreference(i)),new ClearspeakPreferences({locale:n,modality:o,domain:"clearspeak",style:r},i)}fromPreference(t){return ClearspeakPreferences.fromPreference(t)}toPreference(t){return ClearspeakPreferences.toPreference(t)}}clearspeak_preferences.Parser=Parser$1;const REVERSE_MAPPING=[["AbsoluteValue","fenced","neutral","metric"],["Bar","overscore","overaccent"],["Caps","identifier","latinletter"],["CombinationPermutation","appl","unknown"],["Ellipses","punctuation","ellipsis"],["Exponent","superscript",""],["Fraction","fraction",""],["Functions","appl","simple function"],["ImpliedTimes","operator","implicit"],["Log","appl","prefix function"],["Matrix","matrix",""],["Matrix","vector",""],["MultiLineLabel","multiline","label"],["MultiLineOverview","multiline","table"],["MultiLinePausesBetweenColumns","multiline","table"],["MultiLineLabel","table","label"],["MultiLineOverview","table","table"],["MultiLinePausesBetweenColumns","table","table"],["MultiLineLabel","cases","label"],["MultiLineOverview","cases","table"],["MultiLinePausesBetweenColumns","cases","table"],["MultsymbolDot","operator","multiplication"],["MultsymbolX","operator","multiplication"],["Paren","fenced","leftright"],["Prime","superscript","prime"],["Roots","root",""],["Roots","sqrt",""],["SetMemberSymbol","relation","element"],["Sets","fenced","set extended"],["TriangleSymbol","identifier","greekletter"],["Trig","appl","prefix function"],["VerticalLine","punctuated","vbar"]],SEMANTIC_MAPPING_=function(){const t={};for(let e,r=0;e=REVERSE_MAPPING[r];r++){const r=e[0];let n=t[e[1]];n||(n={},t[e[1]]=n),n[e[2]]=r}return t}();engine_1$1.default.getInstance().comparators.clearspeak=ClearspeakPreferences.comparator,engine_1$1.default.getInstance().parsers.clearspeak=new Parser$1;var focus={};Object.defineProperty(focus,"__esModule",{value:!0}),focus.Focus=void 0;const WalkerUtil$2=walker_util;class Focus{constructor(t,e){this.nodes=t,this.primary=e,this.domNodes=[],this.domPrimary_=null,this.allNodes=[]}static factory(t,e,r,n){const o=t=>WalkerUtil$2.getBySemanticId(n,t),i=r.nodeDict,a=o(t),s=e.map(o),l=e.map((function(t){return i[t]})),c=new Focus(l,i[t]);return c.domNodes=s,c.domPrimary_=a,c.allNodes=Focus.generateAllVisibleNodes_(e,s,i,n),c}static generateAllVisibleNodes_(t,e,r,n){const o=t=>WalkerUtil$2.getBySemanticId(n,t);let i=[];for(let a=0,s=t.length;a<s;a++){if(e[a]){i.push(e[a]);continue}const s=r[t[a]];if(!s)continue;const l=s.childNodes.map((function(t){return t.id.toString()})),c=l.map(o);i=i.concat(Focus.generateAllVisibleNodes_(l,c,r,n))}return i}getSemanticPrimary(){return this.primary}getSemanticNodes(){return this.nodes}getNodes(){return this.allNodes}getDomNodes(){return this.domNodes}getDomPrimary(){return this.domPrimary_}toString(){return"Primary:"+this.domPrimary_+" Nodes:"+this.domNodes}clone(){const t=new Focus(this.nodes,this.primary);return t.domNodes=this.domNodes,t.domPrimary_=this.domPrimary_,t.allNodes=this.allNodes,t}}focus.Focus=Focus;var walker={};!function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.WalkerState=t.WalkerMoves=void 0,(e=t.WalkerMoves||(t.WalkerMoves={})).UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right",e.REPEAT="repeat",e.DEPTH="depth",e.ENTER="enter",e.EXPAND="expand",e.HOME="home",e.SUMMARY="summary",e.DETAIL="detail",e.ROW="row",e.CELL="cell";class r{static resetState(t){delete r.STATE[t]}static setState(t,e){r.STATE[t]=e}static getState(t){return r.STATE[t]}}t.WalkerState=r,r.STATE={}}(walker),getDefaultExportFromCjs(walker),Object.defineProperty(abstract_walker,"__esModule",{value:!0}),abstract_walker.AbstractWalker=void 0;const auditory_description_1=auditory_description,AuralRendering$1=aural_rendering,DomUtil$2=dom_util,EngineConst$1=engine_const,engine_setup_1=engine_setup,event_util_1$2=event_util,enrich_attr_1=enrich_attr,locale_1$1=locale$d,grammar_1=grammar,semantic_skeleton_1=semantic_skeleton,SpeechGeneratorFactory$1=speech_generator_factory,SpeechGeneratorUtil$1=speech_generator_util,clearspeak_preferences_1=clearspeak_preferences,focus_1=focus,rebuild_stree_1=rebuild_stree,walker_1$1=walker,WalkerUtil$1=walker_util,XpathUtil$1=xpath_util;class AbstractWalker{constructor(t,e,r,n){this.node=t,this.generator=e,this.highlighter=r,this.modifier=!1,this.keyMapping=new Map([[event_util_1$2.KeyCode.UP,this.up.bind(this)],[event_util_1$2.KeyCode.DOWN,this.down.bind(this)],[event_util_1$2.KeyCode.RIGHT,this.right.bind(this)],[event_util_1$2.KeyCode.LEFT,this.left.bind(this)],[event_util_1$2.KeyCode.TAB,this.repeat.bind(this)],[event_util_1$2.KeyCode.DASH,this.expand.bind(this)],[event_util_1$2.KeyCode.SPACE,this.depth.bind(this)],[event_util_1$2.KeyCode.HOME,this.home.bind(this)],[event_util_1$2.KeyCode.X,this.summary.bind(this)],[event_util_1$2.KeyCode.Z,this.detail.bind(this)],[event_util_1$2.KeyCode.V,this.virtualize.bind(this)],[event_util_1$2.KeyCode.P,this.previous.bind(this)],[event_util_1$2.KeyCode.U,this.undo.bind(this)],[event_util_1$2.KeyCode.LESS,this.previousRules.bind(this)],[event_util_1$2.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(AbstractWalker.SRE_ID_ATTR)?this.id=this.node.getAttribute(AbstractWalker.SRE_ID_ATTR):(this.node.setAttribute(AbstractWalker.SRE_ID_ATTR,AbstractWalker.ID_COUNTER.toString()),this.id=AbstractWalker.ID_COUNTER++),this.rootNode=WalkerUtil$1.getSemanticRoot(t),this.rootId=this.rootNode.getAttribute(enrich_attr_1.Attribute.ID),this.xmlString_=n,this.moved=walker_1$1.WalkerMoves.ENTER}getXml(){return this.xml_||(this.xml_=DomUtil$2.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()&&(walker_1$1.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===enrich_attr_1.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 walker_1$1.WalkerMoves.DEPTH:return this.depth_();case walker_1$1.WalkerMoves.SUMMARY:return this.summary_();case walker_1$1.WalkerMoves.DETAIL:return this.detail_();default:{const e=[],r=this.focusSemanticNodes();for(let n=0,o=t.length;n<o;n++){const o=t[n],i=r[n];e.push(o?this.generator.getSpeech(o,this.getXml()):SpeechGeneratorUtil$1.recomputeMarkup(i))}return this.mergePrefix_(e)}}}move(t){const e=this.keyMapping.get(t);if(!e)return null;const r=e();return!(!r||r===this.getFocus())&&(this.setFocus(r),this.moved===walker_1$1.WalkerMoves.HOME&&(this.levels=this.initLevels()),!0)}up(){return this.moved=walker_1$1.WalkerMoves.UP,this.getFocus()}down(){return this.moved=walker_1$1.WalkerMoves.DOWN,this.getFocus()}left(){return this.moved=walker_1$1.WalkerMoves.LEFT,this.getFocus()}right(){return this.moved=walker_1$1.WalkerMoves.RIGHT,this.getFocus()}repeat(){return this.moved=walker_1$1.WalkerMoves.REPEAT,this.getFocus().clone()}depth(){return this.moved=this.isSpeech()?walker_1$1.WalkerMoves.DEPTH:walker_1$1.WalkerMoves.REPEAT,this.getFocus().clone()}home(){this.moved=walker_1$1.WalkerMoves.HOME;return this.singletonFocus(this.rootId)}getBySemanticId(t){return WalkerUtil$1.getBySemanticId(this.node,t)}primaryId(){return this.getFocus().getSemanticPrimary().id.toString()}expand(){const t=this.getFocus().getDomPrimary(),e=this.actionable_(t);return e?(this.moved=walker_1$1.WalkerMoves.EXPAND,e.dispatchEvent(new Event("click")),this.getFocus().clone()):this.getFocus()}expandable(t){return!!this.actionable_(t)&&0===t.childNodes.length}collapsible(t){return!!this.actionable_(t)&&t.childNodes.length>0}restoreState(){if(!this.highlighter)return;const t=walker_1$1.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=walker_1$1.WalkerMoves.ENTER}updateFocus(){this.setFocus(focus_1.Focus.factory(this.getFocus().getSemanticPrimary().id.toString(),this.getFocus().getSemanticNodes().map((t=>t.id.toString())),this.getRebuilt(),this.node))}rebuildStree(){this.rebuilt_=new rebuild_stree_1.RebuildStree(this.getXml()),this.rootId=this.rebuilt_.stree.root.id.toString(),this.generator.setRebuilt(this.rebuilt_),this.skeleton=semantic_skeleton_1.SemanticSkeleton.fromTree(this.rebuilt_.stree),this.skeleton.populate(),this.focus_=this.singletonFocus(this.rootId),this.levels=this.initLevels(),SpeechGeneratorUtil$1.connectMactions(this.node,this.getXml(),this.rebuilt_.xml)}previousLevel(){const t=this.getFocus().getDomPrimary();return t?WalkerUtil$1.getAttribute(t,enrich_attr_1.Attribute.PARENT):this.getFocus().getSemanticPrimary().parent.id.toString()}nextLevel(){const t=this.getFocus().getDomPrimary();let e,r;if(t){e=WalkerUtil$1.splitAttribute(WalkerUtil$1.getAttribute(t,enrich_attr_1.Attribute.CHILDREN)),r=WalkerUtil$1.splitAttribute(WalkerUtil$1.getAttribute(t,enrich_attr_1.Attribute.CONTENT));const n=WalkerUtil$1.getAttribute(t,enrich_attr_1.Attribute.TYPE),o=WalkerUtil$1.getAttribute(t,enrich_attr_1.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=[];XpathUtil$1.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=XpathUtil$1.evalXPath(`//*[@data-semantic-id="${t}"]`,this.getXml());XpathUtil$1.evalXPath("*//@data-semantic-id",r[0]).forEach((t=>e[parseInt(t.textContent,10)]=!0))}focusFromId(t,e){return focus_1.Focus.factory(t,e,this.getRebuilt(),this.node)}summary(){return this.moved=this.isSpeech()?walker_1$1.WalkerMoves.SUMMARY:walker_1$1.WalkerMoves.REPEAT,this.getFocus().clone()}detail(){return this.moved=this.isSpeech()?walker_1$1.WalkerMoves.DETAIL:walker_1$1.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,engine_setup_1.setup)(t).then((()=>SpeechGeneratorFactory$1.generator("Tree").getSpeech(this.node,this.getXml())))}nextRules(){const t=this.generator.getOptions();return"speech"!==t.modality?this.getFocus():(EngineConst$1.DOMAIN_TO_STYLES[t.domain]=t.style,t.domain="mathspeak"===t.domain?"clearspeak":"mathspeak",t.style=EngineConst$1.DOMAIN_TO_STYLES[t.domain],this.update(t),this.moved=walker_1$1.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=clearspeak_preferences_1.ClearspeakPreferences.getLocalePreferences().en;if(!t)return"default";const r=clearspeak_preferences_1.ClearspeakPreferences.relevantPreferences(this.getFocus().getSemanticPrimary()),n=clearspeak_preferences_1.ClearspeakPreferences.findPreference(e,r),o=t[r].map((function(t){return t.split("_")[1]})),i=o.indexOf(n);if(-1===i)return e;const a=i>=o.length-1?o[0]:o[i+1];return clearspeak_preferences_1.ClearspeakPreferences.addPreference(e,r,a)}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=walker_1$1.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),AuralRendering$1.finalize(AuralRendering$1.merge(e.concat(t)))}prefix_(){const t=this.getFocus().getDomNodes(),e=this.getFocus().getSemanticNodes();return t[0]?WalkerUtil$1.getAttribute(t[0],enrich_attr_1.Attribute.PREFIX):SpeechGeneratorUtil$1.retrievePrefix(e[0])}postfix_(){const t=this.getFocus().getDomNodes();return t[0]?WalkerUtil$1.getAttribute(t[0],enrich_attr_1.Attribute.POSTFIX):""}depth_(){const t=grammar_1.Grammar.getInstance().getParameter("depth");grammar_1.Grammar.getInstance().setParameter("depth",!0);const e=this.getFocus().getDomPrimary(),r=this.expandable(e)?locale_1$1.LOCALE.MESSAGES.navigate.EXPANDABLE:this.collapsible(e)?locale_1$1.LOCALE.MESSAGES.navigate.COLLAPSIBLE:"",n=locale_1$1.LOCALE.MESSAGES.navigate.LEVEL+" "+this.getDepth(),o=this.getFocus().getSemanticNodes(),i=SpeechGeneratorUtil$1.retrievePrefix(o[0]),a=[new auditory_description_1.AuditoryDescription({text:n,personality:{}}),new auditory_description_1.AuditoryDescription({text:i,personality:{}}),new auditory_description_1.AuditoryDescription({text:r,personality:{}})];return grammar_1.Grammar.getInstance().setParameter("depth",t),AuralRendering$1.finalize(AuralRendering$1.markup(a))}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:DomUtil$2.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",t)[0],r=SpeechGeneratorUtil$1.retrieveSummary(e);return this.mergePrefix_([r])}detail_(){const t=this.getFocus().getSemanticPrimary().id.toString(),e=this.getRebuilt().xml.getAttribute("id")===t?this.getRebuilt().xml:DomUtil$2.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",t)[0],r=e.getAttribute("alternative");e.removeAttribute("alternative");const n=SpeechGeneratorUtil$1.computeMarkup(e),o=this.mergePrefix_([n]);return e.setAttribute("alternative",r),o}}abstract_walker.AbstractWalker=AbstractWalker,AbstractWalker.ID_COUNTER=0,AbstractWalker.SRE_ID_ATTR="sre-explorer-id",Object.defineProperty(dummy_walker,"__esModule",{value:!0}),dummy_walker.DummyWalker=void 0;const abstract_walker_1$2=abstract_walker;class DummyWalker extends abstract_walker_1$2.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}}dummy_walker.DummyWalker=DummyWalker;var semantic_walker={},levels={};Object.defineProperty(levels,"__esModule",{value:!0}),levels.Levels=void 0;class Levels{constructor(){this.level_=[]}push(t){this.level_.push(t)}pop(){return this.level_.pop()}peek(){return this.level_[this.level_.length-1]||null}indexOf(t){const e=this.peek();return e?e.indexOf(t):null}find(t){const e=this.peek();if(!e)return null;for(let r=0,n=e.length;r<n;r++)if(t(e[r]))return e[r];return null}get(t){const e=this.peek();return!e||t<0||t>=e.length?null:e[t]}depth(){return this.level_.length}clone(){const t=new Levels;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}}levels.Levels=Levels,Object.defineProperty(semantic_walker,"__esModule",{value:!0}),semantic_walker.SemanticWalker=void 0;const abstract_walker_1$1=abstract_walker,levels_1$1=levels;class SemanticWalker extends abstract_walker_1$1.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 levels_1$1.Levels;return t.push([this.getFocus()]),t}up(){super.up();const t=this.previousLevel();if(!t)return null;this.levels.pop();const e=this.levels.find((function(e){return e.getSemanticNodes().some((function(e){return e.id.toString()===t}))}));return e}down(){super.down();const t=this.nextLevel();return 0===t.length?null:(this.levels.push(t),t[0])}combineContentChildren(t,e,r,n){switch(t){case"relseq":case"infixop":case"multirel":return this.makePairList(n,r);case"prefixop":return[this.focusFromId(n[0],r.concat(n))];case"postfixop":return[this.focusFromId(n[0],n.concat(r))];case"matrix":case"vector":case"fenced":return[this.focusFromId(n[0],[r[0],n[0],r[1]])];case"cases":return[this.focusFromId(n[0],[r[0],n[0]])];case"punctuated":return"text"===e?n.map(this.singletonFocus.bind(this)):n.length===r.length?r.map(this.singletonFocus.bind(this)):this.combinePunctuations(n,r,[],[]);case"appl":return[this.focusFromId(n[0],[n[0],r[0]]),this.singletonFocus(n[1])];case"root":return[this.singletonFocus(n[1]),this.singletonFocus(n[0])];default:return n.map(this.singletonFocus.bind(this))}}combinePunctuations(t,e,r,n){if(0===t.length)return n;const o=t.shift(),i=e.shift();return o===i?(r.push(i),this.combinePunctuations(t,e,r,n)):(e.unshift(i),r.push(o),t.length===e.length?(n.push(this.focusFromId(o,r.concat(e))),n):(n.push(this.focusFromId(o,r)),this.combinePunctuations(t,e,[],n)))}makePairList(t,e){if(0===t.length)return[];if(1===t.length)return[this.singletonFocus(t[0])];const r=[this.singletonFocus(t.shift())];for(let n=0,o=t.length;n<o;n++)r.push(this.focusFromId(t[n],[e[n],t[n]]));return r}left(){super.left();const t=this.levels.indexOf(this.getFocus());if(null===t)return null;const e=this.levels.get(t-1);return e||null}right(){super.right();const t=this.levels.indexOf(this.getFocus());if(null===t)return null;const e=this.levels.get(t+1);return e||null}findFocusOnLevel(t){return this.levels.find((e=>e.getSemanticPrimary().id===t))}}semantic_walker.SemanticWalker=SemanticWalker;var syntax_walker={};Object.defineProperty(syntax_walker,"__esModule",{value:!0}),syntax_walker.SyntaxWalker=void 0;const base_util_1=base_util,abstract_walker_1=abstract_walker,levels_1=levels;class SyntaxWalker extends abstract_walker_1.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 levels_1.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,n){switch(t){case"relseq":case"infixop":case"multirel":return(0,base_util_1.interleaveLists)(n,r);case"prefixop":return r.concat(n);case"postfixop":return n.concat(r);case"matrix":case"vector":case"fenced":return n.unshift(r[0]),n.push(r[1]),n;case"cases":return n.unshift(r[0]),n;case"punctuated":return"text"===e?(0,base_util_1.interleaveLists)(n,r):n;case"appl":return[n[0],r[0],n[1]];case"root":return[n[1],n[0]];default:return n}}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()]}}syntax_walker.SyntaxWalker=SyntaxWalker;var table_walker={};Object.defineProperty(table_walker,"__esModule",{value:!0}),table_walker.TableWalker=void 0;const DomUtil$1=dom_util,event_util_1$1=event_util,syntax_walker_1=syntax_walker,walker_1=walker;class TableWalker extends syntax_walker_1.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(event_util_1$1.KeyCode.ZERO,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.ONE,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.TWO,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.THREE,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.FOUR,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.FIVE,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.SIX,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.SEVEN,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.KeyCode.EIGHT,this.jumpCell.bind(this)),this.keyMapping.set(event_util_1$1.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=walker_1.WalkerMoves.UP,this.eligibleCell_()?this.verticalMove_(!1):super.up()}down(){return this.moved=walker_1.WalkerMoves.DOWN,this.eligibleCell_()?this.verticalMove_(!0):super.down()}jumpCell(){if(!this.isInTable_()||null===this.key_)return this.getFocus();if(this.moved===walker_1.WalkerMoves.ROW){this.moved=walker_1.WalkerMoves.CELL;const t=this.key_-event_util_1$1.KeyCode.ZERO;return this.isLegalJump_(this.row_,t)?this.jumpCell_(this.row_,t):this.getFocus()}const t=this.key_-event_util_1$1.KeyCode.ZERO;return t>this.currentTable_.childNodes.length?this.getFocus():(this.row_=t,this.moved=walker_1.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!==TableWalker.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),a=this.levels.get(t?i+1:i-1);if(!a)return this.levels.push(o),null;this.setFocus(this.singletonFocus(a));const s=this.nextLevel();return s[n]?(this.levels.push(s),this.singletonFocus(s[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=DomUtil$1.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",this.currentTable_.id.toString())[0];if(!r||r.hasAttribute("alternative"))return!1;const n=this.currentTable_.childNodes[t-1];if(!n)return!1;const o=DomUtil$1.querySelectorAllByAttrValue(r,"id",n.id.toString())[0];return!(!o||o.hasAttribute("alternative"))&&!(!n||!n.childNodes[e-1])}isInTable_(){let t=this.getFocus().getSemanticPrimary();for(;t;){if(-1!==TableWalker.ELIGIBLE_TABLE_TYPES.indexOf(t.type))return this.currentTable_=t,!0;t=t.parent}return!1}}table_walker.TableWalker=TableWalker,TableWalker.ELIGIBLE_CELL_ROLES=["determinant","rowvector","binomial","squarematrix","multiline","matrix","vector","cases","table"],TableWalker.ELIGIBLE_TABLE_TYPES=["multiline","matrix","vector","cases","table"],function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.walkerMapping_=t.walker=void 0;const e=dummy_walker,r=semantic_walker,n=syntax_walker,o=table_walker;t.walker=function(e,r,n,o,i){return(t.walkerMapping_[e.toLowerCase()]||t.walkerMapping_.dummy)(r,n,o,i)},t.walkerMapping_={dummy:(t,r,n,o)=>new e.DummyWalker(t,r,n,o),semantic:(t,e,n,o)=>new r.SemanticWalker(t,e,n,o),syntax:(t,e,r,o)=>new n.SyntaxWalker(t,e,r,o),table:(t,e,r,n)=>new o.TableWalker(t,e,r,n)}}(walker_factory),getDefaultExportFromCjs(walker_factory);var processor={};Object.defineProperty(processor,"__esModule",{value:!0}),processor.KeyProcessor=processor.Processor=void 0;const event_util_1=event_util;class Processor{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||Processor.stringify_,this.pprint=e.pprint||this.print}static stringify_(t){return t?t.toString():t}}processor.Processor=Processor,Processor.LocalState={walker:null,speechGenerator:null,highlighter:null};class KeyProcessor extends Processor{constructor(t,e){super(t,e),this.key=e.key||KeyProcessor.getKey_}static getKey_(t){return"string"==typeof t?event_util_1.KeyCode[t.toUpperCase()]:t}}processor.KeyProcessor=KeyProcessor,Object.defineProperty(processor_factory,"__esModule",{value:!0}),processor_factory.keypress=processor_factory.output=processor_factory.print=processor_factory.process=processor_factory.set=void 0;const AuralRendering=aural_rendering,Enrich=enrich,HighlighterFactory=highlighter_factory,locale_1=locale$d,Semantic=semantic,SpeechGeneratorFactory=speech_generator_factory,SpeechGeneratorUtil=speech_generator_util,WalkerFactory=walker_factory,WalkerUtil=walker_util,DomUtil=dom_util,engine_1=engine,EngineConst=engine_const,processor_1=processor,XpathUtil=xpath_util,PROCESSORS=new Map;function set(t){PROCESSORS.set(t.name,t)}function get_(t){const e=PROCESSORS.get(t);if(!e)throw new engine_1.SREError("Unknown processor "+t);return e}function process$1(t,e){const r=get_(t);try{return r.processor(e)}catch(t){throw new engine_1.SREError("Processing error for expression "+e)}}function print(t,e){const r=get_(t);return engine_1.default.getInstance().pprint?r.pprint(e):r.print(e)}function output(t,e){const r=get_(t);try{const t=r.processor(e);return engine_1.default.getInstance().pprint?r.pprint(t):r.print(t)}catch(t){throw new engine_1.SREError("Processing error for expression "+e)}}function keypress(t,e){const r=get_(t),n=r instanceof processor_1.KeyProcessor?r.key(e):e,o=r.processor(n);return engine_1.default.getInstance().pprint?r.pprint(o):r.print(o)}processor_factory.set=set,processor_factory.process=process$1,processor_factory.print=print,processor_factory.output=output,processor_factory.keypress=keypress,set(new processor_1.Processor("semantic",{processor:function(t){const e=DomUtil.parseInput(t);return Semantic.xmlTree(e)},postprocessor:function(t,e){const r=engine_1.default.getInstance().speech;if(r===EngineConst.Speech.NONE)return t;const n=DomUtil.cloneNode(t);let o=SpeechGeneratorUtil.computeMarkup(n);if(r===EngineConst.Speech.SHALLOW)return t.setAttribute("speech",AuralRendering.finalize(o)),t;const i=XpathUtil.evalXPath(".//*[@id]",t),a=XpathUtil.evalXPath(".//*[@id]",n);for(let t,e,r=0;t=i[r],e=a[r];r++)o=SpeechGeneratorUtil.computeMarkup(e),t.setAttribute("speech",AuralRendering.finalize(o));return t},pprint:function(t){return DomUtil.formatXml(t.toString())}})),set(new processor_1.Processor("speech",{processor:function(t){const e=DomUtil.parseInput(t),r=Semantic.xmlTree(e),n=SpeechGeneratorUtil.computeSpeech(r);return AuralRendering.finalize(AuralRendering.markup(n))},pprint:function(t){const e=t.toString();return AuralRendering.isXml()?DomUtil.formatXml(e):e}})),set(new processor_1.Processor("json",{processor:function(t){const e=DomUtil.parseInput(t);return Semantic.getTree(e).toJson()},postprocessor:function(t,e){const r=engine_1.default.getInstance().speech;if(r===EngineConst.Speech.NONE)return t;const n=DomUtil.parseInput(e),o=Semantic.xmlTree(n),i=SpeechGeneratorUtil.computeMarkup(o);if(r===EngineConst.Speech.SHALLOW)return t.stree.speech=AuralRendering.finalize(i),t;const a=t=>{const e=XpathUtil.evalXPath(`.//*[@id=${t.id}]`,o)[0],r=SpeechGeneratorUtil.computeMarkup(e);t.speech=AuralRendering.finalize(r),t.children&&t.children.forEach(a)};return a(t.stree),t},print:function(t){return JSON.stringify(t)},pprint:function(t){return JSON.stringify(t,null,2)}})),set(new processor_1.Processor("description",{processor:function(t){const e=DomUtil.parseInput(t),r=Semantic.xmlTree(e);return SpeechGeneratorUtil.computeSpeech(r)},print:function(t){return JSON.stringify(t)},pprint:function(t){return JSON.stringify(t,null,2)}})),set(new processor_1.Processor("enriched",{processor:function(t){return Enrich.semanticMathmlSync(t)},postprocessor:function(t,e){const r=WalkerUtil.getSemanticRoot(t);let n;switch(engine_1.default.getInstance().speech){case EngineConst.Speech.NONE:break;case EngineConst.Speech.SHALLOW:n=SpeechGeneratorFactory.generator("Adhoc"),n.getSpeech(r,t);break;case EngineConst.Speech.DEEP:n=SpeechGeneratorFactory.generator("Tree"),n.getSpeech(t,t)}return t},pprint:function(t){return DomUtil.formatXml(t.toString())}})),set(new processor_1.Processor("walker",{processor:function(t){const e=SpeechGeneratorFactory.generator("Node");processor_1.Processor.LocalState.speechGenerator=e,e.setOptions({modality:engine_1.default.getInstance().modality,locale:engine_1.default.getInstance().locale,domain:engine_1.default.getInstance().domain,style:engine_1.default.getInstance().style}),processor_1.Processor.LocalState.highlighter=HighlighterFactory.highlighter({color:"black"},{color:"white"},{renderer:"NativeMML"});const r=process$1("enriched",t),n=print("enriched",r);return processor_1.Processor.LocalState.walker=WalkerFactory.walker(engine_1.default.getInstance().walker,r,e,processor_1.Processor.LocalState.highlighter,n),processor_1.Processor.LocalState.walker},print:function(t){return processor_1.Processor.LocalState.walker.speech()}})),set(new processor_1.KeyProcessor("move",{processor:function(t){if(!processor_1.Processor.LocalState.walker)return null;return!1===processor_1.Processor.LocalState.walker.move(t)?AuralRendering.error(t):processor_1.Processor.LocalState.walker.speech()}})),set(new processor_1.Processor("number",{processor:function(t){const e=parseInt(t,10);return isNaN(e)?"":locale_1.LOCALE.NUMBERS.numberToWords(e)}})),set(new processor_1.Processor("ordinal",{processor:function(t){const e=parseInt(t,10);return isNaN(e)?"":locale_1.LOCALE.NUMBERS.wordOrdinal(e)}})),set(new processor_1.Processor("numericOrdinal",{processor:function(t){const e=parseInt(t,10);return isNaN(e)?"":locale_1.LOCALE.NUMBERS.numericOrdinal(e)}})),set(new processor_1.Processor("vulgar",{processor:function(t){const[e,r]=t.split("/").map((t=>parseInt(t,10)));return isNaN(e)||isNaN(r)?"":process$1("speech",`<mfrac><mn>${e}</mn><mn>${r}</mn></mfrac>`)}})),function(t){var e=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{l(n.next(t))}catch(t){i(t)}}function s(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.localePath=t.exit=t.move=t.walk=t.processFile=t.file=t.vulgar=t.numericOrdinal=t.ordinal=t.number=t.toEnriched=t.toDescription=t.toJson=t.toSemantic=t.toSpeech=t.localeLoader=t.engineReady=t.engineSetup=t.setupEngine=t.version=void 0;const r=engine,n=engine_setup,o=engine_const,i=file_util,a=processor_factory,s=system_external,l=variables,c=math_map;function u(t){return e(this,void 0,void 0,(function*(){return(0,n.setup)(t)}))}function d(t,e){return a.process(t,e)}function p(t,n,i){switch(r.default.getInstance().mode){case o.Mode.ASYNC:return function(t,n,o){return e(this,void 0,void 0,(function*(){const e=yield s.default.fs.promises.readFile(n,{encoding:"utf8"}),i=a.output(t,e);if(o)try{s.default.fs.promises.writeFile(o,i)}catch(t){throw new r.SREError("Can not write to file: "+o)}return i}))}(t,n,i);case o.Mode.SYNC:return function(t,e,n){const o=function(t){let e;try{e=s.default.fs.readFileSync(t,{encoding:"utf8"})}catch(e){throw new r.SREError("Can not open file: "+t)}return e}(e),i=a.output(t,o);if(n)try{s.default.fs.writeFileSync(n,i)}catch(t){throw new r.SREError("Can not write to file: "+n)}return i}(t,n,i);default:throw new r.SREError(`Can process files in ${r.default.getInstance().mode} mode`)}}t.version=l.Variables.VERSION,t.setupEngine=u,t.engineSetup=function(){const t=["mode"].concat(r.default.STRING_FEATURES,r.default.BINARY_FEATURES),e=r.default.getInstance(),n={};return t.forEach((function(t){n[t]=e[t]})),n.json=s.default.jsonPath,n.xpath=s.default.WGXpath,n.rules=e.ruleSets.slice(),n},t.engineReady=function(){return e(this,void 0,void 0,(function*(){return u({}).then((()=>r.EnginePromise.getall()))}))},t.localeLoader=c.standardLoader,t.toSpeech=function(t){return d("speech",t)},t.toSemantic=function(t){return d("semantic",t)},t.toJson=function(t){return d("json",t)},t.toDescription=function(t){return d("description",t)},t.toEnriched=function(t){return d("enriched",t)},t.number=function(t){return d("number",t)},t.ordinal=function(t){return d("ordinal",t)},t.numericOrdinal=function(t){return d("numericOrdinal",t)},t.vulgar=function(t){return d("vulgar",t)},t.file={},t.file.toSpeech=function(t,e){return p("speech",t,e)},t.file.toSemantic=function(t,e){return p("semantic",t,e)},t.file.toJson=function(t,e){return p("json",t,e)},t.file.toDescription=function(t,e){return p("description",t,e)},t.file.toEnriched=function(t,e){return p("enriched",t,e)},t.processFile=p,t.walk=function(t){return a.output("walker",t)},t.move=function(t){return a.keypress("move",t)},t.exit=function(t){const e=t||0;r.EnginePromise.getall().then((()=>process.exit(e)))},t.localePath=i.localePath,s.default.documentSupported?u({mode:o.Mode.HTTP}).then((()=>u({}))):u({mode:o.Mode.SYNC}).then((()=>u({mode:o.Mode.ASYNC})))}(system),getDefaultExportFromCjs(system);var mathmaps={};Object.defineProperty(mathmaps,"__esModule",{value:!0});var MathMaps=new Map;mathmaps.default=MathMaps,function(t){var e=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),r=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&e(n,t,o);return r(n,t),n},o=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{l(n.next(t))}catch(t){i(t)}}function s(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}l((n=n.apply(t,e||[])).next())}))},i=commonjsGlobal&&commonjsGlobal.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.sreReady=t.Sre=void 0;var s,l=n(system),c=n(walker_factory),u=n(speech_generator_factory),d=n(engine_const),p=a(engine),m=clearspeak_preferences,h=n(highlighter_factory),f=variables,_=a(mathmaps);!function(t){t.locales=f.Variables.LOCALES,t.sreReady=l.engineReady,t.setupEngine=l.setupEngine,t.engineSetup=l.engineSetup,t.toEnriched=l.toEnriched,t.toSpeech=l.toSpeech,t.clearspeakPreferences=m.ClearspeakPreferences,t.getHighlighter=h.highlighter,t.getSpeechGenerator=u.generator,t.getWalker=c.walker,t.clearspeakStyle=function(){return d.DOMAIN_TO_STYLES.clearspeak},t.preloadLocales=function(t){return o(this,void 0,void 0,(function(){var e;return i(this,(function(r){return[2,(e=_.default.get(t))?new Promise((function(t,r){return t(JSON.stringify(e))})):l.localeLoader()(t)]}))}))}}(s=t.Sre||(t.Sre={})),t.sreReady=s.sreReady,p.default.getInstance().delay=!0,t.default=s}(sre),getDefaultExportFromCjs(sre);var __extends$1K=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$d=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$d.apply(this,arguments)},__values$O=commonjsGlobal&&commonjsGlobal.__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.")},__read$V=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$u=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$L=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(semanticEnrich,"__esModule",{value:!0});var EnrichHandler_1=semanticEnrich.EnrichHandler=semanticEnrich.EnrichedMathDocumentMixin=semanticEnrich.EnrichedMathItemMixin=void 0,mathjax_js_1$4=mathjax,MathItem_js_1$6=MathItem,SerializedMmlVisitor_js_1$1=SerializedMmlVisitor,Options_js_1$h=Options,sre_js_1$1=__importDefault$L(sre),currentSpeech="none";function EnrichedMathItemMixin(t,e,r){return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends$1K(n,t),n.prototype.serializeMml=function(t){if("outerHTML"in t)return t.outerHTML;if("undefined"!=typeof Element&&"undefined"!=typeof window&&t instanceof Element){var e=window.document.createElement("div");return e.appendChild(t),e.innerHTML}return t.toString()},n.prototype.enrich=function(t,n){if(void 0===n&&(n=!1),!(this.state()>=MathItem_js_1$6.STATE.ENRICHED)){if(!this.isEscaped&&(t.options.enableEnrichment||n)){t.options.sre.speech!==currentSpeech&&(currentSpeech=t.options.sre.speech,mathjax_js_1$4.mathjax.retryAfter(sre_js_1$1.default.setupEngine(t.options.sre).then((function(){return sre_js_1$1.default.sreReady()}))));var o=new t.options.MathItem("",e);try{var i=this.inputData.originalMml=r(this.root);o.math=this.serializeMml(sre_js_1$1.default.toEnriched(i)),o.display=this.display,o.compile(t),this.root=o.root,this.inputData.enrichedMml=o.math}catch(e){t.options.enrichError(t,this,e)}}this.state(MathItem_js_1$6.STATE.ENRICHED)}},n.prototype.attachSpeech=function(t){var e,r;if(!(this.state()>=MathItem_js_1$6.STATE.ATTACHSPEECH)){var n=this.root.attributes.get("aria-label")||this.getSpeech(this.root);if(n){var o=t.adaptor,i=this.typesetRoot;o.setAttribute(i,"aria-label",n);try{for(var a=__values$O(o.childNodes(i)),s=a.next();!s.done;s=a.next()){var l=s.value;o.setAttribute(l,"aria-hidden","true")}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}}this.state(MathItem_js_1$6.STATE.ATTACHSPEECH)}},n.prototype.getSpeech=function(t){var e,r,n=t.attributes;if(!n)return"";var o=n.getExplicit("data-semantic-speech");if(!n.getExplicit("data-semantic-parent")&&o)return o;try{for(var i=__values$O(t.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value,l=this.getSpeech(s);if(null!=l)return l}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return""},n}(t)}function EnrichedMathDocumentMixin(t,e){var r;return r=function(t){function r(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=t.apply(this,__spreadArray$u([],__read$V(r),!1))||this;e.setMmlFactory(o.mmlFactory);var i=o.constructor.ProcessBits;i.has("enriched")||(i.allocate("enriched"),i.allocate("attach-speech"));var a=new SerializedMmlVisitor_js_1$1.SerializedMmlVisitor(o.mmlFactory),s=function(t){return a.visitTree(t)};return o.options.MathItem=EnrichedMathItemMixin(o.options.MathItem,e,s),o}return __extends$1K(r,t),r.prototype.attachSpeech=function(){var t,e;if(!this.processed.isSet("attach-speech")){try{for(var r=__values$O(this.math),n=r.next();!n.done;n=r.next()){n.value.attachSpeech(this)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("attach-speech")}return this},r.prototype.enrich=function(){var t,e;if(!this.processed.isSet("enriched")){if(this.options.enableEnrichment)try{for(var r=__values$O(this.math),n=r.next();!n.done;n=r.next()){n.value.enrich(this)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("enriched")}return this},r.prototype.enrichError=function(t,e,r){console.warn("Enrichment error:",r)},r.prototype.state=function(e,r){return void 0===r&&(r=!1),t.prototype.state.call(this,e,r),e<MathItem_js_1$6.STATE.ENRICHED&&this.processed.clear("enriched"),this},r}(t),r.OPTIONS=__assign$d(__assign$d({},t.OPTIONS),{enableEnrichment:!0,enrichError:function(t,e,r){return t.enrichError(t,e,r)},renderActions:(0,Options_js_1$h.expandable)(__assign$d(__assign$d({},t.OPTIONS.renderActions),{enrich:[MathItem_js_1$6.STATE.ENRICHED],attachSpeech:[MathItem_js_1$6.STATE.ATTACHSPEECH]})),sre:(0,Options_js_1$h.expandable)({speech:"none",domain:"mathspeak",style:"default",locale:"en"})}),r}function EnrichHandler(t,e){return e.setAdaptor(t.adaptor),t.documentClass=EnrichedMathDocumentMixin(t.documentClass,e),t}(0,MathItem_js_1$6.newState)("ENRICHED",30),(0,MathItem_js_1$6.newState)("ATTACHSPEECH",155),semanticEnrich.EnrichedMathItemMixin=EnrichedMathItemMixin,semanticEnrich.EnrichedMathDocumentMixin=EnrichedMathDocumentMixin,EnrichHandler_1=semanticEnrich.EnrichHandler=EnrichHandler;var MenuHandler$1={},Menu$1={},MJContextMenu$1={},context_menu={},abstract_menu={},abstract_postable={},menu_element={},abstract_navigatable={},key_navigatable={};!function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.KEY=void 0,(e=t.KEY||(t.KEY={}))[e.RETURN=13]="RETURN",e[e.ESCAPE=27]="ESCAPE",e[e.SPACE=32]="SPACE",e[e.LEFT=37]="LEFT",e[e.UP=38]="UP",e[e.RIGHT=39]="RIGHT",e[e.DOWN=40]="DOWN"}(key_navigatable),getDefaultExportFromCjs(key_navigatable);var mouse_navigatable={};Object.defineProperty(mouse_navigatable,"__esModule",{value:!0}),mouse_navigatable.MOUSE=void 0,mouse_navigatable.MOUSE={CLICK:"click",DBLCLICK:"dblclick",DOWN:"mousedown",UP:"mouseup",OVER:"mouseover",OUT:"mouseout",MOVE:"mousemove",SELECTEND:"selectend",SELECTSTART:"selectstart"},Object.defineProperty(abstract_navigatable,"__esModule",{value:!0}),abstract_navigatable.AbstractNavigatable=void 0;var key_navigatable_js_1$3=key_navigatable,mouse_navigatable_js_1=mouse_navigatable,AbstractNavigatable=function(){function t(){this.bubble=!1}return t.prototype.bubbleKey=function(){this.bubble=!0},t.prototype.keydown=function(t){switch(t.keyCode){case key_navigatable_js_1$3.KEY.ESCAPE:this.escape(t);break;case key_navigatable_js_1$3.KEY.RIGHT:this.right(t);break;case key_navigatable_js_1$3.KEY.LEFT:this.left(t);break;case key_navigatable_js_1$3.KEY.UP:this.up(t);break;case key_navigatable_js_1$3.KEY.DOWN:this.down(t);break;case key_navigatable_js_1$3.KEY.RETURN:case key_navigatable_js_1$3.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(mouse_navigatable_js_1.MOUSE.DOWN,this.mousedown.bind(this)),t.addEventListener(mouse_navigatable_js_1.MOUSE.UP,this.mouseup.bind(this)),t.addEventListener(mouse_navigatable_js_1.MOUSE.OVER,this.mouseover.bind(this)),t.addEventListener(mouse_navigatable_js_1.MOUSE.OUT,this.mouseout.bind(this)),t.addEventListener(mouse_navigatable_js_1.MOUSE.CLICK,this.click.bind(this)),t.addEventListener("keydown",this.keydown.bind(this)),t.addEventListener("dragstart",this.stop.bind(this)),t.addEventListener(mouse_navigatable_js_1.MOUSE.SELECTSTART,this.stop.bind(this)),t.addEventListener("contextmenu",this.stop.bind(this)),t.addEventListener(mouse_navigatable_js_1.MOUSE.DBLCLICK,this.stop.bind(this))},t}();abstract_navigatable.AbstractNavigatable=AbstractNavigatable;var __extends$1J=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(menu_element,"__esModule",{value:!0}),menu_element.MenuElement=void 0;var abstract_navigatable_js_1=abstract_navigatable,MenuElement=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1J(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}(abstract_navigatable_js_1.AbstractNavigatable);menu_element.MenuElement=MenuElement;var __extends$1I=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(abstract_postable,"__esModule",{value:!0}),abstract_postable.AbstractPostable=void 0;var menu_element_js_1$1=menu_element,AbstractPostable=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.posted=!1,e}return __extends$1I(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}(menu_element_js_1$1.MenuElement);abstract_postable.AbstractPostable=AbstractPostable;var abstract_item={},abstract_entry={},html_classes={};Object.defineProperty(html_classes,"__esModule",{value:!0}),html_classes.HtmlAttrs=html_classes.HtmlClasses=void 0;var PREFIX="CtxtMenu";function prefix_(t){return PREFIX+"_"+t}function prefixClass_(t){return prefix_(t)}function prefixAttr_(t){return prefix_(t)}html_classes.HtmlClasses={ATTACHED:prefixClass_("Attached"),CONTEXTMENU:prefixClass_("ContextMenu"),MENU:prefixClass_("Menu"),MENUARROW:prefixClass_("MenuArrow"),MENUACTIVE:prefixClass_("MenuActive"),MENUCHECK:prefixClass_("MenuCheck"),MENUCLOSE:prefixClass_("MenuClose"),MENUCOMBOBOX:prefixClass_("MenuComboBox"),MENUDISABLED:prefixClass_("MenuDisabled"),MENUFRAME:prefixClass_("MenuFrame"),MENUITEM:prefixClass_("MenuItem"),MENULABEL:prefixClass_("MenuLabel"),MENURADIOCHECK:prefixClass_("MenuRadioCheck"),MENUINPUTBOX:prefixClass_("MenuInputBox"),MENURULE:prefixClass_("MenuRule"),MENUSLIDER:prefixClass_("MenuSlider"),MOUSEPOST:prefixClass_("MousePost"),RTL:prefixClass_("RTL"),INFO:prefixClass_("Info"),INFOCLOSE:prefixClass_("InfoClose"),INFOCONTENT:prefixClass_("InfoContent"),INFOSIGNATURE:prefixClass_("InfoSignature"),INFOTITLE:prefixClass_("InfoTitle"),SLIDERVALUE:prefixClass_("SliderValue"),SLIDERBAR:prefixClass_("SliderBar"),SELECTION:prefixClass_("Selection"),SELECTIONBOX:prefixClass_("SelectionBox"),SELECTIONMENU:prefixClass_("SelectionMenu"),SELECTIONDIVIDER:prefixClass_("SelectionDivider"),SELECTIONITEM:prefixClass_("SelectionItem")},html_classes.HtmlAttrs={COUNTER:prefixAttr_("Counter"),KEYDOWNFUNC:prefixAttr_("keydownFunc"),CONTEXTMENUFUNC:prefixAttr_("contextmenuFunc"),OLDTAB:prefixAttr_("Oldtabindex"),TOUCHFUNC:prefixAttr_("TouchFunc")};var __extends$1H=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(abstract_entry,"__esModule",{value:!0}),abstract_entry.AbstractEntry=void 0;var menu_element_js_1=menu_element,html_classes_js_1$f=html_classes,AbstractEntry=function(t){function e(e,r){var n=t.call(this)||this;return n._menu=e,n._type=r,n.className=html_classes_js_1$f.HtmlClasses.MENUITEM,n.role="menuitem",n.hidden=!1,n}return __extends$1H(e,t),Object.defineProperty(e.prototype,"menu",{get:function(){return this._menu},set:function(t){this._menu=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.hide=function(){this.hidden=!0,this.menu.generateMenu()},e.prototype.show=function(){this.hidden=!1,this.menu.generateMenu()},e.prototype.isHidden=function(){return this.hidden},e}(menu_element_js_1.MenuElement);abstract_entry.AbstractEntry=AbstractEntry;var menu_util={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MenuUtil=void 0,function(t){t.close=function(t){var e=t.menu;e.baseMenu?e.baseMenu.unpost():e.unpost()},t.getActiveElement=function(t){var e=t.menu;return(e.baseMenu?e.baseMenu:e).store.active},t.error=function(t,e){console.error("ContextMenu Error: "+e)},t.counter=function(){return e++};var e=0}(t.MenuUtil||(t.MenuUtil={}))}(menu_util),getDefaultExportFromCjs(menu_util);var __extends$1G=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$N=commonjsGlobal&&commonjsGlobal.__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(abstract_item,"__esModule",{value:!0}),abstract_item.AbstractItem=void 0;var abstract_entry_js_1$1=abstract_entry,menu_util_js_1$8=menu_util,html_classes_js_1$e=html_classes,AbstractItem=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 __extends$1G(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(html_classes_js_1$e.HtmlClasses.MENUACTIVE)},e.prototype.deactivate=function(){this.html.classList.remove(html_classes_js_1$e.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){menu_util_js_1$8.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(html_classes_js_1$e.HtmlClasses.MENUDISABLED),t.setAttribute("aria-disabled","true")},e.prototype.enable=function(){this.disabled=!1;var t=this.html;t.classList.remove(html_classes_js_1$e.HtmlClasses.MENUDISABLED),t.removeAttribute("aria-disabled")},e.prototype.executeCallbacks_=function(){var t,e;try{for(var r=__values$N(this.callbacks),n=r.next();!n.done;n=r.next()){var o=n.value;try{o(this)}catch(t){menu_util_js_1$8.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}(abstract_entry_js_1$1.AbstractEntry);abstract_item.AbstractItem=AbstractItem;var item_submenu={},__extends$1F=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_submenu,"__esModule",{value:!0}),item_submenu.Submenu=void 0;var abstract_item_js_1$4=abstract_item,html_classes_js_1$d=html_classes,Submenu=function(t){function e(e,r,n){var o=t.call(this,e,"submenu",r,n)||this;return o._submenu=null,o}return __extends$1F(e,t),e.fromJson=function(t,e,r){var n=e.content,o=e.menu,i=new this(r,n,e.id),a=t.get("subMenu")(t,o,i);return i.submenu=a,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="►",this.span.classList.add(html_classes_js_1$d.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}(abstract_item_js_1$4.AbstractItem);item_submenu.Submenu=Submenu;var __extends$1E=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$M=commonjsGlobal&&commonjsGlobal.__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(abstract_menu,"__esModule",{value:!0}),abstract_menu.AbstractMenu=void 0;var abstract_postable_js_1$2=abstract_postable,abstract_item_js_1$3=abstract_item,html_classes_js_1$c=html_classes,item_submenu_js_1$2=item_submenu,AbstractMenu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.className=html_classes_js_1$c.HtmlClasses.CONTEXTMENU,e.role="menu",e._items=[],e._baseMenu=null,e}return __extends$1E(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 abstract_item_js_1$3.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 abstract_item_js_1$3.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(html_classes_js_1$c.HtmlClasses.MENU);try{for(var n=__values$M(this.items),o=n.next();!o.done;o=n.next()){var i=o.value;if(i.isHidden()){var a=i.html;a.parentNode&&a.parentNode.removeChild(a)}else r.appendChild(i.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 item_submenu_js_1$2.Submenu}));try{for(var n=__values$M(r),o=n.next();!o.done;o=n.next()){var i=o.value;i.submenu.unpost(),i!==this.focused&&i.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=__values$M(this.items),o=n.next();!o.done;o=n.next()){var i=o.value;if("rule"!==i.type){if(i.id===t)return i;if("submenu"===i.type){var a=i.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}(abstract_postable_js_1$2.AbstractPostable);abstract_menu.AbstractMenu=AbstractMenu;var menu_store={},__values$L=commonjsGlobal&&commonjsGlobal.__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(menu_store,"__esModule",{value:!0}),menu_store.MenuStore=void 0;var menu_util_js_1$7=menu_util,html_classes_js_1$b=html_classes,key_navigatable_js_1$2=key_navigatable,MenuStore=function(){function t(t){this.menu=t,this.store=[],this._active=null,this.counter=0,this.attachedClass=html_classes_js_1$b.HtmlClasses.ATTACHED+"_"+menu_util_js_1$7.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:e<t-1?e+1:0,this.active=this.store[e],this.active},t.prototype.previous=function(){var t=this.store.length;if(0===t)return this.active=null,null;var e=t-1,r=this.store.indexOf(this.active);return r=-1===r||0===r?e:r-1,this.active=this.store[r],this.active},t.prototype.clear=function(){this.remove(this.store)},t.prototype.insert=function(t){var e,r,n=t instanceof HTMLElement?[t]:t;try{for(var o=__values$L(n),i=o.next();!i.done;i=o.next()){var a=i.value;this.insertElement(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.sort()},t.prototype.remove=function(t){var e,r,n=t instanceof HTMLElement?[t]:t;try{for(var o=__values$L(n),i=o.next();!i.done;i=o.next()){var a=i.value;this.removeElement(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.sort()},t.prototype.inTaborder=function(t){this.taborder&&!t&&this.removeTaborder(),!this.taborder&&t&&this.insertTaborder(),this.taborder=t},t.prototype.insertTaborder=function(){this.taborder&&this.insertTaborder_()},t.prototype.removeTaborder=function(){this.taborder&&this.removeTaborder_()},t.prototype.insertElement=function(t){t.classList.contains(this.attachedClass)||(t.classList.add(this.attachedClass),this.taborder&&this.addTabindex(t),this.addEvents(t))},t.prototype.removeElement=function(t){t.classList.contains(this.attachedClass)&&(t.classList.remove(this.attachedClass),this.taborder&&this.removeTabindex(t),this.removeEvents(t))},t.prototype.sort=function(){var t=document.getElementsByClassName(this.attachedClass);this.store=[].slice.call(t)},t.prototype.insertTaborder_=function(){this.store.forEach((function(t){return t.setAttribute("tabindex","0")}))},t.prototype.removeTaborder_=function(){this.store.forEach((function(t){return t.setAttribute("tabindex","-1")}))},t.prototype.addTabindex=function(t){t.hasAttribute("tabindex")&&t.setAttribute(html_classes_js_1$b.HtmlAttrs.OLDTAB,t.getAttribute("tabindex")),t.setAttribute("tabindex","0")},t.prototype.removeTabindex=function(t){t.hasAttribute(html_classes_js_1$b.HtmlAttrs.OLDTAB)?(t.setAttribute("tabindex",t.getAttribute(html_classes_js_1$b.HtmlAttrs.OLDTAB)),t.removeAttribute(html_classes_js_1$b.HtmlAttrs.OLDTAB)):t.removeAttribute("tabindex")},t.prototype.addEvents=function(t){t.hasAttribute(html_classes_js_1$b.HtmlAttrs.COUNTER)||(this.addEvent(t,"contextmenu",this.menu.post.bind(this.menu)),this.addEvent(t,"keydown",this.keydown.bind(this)),t.setAttribute(html_classes_js_1$b.HtmlAttrs.COUNTER,this.counter.toString()),this.counter++)},t.prototype.addEvent=function(t,e,r){var n=html_classes_js_1$b.HtmlAttrs[e.toUpperCase()+"FUNC"];this.attrMap[n+this.counter]=r,t.addEventListener(e,r)},t.prototype.removeEvents=function(t){if(t.hasAttribute(html_classes_js_1$b.HtmlAttrs.COUNTER)){var e=t.getAttribute(html_classes_js_1$b.HtmlAttrs.COUNTER);this.removeEvent(t,"contextmenu",e),this.removeEvent(t,"keydown",e),t.removeAttribute(html_classes_js_1$b.HtmlAttrs.COUNTER)}},t.prototype.removeEvent=function(t,e,r){var n=html_classes_js_1$b.HtmlAttrs[e.toUpperCase()+"FUNC"],o=this.attrMap[n+r];t.removeEventListener(e,o)},t.prototype.keydown=function(t){t.keyCode===key_navigatable_js_1$2.KEY.SPACE&&(this.menu.post(t),t.preventDefault(),t.stopImmediatePropagation())},t}();menu_store.MenuStore=MenuStore;var variable_pool={};Object.defineProperty(variable_pool,"__esModule",{value:!0}),variable_pool.VariablePool=void 0;var VariablePool=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}();variable_pool.VariablePool=VariablePool;var __extends$1D=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(context_menu,"__esModule",{value:!0}),context_menu.ContextMenu=void 0;var abstract_menu_js_1$2=abstract_menu,html_classes_js_1$a=html_classes,menu_store_js_1=menu_store,variable_pool_js_1=variable_pool,ContextMenu=function(t){function e(e){var r=t.call(this)||this;return r.factory=e,r.id="",r.moving=!1,r._store=new menu_store_js_1.MenuStore(r),r.widgets=[],r.variablePool=new variable_pool_js_1.VariablePool,r}return __extends$1D(e,t),e.fromJson=function(t,e){var r=e.pool,n=e.items,o=e.id,i=void 0===o?"":o,a=new this(t);a.id=i;var s=t.get("variable");r.forEach((function(e){return s(t,e,a.pool)}));var l=t.get("items")(t,n,a);return a.items=l,a},e.prototype.generateHtml=function(){this.isPosted()&&this.unpost(),t.prototype.generateHtml.call(this),this._frame=document.createElement("div"),this._frame.classList.add(html_classes_js_1$a.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,a=e;if(a instanceof Event?(n=a.target,this.stop(a)):n=a,a instanceof MouseEvent&&(o=a.pageX,i=a.pageY,o||i||!a.clientX||(o=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i=a.clientY+document.body.scrollTop+document.documentElement.scrollTop)),!o&&!i&&n){var s=window.pageXOffset||document.documentElement.scrollLeft,l=window.pageYOffset||document.documentElement.scrollTop,c=n.getBoundingClientRect();o=(c.right+c.left)/2+s,i=(c.bottom+c.top)/2+l}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}(abstract_menu_js_1$2.AbstractMenu);context_menu.ContextMenu=ContextMenu;var __extends$1C=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$K=commonjsGlobal&&commonjsGlobal.__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.")},__read$U=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(MJContextMenu$1,"__esModule",{value:!0}),MJContextMenu$1.MJContextMenu=void 0;var context_menu_js_1$1=context_menu,item_submenu_js_1$1=item_submenu,MJContextMenu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mathItem=null,e.annotation="",e.annotationTypes={},e}return __extends$1C(e,t),e.prototype.post=function(e,r){if(this.mathItem){if(void 0!==r){var n=this.mathItem.inputJax.name,o=this.findID("Show","Original");o.content="MathML"===n?"Original MathML":n+" Commands",this.findID("Copy","Original").content=o.content;var i=this.findID("Settings","semantics");"MathML"===n?i.disable():i.enable(),this.getAnnotationMenu(),this.dynamicSubmenus()}t.prototype.post.call(this,e,r)}},e.prototype.unpost=function(){t.prototype.unpost.call(this),this.mathItem=null},e.prototype.findID=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=this,i=null;try{for(var a=__values$K(r),s=a.next();!s.done;s=a.next()){var l=s.value;o?(i=o.find(l),o=i instanceof item_submenu_js_1$1.Submenu?i.submenu:null):i=null}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return i},e.prototype.getAnnotationMenu=function(){var t=this,e=this.getAnnotations(this.getSemanticNode());this.createAnnotationMenu("Show",e,(function(){return t.showAnnotation.post()})),this.createAnnotationMenu("Copy",e,(function(){return t.copyAnnotation()}))},e.prototype.getSemanticNode=function(){for(var t=this.mathItem.root;t&&!t.isKind("semantics");){if(t.isToken||1!==t.childNodes.length)return null;t=t.childNodes[0]}return t},e.prototype.getAnnotations=function(t){var e,r,n=[];if(!t)return n;try{for(var o=__values$K(t.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.isKind("annotation")){var s=this.annotationMatch(a);if(s){var l=a.childNodes.reduce((function(t,e){return t+e.toString()}),"");n.push([s,l])}}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},e.prototype.annotationMatch=function(t){var e,r,n=t.attributes.get("encoding");try{for(var o=__values$K(Object.keys(this.annotationTypes)),i=o.next();!i.done;i=o.next()){var a=i.value;if(this.annotationTypes[a].indexOf(n)>=0)return a}}catch(t){e={error:t}}finally{try{i&&!i.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=__read$U(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=__values$K(e.DynamicSubmenus),o=n.next();!o.done;o=n.next()){var i=__read$U(o.value,2),a=i[0],s=i[1],l=this.find(a);if(l){var c=s(this,l);l.submenu=c,c.items.length?l.enable():l.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}(context_menu_js_1$1.ContextMenu);MJContextMenu$1.MJContextMenu=MJContextMenu;var MmlVisitor$1={},__extends$1B=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(MmlVisitor$1,"__esModule",{value:!0}),MmlVisitor$1.MmlVisitor=void 0;var SerializedMmlVisitor_js_1=SerializedMmlVisitor,Options_js_1$g=Options,MmlVisitor=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.options={texHints:!0,semantics:!1},e.mathItem=null,e}return __extends$1B(e,t),e.prototype.visitTree=function(t,e,r){return void 0===e&&(e=null),void 0===r&&(r={}),this.mathItem=e,(0,Options_js_1$g.userOptions)(this.options,r),this.visitNode(t,"")},e.prototype.visitTeXAtomNode=function(e,r){return this.options.texHints?t.prototype.visitTeXAtomNode.call(this,e,r):e.childNodes[0]&&1===e.childNodes[0].childNodes.length?this.visitNode(e.childNodes[0],r):r+"<mrow"+this.getAttributes(e)+">\n"+this.childNodeMml(e,r+" ","\n")+r+"</mrow>"},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+"<math"+this.getAttributes(e)+">\n"+r+" <semantics>\n"+(n?r+" <mrow>\n":"")+this.childNodeMml(e,r+(n?" ":" "),"\n")+(n?r+" </mrow>\n":"")+r+' <annotation encoding="application/x-tex">'+this.mathItem.math+"</annotation>\n"+r+" </semantics>\n"+r+"</math>"},e}(SerializedMmlVisitor_js_1.SerializedMmlVisitor);MmlVisitor$1.MmlVisitor=MmlVisitor;var SelectableInfo$1={},info={},close_button={},__extends$1A=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(close_button,"__esModule",{value:!0}),close_button.CloseButton=void 0;var abstract_postable_js_1$1=abstract_postable,html_classes_js_1$9=html_classes,CloseButton=function(t){function e(e){var r=t.call(this)||this;return r.element=e,r.className=html_classes_js_1$9.HtmlClasses.MENUCLOSE,r.role="button",r}return __extends$1A(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="×",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}(abstract_postable_js_1$1.AbstractPostable);close_button.CloseButton=CloseButton;var __extends$1z=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(info,"__esModule",{value:!0}),info.Info=void 0;var close_button_js_1=close_button,html_classes_js_1$8=html_classes,abstract_postable_js_1=abstract_postable,Info=function(t){function e(e,r,n){var o=t.call(this)||this;return o.title=e,o.signature=n,o.className=html_classes_js_1$8.HtmlClasses.INFO,o.role="dialog",o.contentDiv=o.generateContent(),o.close=o.generateClose(),o.content=r||function(){return""},o}return __extends$1z(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(html_classes_js_1$8.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(html_classes_js_1$8.HtmlClasses.MOUSEPOST),this.menu.unregisterWidget(this)},e.prototype.generateClose=function(){var t=new close_button_js_1.CloseButton(this),e=t.html;return e.classList.add(html_classes_js_1$8.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(html_classes_js_1$8.HtmlClasses.INFOTITLE),t},e.prototype.generateContent=function(){var t=document.createElement("div");return t.classList.add(html_classes_js_1$8.HtmlClasses.INFOCONTENT),t.setAttribute("tabindex","0"),t},e.prototype.generateSignature=function(){var t=document.createElement("span");return t.innerHTML=this.signature,t.classList.add(html_classes_js_1$8.HtmlClasses.INFOSIGNATURE),t},e.prototype.toJson=function(){return{type:""}},e}(abstract_postable_js_1.AbstractPostable);info.Info=Info;var __extends$1y=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(SelectableInfo$1,"__esModule",{value:!0}),SelectableInfo$1.SelectableInfo=void 0;var info_js_1$2=info,html_classes_js_1$7=html_classes,SelectableInfo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1y(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."+html_classes_js_1$7.HtmlClasses.INFOSIGNATURE).appendChild(document.createElement("input"));r.type="button",r.value="Copy to Clipboard",r.addEventListener("click",(function(t){return e.copyToClipboard()}))},e}(info_js_1$2.Info);SelectableInfo$1.SelectableInfo=SelectableInfo;var parse={},item_command={},__extends$1x=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_command,"__esModule",{value:!0}),item_command.Command=void 0;var abstract_item_js_1$2=abstract_item,menu_util_js_1$6=menu_util,Command=function(t){function e(e,r,n,o){var i=t.call(this,e,"command",r,o)||this;return i.command=n,i}return __extends$1x(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(menu_util_js_1$6.MenuUtil.getActiveElement(this))}catch(t){menu_util_js_1$6.MenuUtil.error(t,"Illegal command callback.")}menu_util_js_1$6.MenuUtil.close(this)},e.prototype.toJson=function(){return{type:""}},e}(abstract_item_js_1$2.AbstractItem);item_command.Command=Command;var variable={};Object.defineProperty(variable,"__esModule",{value:!0}),variable.Variable=void 0;var menu_util_js_1$5=menu_util,Variable=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 menu_util_js_1$5.MenuUtil.error(t,"Command of variable "+this.name+" failed."),null}},t.prototype.setValue=function(t,e){try{this.setter(t,e)}catch(t){menu_util_js_1$5.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}();variable.Variable=Variable;var item_checkbox={},abstract_variable_item={},__extends$1w=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(abstract_variable_item,"__esModule",{value:!0}),abstract_variable_item.AbstractVariableItem=void 0;var abstract_item_js_1$1=abstract_item,AbstractVariableItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1w(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}(abstract_item_js_1$1.AbstractItem);abstract_variable_item.AbstractVariableItem=AbstractVariableItem;var __extends$1v=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_checkbox,"__esModule",{value:!0}),item_checkbox.Checkbox=void 0;var abstract_variable_item_js_1$3=abstract_variable_item,menu_util_js_1$4=menu_util,html_classes_js_1$6=html_classes,Checkbox=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 __extends$1v(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()),menu_util_js_1$4.MenuUtil.close(this)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.span.textContent="✓",this.span.classList.add(html_classes_js_1$6.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}(abstract_variable_item_js_1$3.AbstractVariableItem);item_checkbox.Checkbox=Checkbox;var item_combo={},__extends$1u=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_combo,"__esModule",{value:!0}),item_combo.Combo=void 0;var abstract_variable_item_js_1$2=abstract_variable_item,menu_util_js_1$3=menu_util,html_classes_js_1$5=html_classes,key_navigatable_js_1$1=key_navigatable,Combo=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 __extends$1u(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,menu_util_js_1$3.MenuUtil.getActiveElement(this))},e.prototype.space=function(e){t.prototype.space.call(this,e),menu_util_js_1$3.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(html_classes_js_1$5.HtmlClasses.MENUCOMBOBOX)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.span.classList.add(html_classes_js_1$5.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!==key_navigatable_js_1$1.KEY.ESCAPE&&e.keyCode!==key_navigatable_js_1$1.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(menu_util_js_1$3.MenuUtil.getActiveElement(this))}catch(e){t=""}this.input.value=t},e.prototype.toJson=function(){return{type:""}},e}(abstract_variable_item_js_1$2.AbstractVariableItem);item_combo.Combo=Combo;var item_label={},__extends$1t=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_label,"__esModule",{value:!0}),item_label.Label=void 0;var abstract_item_js_1=abstract_item,html_classes_js_1$4=html_classes,Label=function(t){function e(e,r,n){return t.call(this,e,"label",r,n)||this}return __extends$1t(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(html_classes_js_1$4.HtmlClasses.MENULABEL)},e.prototype.toJson=function(){return{type:""}},e}(abstract_item_js_1.AbstractItem);item_label.Label=Label;var item_radio={},__extends$1s=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_radio,"__esModule",{value:!0}),item_radio.Radio=void 0;var abstract_variable_item_js_1$1=abstract_variable_item,menu_util_js_1$2=menu_util,html_classes_js_1$3=html_classes,Radio=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 __extends$1s(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),menu_util_js_1$2.MenuUtil.close(this)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.span.textContent="✓",this.span.classList.add(html_classes_js_1$3.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}(abstract_variable_item_js_1$1.AbstractVariableItem);item_radio.Radio=Radio;var item_rule={},__extends$1r=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_rule,"__esModule",{value:!0}),item_rule.Rule=void 0;var abstract_entry_js_1=abstract_entry,html_classes_js_1$2=html_classes,Rule=function(t){function e(e){var r=t.call(this,e,"rule")||this;return r.className=html_classes_js_1$2.HtmlClasses.MENUITEM,r.role="separator",r}return __extends$1r(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(html_classes_js_1$2.HtmlClasses.MENURULE),e.setAttribute("aria-orientation","vertical")},e.prototype.addEvents=function(t){},e.prototype.toJson=function(){return{type:"rule"}},e}(abstract_entry_js_1.AbstractEntry);item_rule.Rule=Rule;var item_slider={},__extends$1q=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(item_slider,"__esModule",{value:!0}),item_slider.Slider=void 0;var abstract_variable_item_js_1=abstract_variable_item,menu_util_js_1$1=menu_util,html_classes_js_1$1=html_classes,key_navigatable_js_1=key_navigatable,Slider=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"+menu_util_js_1$1.MenuUtil.counter(),i.valueId="ctx_slideValue"+menu_util_js_1$1.MenuUtil.counter(),i.inputEvent=!1,i.variable=e.pool.lookup(n),i.register(),i}return __extends$1q(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,menu_util_js_1$1.MenuUtil.getActiveElement(this)),this.update()},e.prototype.space=function(e){t.prototype.space.call(this,e),menu_util_js_1$1.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(html_classes_js_1$1.HtmlClasses.MENUSLIDER),this.valueSpan=document.createElement("span"),this.valueSpan.setAttribute("id",this.valueId),this.valueSpan.classList.add(html_classes_js_1$1.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(html_classes_js_1$1.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===key_navigatable_js_1.KEY.UP||r===key_navigatable_js_1.KEY.DOWN?(e.preventDefault(),void t.prototype.keydown.call(this,e)):this.inputEvent&&r!==key_navigatable_js_1.KEY.ESCAPE&&r!==key_navigatable_js_1.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(menu_util_js_1$1.MenuUtil.getActiveElement(this)),this.valueSpan.innerHTML=t+"%"}catch(e){t=""}this.input.value=t},e.prototype.toJson=function(){return{type:""}},e}(abstract_variable_item_js_1.AbstractVariableItem);item_slider.Slider=Slider;var sub_menu={},__extends$1p=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(sub_menu,"__esModule",{value:!0}),sub_menu.SubMenu=void 0;var abstract_menu_js_1$1=abstract_menu,SubMenu=function(t){function e(e){var r=t.call(this)||this;return r._anchor=e,r.variablePool=r.anchor.menu.pool,r.setBaseMenu(),r}return __extends$1p(e,t),e.fromJson=function(t,e,r){var n=e.items,o=new this(r),i=t.get("items")(t,n,o);return o.items=i,o},Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},enumerable:!1,configurable:!0}),e.prototype.post=function(){if(this.anchor.menu.isPosted()){for(var e=this.anchor.html,r=this.html,n=this.baseMenu.frame,o=e.offsetWidth,i=o-2,a=0;e&&e!==n;)i+=e.offsetLeft,a+=e.offsetTop,e=e.parentNode;i+r.offsetWidth>document.body.offsetWidth-5&&(i=Math.max(5,i-o-r.offsetWidth+6)),t.prototype.post.call(this,i,a)}},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}(abstract_menu_js_1$1.AbstractMenu);sub_menu.SubMenu=SubMenu;var selection_box={},__extends$1o=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$T=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(selection_box,"__esModule",{value:!0}),selection_box.SelectionBox=selection_box.SelectionMenu=void 0;var menu_util_js_1=menu_util,html_classes_js_1=html_classes,abstract_menu_js_1=abstract_menu,info_js_1$1=info,SelectionMenu=function(t){function e(e){var r=t.call(this)||this;return r.anchor=e,r.className=html_classes_js_1.HtmlClasses.SELECTIONMENU,r.variablePool=r.anchor.menu.pool,r.baseMenu=r.anchor.menu,r}return __extends$1o(e,t),e.fromJson=function(t,e,r){var n=e.title,o=e.values,i=e.variable,a=new this(r),s=t.get("label")(t,{content:n||"",id:n||"id"},a),l=t.get("rule")(t,{},a),c=o.map((function(e){return t.get("radio")(t,{content:e,variable:i,id:e},a)})),u=[s,l].concat(c);return a.items=u,a},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.items.forEach((function(t){return t.html.classList.add(html_classes_js_1.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}(abstract_menu_js_1.AbstractMenu);selection_box.SelectionMenu=SelectionMenu;var SelectionBox=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 __extends$1o(e,t),e.fromJson=function(t,e,r){var n=e.title,o=e.signature,i=e.selections,a=new this(n,o,e.order,e.grid);a.attachMenu(r);var s=i.map((function(e){return t.get("selectionMenu")(t,e,a)}));return a.selections=s,a},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+menu_util_js_1.MenuUtil.counter()),t.html.getBoundingClientRect()})),o=n.map((function(t){return t.width})),i=o.reduce((function(t,e){return t+e}),0),a=n.reduce((function(t,e){return Math.max(t,e.height)}),0);return r.classList.add(html_classes_js_1.HtmlClasses.SELECTIONDIVIDER),r.setAttribute("style","height: "+a+"px;"),[r,i,a,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),i=function(t){var i=a.selections.slice(t,t+o),s=__read$T(a.rowDiv(i),4),l=s[0],c=s[1],u=s[2],d=s[3];e.push(l),r=Math.max(r,c),i.forEach((function(t){return t.html.style.height=u+"px"})),n=a.combineColumn(n,d)},a=this,s=0;s<this.selections.length;s+=o)i(s);this._balanced&&(this.balanceColumn(e,n),r=n.reduce((function(t,e){return t+e}),20)),e.forEach((function(t){return t.style.width=r+"px"}))}},e.prototype.getChunkSize=function(t){switch(this.grid){case"square":return Math.floor(Math.sqrt(t));case"horizontal":return Math.floor(t/e.chunkSize);default:return e.chunkSize}},e.prototype.balanceColumn=function(t,e){t.forEach((function(t){for(var r=Array.from(t.children),n=0,o=void 0;o=r[n];n++)o.style.width=e[n]+"px"}))},e.prototype.combineColumn=function(t,e){for(var r=[],n=0;t[n]||e[n];){if(!t[n]){r=r.concat(e.slice(n));break}if(!e[n]){r=r.concat(t.slice(n));break}r.push(Math.max(t[n],e[n])),n++}return r},e.prototype.left=function(t){var e=this;this.move(t,(function(t){return(0===t?e.selections.length:t)-1}))},e.prototype.right=function(t){var e=this;this.move(t,(function(t){return t===e.selections.length-1?0:t+1}))},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.html.classList.add(html_classes_js_1.HtmlClasses.SELECTION)},e.prototype.generateContent=function(){var e=t.prototype.generateContent.call(this);return e.classList.add(html_classes_js_1.HtmlClasses.SELECTIONBOX),e.removeAttribute("tabindex"),e},e.prototype.findSelection=function(t){var e=t.target,r=null;if(e.id&&(r=this.selections.find((function(t){return t.html.id===e.id}))),!r){var n=e.parentElement.id;r=this.selections.find((function(t){return t.html.id===n}))}return r},e.prototype.move=function(t,e){var r=this.findSelection(t);r.focused&&r.focused.unfocus();var n=e(this.selections.indexOf(r));this.selections[n].focus()},e.prototype.order=function(){this.selections.sort(e.orderMethod.get(this.style))},e.prototype.toJson=function(){return{type:""}},e.chunkSize=4,e.orderMethod=new Map([["alphabetical",function(t,e){return t.items[0].content.localeCompare(e.items[0].content)}],["none",function(t,e){return 1}],["decreasing",function(t,e){var r=t.items.length,n=e.items.length;return r<n?1:n<r?-1:0}],["increasing",function(t,e){var r=t.items.length,n=e.items.length;return r<n?-1:n<r?1:0}]]),e}(info_js_1$1.Info);selection_box.SelectionBox=SelectionBox;var parser_factory={};Object.defineProperty(parser_factory,"__esModule",{value:!0}),parser_factory.ParserFactory=void 0;var ParserFactory=function(){function t(t){this._parser=new Map(t)}return t.prototype.get=function(t){return this._parser.get(t)},t.prototype.add=function(t,e){this._parser.set(t,e)},t}();parser_factory.ParserFactory=ParserFactory;var __rest=commonjsGlobal&&commonjsGlobal.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},__read$S=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$J=commonjsGlobal&&commonjsGlobal.__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.")},__spread=commonjsGlobal&&commonjsGlobal.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(__read$S(arguments[e]));return t};Object.defineProperty(parse,"__esModule",{value:!0}),parse.Parser=void 0;var item_command_js_1=item_command,context_menu_js_1=context_menu,variable_js_1=variable,item_checkbox_js_1=item_checkbox,item_combo_js_1=item_combo,item_label_js_1=item_label,item_radio_js_1=item_radio,item_submenu_js_1=item_submenu,item_rule_js_1$1=item_rule,item_slider_js_1=item_slider,sub_menu_js_1=sub_menu,selection_box_js_1=selection_box,parser_factory_js_1=parser_factory,Parser=function(){function t(t){var e=this;void 0===t&&(t=[]),this._initList=[["command",item_command_js_1.Command.fromJson.bind(item_command_js_1.Command)],["checkbox",item_checkbox_js_1.Checkbox.fromJson.bind(item_checkbox_js_1.Checkbox)],["combo",item_combo_js_1.Combo.fromJson.bind(item_combo_js_1.Combo)],["slider",item_slider_js_1.Slider.fromJson.bind(item_slider_js_1.Slider)],["label",item_label_js_1.Label.fromJson.bind(item_label_js_1.Label)],["radio",item_radio_js_1.Radio.fromJson.bind(item_radio_js_1.Radio)],["rule",item_rule_js_1$1.Rule.fromJson.bind(item_rule_js_1$1.Rule)],["submenu",item_submenu_js_1.Submenu.fromJson.bind(item_submenu_js_1.Submenu)],["contextMenu",context_menu_js_1.ContextMenu.fromJson.bind(context_menu_js_1.ContextMenu)],["subMenu",sub_menu_js_1.SubMenu.fromJson.bind(sub_menu_js_1.SubMenu)],["variable",variable_js_1.Variable.fromJson.bind(variable_js_1.Variable)],["items",this.items.bind(this)],["selectionMenu",selection_box_js_1.SelectionMenu.fromJson.bind(selection_box_js_1.SelectionMenu)],["selectionBox",selection_box_js_1.SelectionBox.fromJson.bind(selection_box_js_1.SelectionBox)]],this._factory=new parser_factory_js_1.ParserFactory(this._initList),t.forEach((function(t){var r=__read$S(t,2),n=r[0],o=r[1];return e.factory.add(n,o)}))}return Object.defineProperty(t.prototype,"factory",{get:function(){return this._factory},enumerable:!1,configurable:!0}),t.prototype.items=function(t,e,r){var n,o,i=[];try{for(var a=__values$J(e),s=a.next();!s.done;s=a.next()){var l=s.value,c=this.parse(l,r);c&&(r.items.push(c),l.disabled&&c.disable(),l.hidden&&i.push(c))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i.forEach((function(t){return t.hide()})),r.items},t.prototype.parse=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.type,o=__rest(t,["type"]),i=this.factory.get(n);return i?i.apply(void 0,__spread([this.factory,o],e)):null},t}();parse.Parser=Parser;var css_util={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CssStyles=void 0;var e=html_classes;!function(t){function r(t){return"."+(e.HtmlClasses[t]||t)}var n={};n[r("INFOCLOSE")]="{ top:.2em; right:.2em;}",n[r("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;}",n[r("INFO")+r("MOUSEPOST")]="{outline:none;}",n[r("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[r("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[r("MENUITEM")]="{ padding: 1px 2em; background:transparent;}",o[r("MENUARROW")]="{ position:absolute; right:.5em; padding-top:.25em; color:#666666; font-family: null; font-size: .75em}",o[r("MENUACTIVE")+" "+r("MENUARROW")]="{color:white}",o[r("MENUARROW")+r("RTL")]="{left:.5em; right:auto}",o[r("MENUCHECK")]="{ position:absolute; left:.7em; font-family: null}",o[r("MENUCHECK")+r("RTL")]="{ right:.7em; left:auto }",o[r("MENURADIOCHECK")]="{ position:absolute; left: .7em;}",o[r("MENURADIOCHECK")+r("RTL")]="{ right: .7em; left:auto}",o[r("MENUINPUTBOX")]="{ padding-left: 1em; right:.5em; color:#666666; font-family: null;}",o[r("MENUINPUTBOX")+r("RTL")]="{ left: .1em;}",o[r("MENUCOMBOBOX")]="{ left:.1em; padding-bottom:.5em;}",o[r("MENUSLIDER")]="{ left: .1em;}",o[r("SLIDERVALUE")]="{ position:absolute; right:.1em; padding-top:.25em; color:#333333; font-size: .75em}",o[r("SLIDERBAR")]="{ outline: none; background: #d3d3d3}",o[r("MENULABEL")]="{ padding: 1px 2em 3px 1.33em; font-style:italic}",o[r("MENURULE")]="{ border-top: 1px solid #DDDDDD; margin: 4px 3px;}",o[r("MENUDISABLED")]="{ color:GrayText}",o[r("MENUACTIVE")]="{ background-color: #606872; color: white;}",o[r("MENUDISABLED")+":focus"]="{ background-color: #E8E8E8}",o[r("MENULABEL")+":focus"]="{ background-color: #E8E8E8}",o[r("CONTEXTMENU")+":focus"]="{ outline:none}",o[r("CONTEXTMENU")+" "+r("MENUITEM")+":focus"]="{ outline:none}",o[r("SELECTIONMENU")]="{ position:relative; float:left; border-bottom: none; -webkit-box-shadow:none; -webkit-border-radius:0px; }",o[r("SELECTIONITEM")]="{ padding-right: 1em;}",o[r("SELECTION")]="{ right: 40%; width:50%; }",o[r("SELECTIONBOX")]="{ padding: 0em; max-height:20em; max-width: none; background-color:#FFFFFF;}",o[r("SELECTIONDIVIDER")]="{ clear: both; border-top: 2px solid #000000;}",o[r("MENU")+" "+r("MENUCLOSE")]="{ top:-10px; left:-10px}";var i={};i[r("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[r("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[r("MENUCLOSE")+":hover"]="{ color:white!important; border:2px solid #CCC!important}",i[r("MENUCLOSE")+":hover span"]="{ background-color:#CCC!important}",i[r("MENUCLOSE")+":hover:focus"]="{ outline:none}";var a=!1,s=!1,l=!1;function c(t){l||(u(i,t),l=!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){s||(u(o,t),s=!0,c(t))},t.addInfoStyles=function(t){a||(u(n,t),a=!0,c(t))}}(t.CssStyles||(t.CssStyles={}))}(css_util),getDefaultExportFromCjs(css_util);var __read$R=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$I=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$K=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Menu$1,"__esModule",{value:!0}),Menu$1.Menu=void 0;var mathjax_js_1$3=mathjax,MathItem_js_1$5=MathItem,global_js_1=global$1,Options_js_1$f=Options,MJContextMenu_js_1=MJContextMenu$1,MmlVisitor_js_1=MmlVisitor$1,SelectableInfo_js_1=SelectableInfo$1,info_js_1=info,parse_js_1=parse,item_rule_js_1=item_rule,css_util_js_1=css_util,sre_js_1=__importDefault$K(sre),MathJax$1=global_js_1.MathJax,isMac="undefined"!=typeof window&&window.navigator&&"Mac"===window.navigator.platform.substr(0,3),Menu=function(){function t(t,e){void 0===e&&(e={});var r=this;this.settings=null,this.defaultSettings=null,this.menu=null,this.MmlVisitor=new MmlVisitor_js_1.MmlVisitor,this.jax={CHTML:null,SVG:null},this.rerenderStart=MathItem_js_1$5.STATE.LAST,this.about=new info_js_1.Info('<b style="font-size:120%;">MathJax</b> v'+mathjax_js_1$3.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("<br/>")}),'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.help=new info_js_1.Info("<b>MathJax Help</b>",(function(){return["<p><b>MathJax</b> 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.</p>","<p><b>Browsers</b>: MathJax works with all modern browsers including"," Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.</p>","<p><b>Math Menu</b>: MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.</p>",'<div style="margin-left: 1em;">',"<p><b>Show Math As:</b> These options allow you to view the formula's"," source markup (as MathML or in its original format).</p>","<p><b>Copy to Clipboard:</b> These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).</p>","<p><b>Math Settings:</b> These give you control over features of MathJax,"," such the size of the mathematics, and the mechanism used"," to display equations.</p>","<p><b>Accessibility</b>: 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.</p>","<p><b>Language</b>: This menu lets you select the language used by MathJax"," for its menus and warning messages. (Not yet implemented in version 3.)</p>","</div>","<p><b>Math Zoom</b>: 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 <b>Math Settings</b> menu.</p>","<p><b>Preferences</b>: 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.</p>"].join("\n")}),'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.mathmlCode=new SelectableInfo_js_1.SelectableInfo("MathJax MathML Expression",(function(){if(!r.menu.mathItem)return"";var t=r.toMML(r.menu.mathItem);return"<pre>"+r.formatSource(t)+"</pre>"}),""),this.originalText=new SelectableInfo_js_1.SelectableInfo("MathJax Original Source",(function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.math;return'<pre style="font-size:125%; margin:0">'+r.formatSource(t)+"</pre>"}),""),this.annotationText=new SelectableInfo_js_1.SelectableInfo("MathJax Annotation Text",(function(){if(!r.menu.mathItem)return"";var t=r.menu.annotation;return'<pre style="font-size:125%; margin:0">'+r.formatSource(t)+"</pre>"}),""),this.zoomBox=new info_js_1.Info("MathJax Zoomed Expression",(function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.typesetRoot.cloneNode(!0);return t.style.margin="0",'<div style="font-size: '+1.25*parseFloat(r.settings.zscale)+'%">'+t.outerHTML+"</div>"}),""),this.document=t,this.options=(0,Options_js_1$f.userOptions)((0,Options_js_1$f.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,MathJax$1._.a11y&&MathJax$1._.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 parse_js_1.Parser([["contextMenu",MJContextMenu_js_1.MJContextMenu.fromJson.bind(MJContextMenu_js_1.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 sre_js_1.default.setupEngine({locale:t})})),this.a11yVar("speechRules",(function(e){var r=__read$R(e.split("-"),2),n=r[0],o=r[1];t.document.options.sre.domain=n,t.document.options.sre.style=o})),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(isMac?"Option":"Alt",isMac?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!isMac}),this.checkbox("Control","Control","ctrl",{hiddne:isMac}),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,css_util_js_1.CssStyles.addInfoStyles(this.document.document),css_util_js_1.CssStyles.addMenuStyles(this.document.document)},t.prototype.checkLoadableItems=function(){var t,e;if(MathJax$1&&MathJax$1._&&MathJax$1.loader&&MathJax$1.startup)!this.settings.collapsible||MathJax$1._.a11y&&MathJax$1._.a11y.complexity||this.loadA11y("complexity"),!this.settings.explorer||MathJax$1._.a11y&&MathJax$1._.a11y.explorer||this.loadA11y("explorer"),!this.settings.assistiveMml||MathJax$1._.a11y&&MathJax$1._.a11y["assistive-mml"]||this.loadA11y("assistive-mml");else{var r=this.menu;try{for(var n=__values$I(Object.keys(this.jax)),o=n.next();!o.done;o=n.next()){var i=o.value;this.jax[i]||r.findID("Settings","Renderer",i).disable()}}catch(e){t={error:e}}finally{try{o&&!o.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 o=__values$I(n.items.slice(1)),i=o.next();!i.done;i=o.next()){var a=i.value;if(a instanceof item_rule_js_1.Rule)break;t?a.enable():a.disable()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}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 o=__values$I(Object.keys(this.settings)),i=o.next();!i.done;i=o.next()){var a=i.value;this.settings[a]!==this.defaultSettings[a]&&(n[a]=this.settings[a])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}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){MathJax$1._.a11y&&MathJax$1._.a11y.explorer&&MathJax$1._.a11y.explorer_ts.setA11yOptions(this.document,t)},t.prototype.getA11y=function(t){if(MathJax$1._.a11y&&MathJax$1._.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=MathJax$1.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||MathJax$1._.a11y&&MathJax$1._.a11y["assistive-mml"]?this.rerender():this.loadA11y("assistive-mml")},t.prototype.setExplorer=function(t){this.enableExplorerItems(t),this.document.options.enableExplorer=t,!t||MathJax$1._.a11y&&MathJax$1._.a11y.explorer?this.rerender(this.settings.collapsible?MathItem_js_1$5.STATE.RERENDER:MathItem_js_1$5.STATE.COMPILED):this.loadA11y("explorer")},t.prototype.setCollapsible=function(t){this.document.options.enableComplexity=t,!t||MathJax$1._.a11y&&MathJax$1._.a11y.complexity?this.rerender(MathItem_js_1$5.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,o=this.defaultSettings;try{for(var i=__values$I(Object.keys(this.settings)),a=i.next();!a.done;a=i.next()){var s=a.value,l=n.lookup(s);if(l){l.setValue(o[s]);var c=l.items[0];c&&c.executeCallbacks_()}else this.settings[s]=o[s]}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}t.loading--,this.rerender(MathItem_js_1$5.STATE.COMPILED)},t.prototype.checkComponent=function(e){var r=t.loadingPromises.get(e);r&&mathjax_js_1$3.mathjax.retryAfter(r)},t.prototype.loadComponent=function(e,r){if(!t.loadingPromises.has(e)){var n=MathJax$1.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=!MathItem_js_1$5.STATE.ENRICHED;this.loadComponent("a11y/"+e,(function(){var o=MathJax$1.startup;mathjax_js_1$3.mathjax.handlers.unregister(o.handler),o.handler=o.getHandler(),mathjax_js_1$3.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?MathItem_js_1$5.STATE.COMPILED:MathItem_js_1$5.STATE.TYPESET))}))},t.prototype.transferMathList=function(t){var e,r,n=this.document.options.MathItem;try{for(var o=__values$I(t.math),i=o.next();!i.done;i=o.next()){var a=i.value,s=new n;Object.assign(s,a),this.document.math.push(s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},t.prototype.formatSource=function(t){return t.trim().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},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=MathItem_js_1$5.STATE.TYPESET),this.rerenderStart=Math.min(e,this.rerenderStart),t.loading||(this.rerenderStart<=MathItem_js_1$5.STATE.COMPILED&&this.document.reset({inputJax:[]}),this.document.rerender(this.rerenderStart),this.rerenderStart=MathItem_js_1$5.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 o,i;void 0===r&&(r=[]),void 0===n&&(n=!1);var a=[];try{for(var s=__values$I(r),l=s.next();!l.done;l=s.next()){var c=l.value;Array.isArray(c)?a=a.concat(c):a.push(c)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.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,Options_js_1$f.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}();Menu$1.Menu=Menu;var __extends$1n=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$c=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$c=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$c.apply(this,arguments)},__read$Q=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$t=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$H=commonjsGlobal&&commonjsGlobal.__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(MenuHandler$1,"__esModule",{value:!0});var MenuHandler_2=MenuHandler$1.MenuHandler=MenuHandler$1.MenuMathDocumentMixin=MenuHandler$1.MenuMathItemMixin=void 0,mathjax_js_1$2=mathjax,MathItem_js_1$4=MathItem,Options_js_1$e=Options,Menu_js_1=Menu$1;function MenuMathItemMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1n(e,t),e.prototype.addMenu=function(t,e){void 0===e&&(e=!1),this.state()>=MathItem_js_1$4.STATE.CONTEXT_MENU||(this.isEscaped||!t.options.enableMenu&&!e||t.menu.addMenu(this),this.state(MathItem_js_1$4.STATE.CONTEXT_MENU))},e.prototype.checkLoading=function(t){t.checkLoading()},e}(t)}function MenuMathDocumentMixin(t){var e;return e=function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$t([],__read$Q(e),!1))||this;n.menu=new n.options.MenuClass(n,n.options.menuOptions);var o=n.constructor.ProcessBits;return o.has("context-menu")||o.allocate("context-menu"),n.options.MathItem=MenuMathItemMixin(n.options.MathItem),n}return __extends$1n(e,t),e.prototype.addMenu=function(){var t,e;if(!this.processed.isSet("context-menu")){try{for(var r=__values$H(this.math),n=r.next();!n.done;n=r.next()){n.value.addMenu(this)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("context-menu")}return this},e.prototype.checkLoading=function(){this.menu.isLoading&&mathjax_js_1$2.mathjax.retryAfter(this.menu.loadingPromise.catch((function(t){return console.log(t)})));var t=this.menu.settings;return t.collapsible&&(this.options.enableComplexity=!0,this.menu.checkComponent("a11y/complexity")),t.explorer&&(this.options.enableEnrichment=!0,this.options.enableExplorer=!0,this.menu.checkComponent("a11y/explorer")),this},e.prototype.state=function(e,r){return void 0===r&&(r=!1),t.prototype.state.call(this,e,r),e<MathItem_js_1$4.STATE.CONTEXT_MENU&&this.processed.clear("context-menu"),this},e.prototype.updateDocument=function(){return t.prototype.updateDocument.call(this),this.menu.menu.store.sort(),this},e}(t),e.OPTIONS=__assign$c(__assign$c({enableEnrichment:!0,enableComplexity:!0,enableExplorer:!0,enrichSpeech:"none",enrichError:function(t,e,r){return console.warn("Enrichment Error:",r)}},t.OPTIONS),{MenuClass:Menu_js_1.Menu,menuOptions:Menu_js_1.Menu.OPTIONS,enableMenu:!0,sre:t.OPTIONS.sre||(0,Options_js_1$e.expandable)({}),a11y:t.OPTIONS.a11y||(0,Options_js_1$e.expandable)({}),renderActions:(0,Options_js_1$e.expandable)(__assign$c(__assign$c({},t.OPTIONS.renderActions),{addMenu:[MathItem_js_1$4.STATE.CONTEXT_MENU],checkLoading:[MathItem_js_1$4.STATE.UNPROCESSED+1]}))}),e}function MenuHandler(t){return t.documentClass=MenuMathDocumentMixin(t.documentClass),t}(0,MathItem_js_1$4.newState)("CONTEXT_MENU",170),MenuHandler$1.MenuMathItemMixin=MenuMathItemMixin,MenuHandler$1.MenuMathDocumentMixin=MenuMathDocumentMixin,MenuHandler_2=MenuHandler$1.MenuHandler=MenuHandler;var FindMathML$1={},FindMath={};Object.defineProperty(FindMath,"__esModule",{value:!0}),FindMath.AbstractFindMath=void 0;var Options_js_1$d=Options,AbstractFindMath=function(){function t(t){var e=this.constructor;this.options=(0,Options_js_1$d.userOptions)((0,Options_js_1$d.defaultOptions)({},e.OPTIONS),t)}return t.OPTIONS={},t}();FindMath.AbstractFindMath=AbstractFindMath;var __extends$1m=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$G=commonjsGlobal&&commonjsGlobal.__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(FindMathML$1,"__esModule",{value:!0});var FindMathML_2=FindMathML$1.FindMathML=void 0,FindMath_js_1$1=FindMath,NAMESPACE="http://www.w3.org/1998/Math/MathML",FindMathML=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1m(e,t),e.prototype.findMath=function(t){var e=new Set;this.findMathNodes(t,e),this.findMathPrefixed(t,e);var r=this.adaptor.root(this.adaptor.document);return"html"===this.adaptor.kind(r)&&0===e.size&&this.findMathNS(t,e),this.processMath(e)},e.prototype.findMathNodes=function(t,e){var r,n;try{for(var o=__values$G(this.adaptor.tags(t,"math")),i=o.next();!i.done;i=o.next()){var a=i.value;e.add(a)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.findMathPrefixed=function(t,e){var r,n,o,i,a=this.adaptor.root(this.adaptor.document);try{for(var s=__values$G(this.adaptor.allAttributes(a)),l=s.next();!l.done;l=s.next()){var c=l.value;if("xmlns:"===c.name.substr(0,6)&&c.value===NAMESPACE){var u=c.name.substr(6);try{for(var d=(o=void 0,__values$G(this.adaptor.tags(t,u+":math"))),p=d.next();!p.done;p=d.next()){var m=p.value;e.add(m)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype.findMathNS=function(t,e){var r,n;try{for(var o=__values$G(this.adaptor.tags(t,"math",NAMESPACE)),i=o.next();!i.done;i=o.next()){var a=i.value;e.add(a)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.processMath=function(t){var e,r,n=[];try{for(var o=__values$G(Array.from(t)),i=o.next();!i.done;i=o.next()){var a=i.value,s="block"===this.adaptor.getAttribute(a,"display")||"display"===this.adaptor.getAttribute(a,"mode"),l={node:a,n:0,delim:""},c={node:a,n:0,delim:""};n.push({math:this.adaptor.outerHTML(a),start:l,end:c,display:s})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},e.OPTIONS={},e}(FindMath_js_1$1.AbstractFindMath);FindMathML_2=FindMathML$1.FindMathML=FindMathML;var mathml={},InputJax={},FunctionList$1={},__extends$1l=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$F=commonjsGlobal&&commonjsGlobal.__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.")},__read$P=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$s=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(FunctionList$1,"__esModule",{value:!0}),FunctionList$1.FunctionList=void 0;var PrioritizedList_js_1=PrioritizedList$1,FunctionList=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1l(e,t),e.prototype.execute=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var o=__values$F(this),i=o.next();!i.done;i=o.next()){var a=i.value,s=a.item.apply(a,__spreadArray$s([],__read$P(r),!1));if(!1===s)return!1}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return!0},e.prototype.asyncExecute=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=-1,n=this.items;return new Promise((function(e,o){!function i(){for(var a;++r<n.length;){var s=(a=n[r]).item.apply(a,__spreadArray$s([],__read$P(t),!1));if(s instanceof Promise)return void s.then(i).catch((function(t){return o(t)}));if(!1===s)return void e(!1)}e(!0)}()}))},e}(PrioritizedList_js_1.PrioritizedList);FunctionList$1.FunctionList=FunctionList,Object.defineProperty(InputJax,"__esModule",{value:!0}),InputJax.AbstractInputJax=void 0;var Options_js_1$c=Options,FunctionList_js_1$2=FunctionList$1,AbstractInputJax=function(){function t(t){void 0===t&&(t={}),this.adaptor=null,this.mmlFactory=null;var e=this.constructor;this.options=(0,Options_js_1$c.userOptions)((0,Options_js_1$c.defaultOptions)({},e.OPTIONS),t),this.preFilters=new FunctionList_js_1$2.FunctionList,this.postFilters=new FunctionList_js_1$2.FunctionList}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),t.prototype.setAdaptor=function(t){this.adaptor=t},t.prototype.setMmlFactory=function(t){this.mmlFactory=t},t.prototype.initialize=function(){},t.prototype.reset=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"processStrings",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.findMath=function(t,e){return[]},t.prototype.executeFilters=function(t,e,r,n){var o={math:e,document:r,data:n};return t.execute(o),o.data},t.NAME="generic",t.OPTIONS={},t}();InputJax.AbstractInputJax=AbstractInputJax;var MathMLCompile$1={},Entities$1={},AsyncLoad={};Object.defineProperty(AsyncLoad,"__esModule",{value:!0}),AsyncLoad.asyncLoad=void 0;var mathjax_js_1$1=mathjax;function asyncLoad(t){return mathjax_js_1$1.mathjax.asyncLoad?new Promise((function(e,r){var n=mathjax_js_1$1.mathjax.asyncLoad(t);n instanceof Promise?n.then((function(t){return e(t)})).catch((function(t){return r(t)})):e(n)})):Promise.reject("Can't load '".concat(t,"': No asyncLoad method specified"))}AsyncLoad.asyncLoad=asyncLoad,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.numeric=t.translate=t.remove=t.add=t.entities=t.options=void 0;var e=Retries,r=AsyncLoad;t.options={loadMissingEntities:!0},t.entities={ApplyFunction:"⁡",Backslash:"∖",Because:"∵",Breve:"˘",Cap:"⋒",CenterDot:"·",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",Congruent:"≡",ContourIntegral:"∮",Coproduct:"∐",Cross:"⨯",Cup:"⋓",CupCap:"≍",Dagger:"‡",Del:"∇",Delta:"Δ",Diamond:"⋄",DifferentialD:"ⅆ",DotEqual:"≐",DoubleDot:"¨",DoubleRightTee:"⊨",DoubleVerticalBar:"∥",DownArrow:"↓",DownLeftVector:"↽",DownRightVector:"⇁",DownTee:"⊤",Downarrow:"⇓",Element:"∈",EqualTilde:"≂",Equilibrium:"⇌",Exists:"∃",ExponentialE:"ⅇ",FilledVerySmallSquare:"▪",ForAll:"∀",Gamma:"Γ",Gg:"⋙",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Hacek:"ˇ",Hat:"^",HumpDownHump:"≎",HumpEqual:"≏",Im:"ℑ",ImaginaryI:"ⅈ",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Lambda:"Λ",Larr:"↞",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDownVector:"⇃",LeftFloor:"⌊",LeftRightArrow:"↔",LeftTee:"⊣",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpVector:"↿",LeftVector:"↼",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessSlantEqual:"⩽",LessTilde:"≲",Ll:"⋘",Lleftarrow:"⇚",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lsh:"↰",MinusPlus:"∓",NestedGreaterGreater:"≫",NestedLessLess:"≪",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotPrecedes:"⊀",NotPrecedesSlantEqual:"⋠",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsSlantEqual:"⋡",NotSupersetEqual:"⊉",NotTilde:"≁",NotVerticalBar:"∤",Omega:"Ω",OverBar:"‾",OverBrace:"⏞",PartialD:"∂",Phi:"Φ",Pi:"Π",PlusMinus:"±",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Product:"∏",Proportional:"∝",Psi:"Ψ",Rarr:"↠",Re:"ℜ",ReverseEquilibrium:"⇋",RightAngleBracket:"⟩",RightArrow:"→",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDownVector:"⇂",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpVector:"↾",RightVector:"⇀",Rightarrow:"⇒",Rrightarrow:"⇛",Rsh:"↱",Sigma:"Σ",SmallCircle:"∘",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Star:"⋆",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",Therefore:"∴",Theta:"Θ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",UnderBar:"_",UnderBrace:"⏟",Union:"⋃",UnionPlus:"⊎",UpArrow:"↑",UpDownArrow:"↕",UpTee:"⊥",Uparrow:"⇑",Updownarrow:"⇕",Upsilon:"Υ",Vdash:"⊩",Vee:"⋁",VerticalBar:"∣",VerticalTilde:"≀",Vvdash:"⊪",Wedge:"⋀",Xi:"Ξ",amp:"&",acute:"´",aleph:"ℵ",alpha:"α",amalg:"⨿",and:"∧",ang:"∠",angmsd:"∡",angsph:"∢",ape:"≊",backprime:"‵",backsim:"∽",backsimeq:"⋍",beta:"β",beth:"ℶ",between:"≬",bigcirc:"◯",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",blacklozenge:"⧫",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",bowtie:"⋈",boxdl:"┐",boxdr:"┌",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxur:"└",bsol:"\\",bull:"•",cap:"∩",check:"✓",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",clubs:"♣",colon:":",comp:"∁",ctdot:"⋯",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cup:"∪",curarr:"↷",curlyvee:"⋎",curlywedge:"⋏",dagger:"†",daleth:"ℸ",ddarr:"⇊",deg:"°",delta:"δ",digamma:"ϝ",div:"÷",divideontimes:"⋇",dot:"˙",doteqdot:"≑",dotplus:"∔",dotsquare:"⊡",dtdot:"⋱",ecir:"≖",efDot:"≒",egs:"⪖",ell:"ℓ",els:"⪕",empty:"∅",epsi:"ε",epsiv:"ϵ",erDot:"≓",eta:"η",eth:"ð",flat:"♭",fork:"⋔",frown:"⌢",gEl:"⪌",gamma:"γ",gap:"⪆",gimel:"ℷ",gnE:"≩",gnap:"⪊",gne:"⪈",gnsim:"⋧",gt:">",gtdot:"⋗",harrw:"↭",hbar:"ℏ",hellip:"…",hookleftarrow:"↩",hookrightarrow:"↪",imath:"ı",infin:"∞",intcal:"⊺",iota:"ι",jmath:"ȷ",kappa:"κ",kappav:"ϰ",lEg:"⪋",lambda:"λ",lap:"⪅",larrlp:"↫",larrtl:"↢",lbrace:"{",lbrack:"[",le:"≤",leftleftarrows:"⇇",leftthreetimes:"⋋",lessdot:"⋖",lmoust:"⎰",lnE:"≨",lnap:"⪉",lne:"⪇",lnsim:"⋦",longmapsto:"⟼",looparrowright:"↬",lowast:"∗",loz:"◊",lt:"<",ltimes:"⋉",ltri:"◃",macr:"¯",malt:"✠",mho:"℧",mu:"μ",multimap:"⊸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",natur:"♮",nearr:"↗",nharr:"↮",nlarr:"↚",not:"¬",nrarr:"↛",nu:"ν",nvDash:"⊭",nvdash:"⊬",nwarr:"↖",omega:"ω",omicron:"ο",or:"∨",osol:"⊘",period:".",phi:"φ",phiv:"ϕ",pi:"π",piv:"ϖ",prap:"⪷",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",prime:"′",psi:"ψ",quot:'"',rarrtl:"↣",rbrace:"}",rbrack:"]",rho:"ρ",rhov:"ϱ",rightrightarrows:"⇉",rightthreetimes:"⋌",ring:"˚",rmoust:"⎱",rtimes:"⋊",rtri:"▹",scap:"⪸",scnE:"⪶",scnap:"⪺",scnsim:"⋩",sdot:"⋅",searr:"↘",sect:"§",sharp:"♯",sigma:"σ",sigmav:"ς",simne:"≆",smile:"⌣",spades:"♠",sub:"⊂",subE:"⫅",subnE:"⫋",subne:"⊊",supE:"⫆",supnE:"⫌",supne:"⊋",swarr:"↙",tau:"τ",theta:"θ",thetav:"ϑ",tilde:"˜",times:"×",triangle:"▵",triangleq:"≜",upsi:"υ",upuparrows:"⇈",veebar:"⊻",vellip:"⋮",weierp:"℘",xi:"ξ",yen:"¥",zeta:"ζ",zigrarr:"⇝",nbsp:" ",rsquo:"’",lsquo:"‘"};var n={};function o(o,a){if("#"===a.charAt(0))return i(a.slice(1));if(t.entities[a])return t.entities[a];if(t.options.loadMissingEntities){var s=a.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:a.charAt(0).toLowerCase();n[s]||(n[s]=!0,(0,e.retryAfter)((0,r.asyncLoad)("./util/entities/"+s+".js")))}return o}function i(t){var e="x"===t.charAt(0)?parseInt(t.slice(1),16):parseInt(t);return String.fromCodePoint(e)}t.add=function(e,r){Object.assign(t.entities,e),n[r]=!0},t.remove=function(e){delete t.entities[e]},t.translate=function(t){return t.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,o)},t.numeric=i}(Entities$1),getDefaultExportFromCjs(Entities$1);var __assign$b=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$b=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$b.apply(this,arguments)},__createBinding$d=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$d=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$d=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$d(e,t,r);return __setModuleDefault$d(e,t),e},__values$E=commonjsGlobal&&commonjsGlobal.__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(MathMLCompile$1,"__esModule",{value:!0}),MathMLCompile$1.MathMLCompile=void 0;var MmlNode_js_1$k=MmlNode,Options_js_1$b=Options,Entities=__importStar$d(Entities$1),MathMLCompile=function(){function t(t){void 0===t&&(t={});var e=this.constructor;this.options=(0,Options_js_1$b.userOptions)((0,Options_js_1$b.defaultOptions)({},e.OPTIONS),t)}return t.prototype.setMmlFactory=function(t){this.factory=t},t.prototype.compile=function(t){var e=this.makeNode(t);return e.verifyTree(this.options.verify),e.setInheritedAttributes({},!1,0,!1),e.walkTree(this.markMrows),e},t.prototype.makeNode=function(t){var e,r,n=this.adaptor,o=!1,i=n.kind(t).replace(/^.*:/,""),a=n.getAttribute(t,"data-mjx-texclass")||"";a&&(a=this.filterAttribute("data-mjx-texclass",a)||"");var s=a&&"mrow"===i?"TeXAtom":i;try{for(var l=__values$E(this.filterClassList(n.allClasses(t))),c=l.next();!c.done;c=l.next()){var u=c.value;u.match(/^MJX-TeXAtom-/)&&"mrow"===i?(a=u.substr(12),s="TeXAtom"):"MJX-fixedlimits"===u&&(o=!0)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}this.factory.getNodeClass(s)||this.error('Unknown node type "'+s+'"');var d=this.factory.create(s);return"TeXAtom"!==s||"OP"!==a||o||(d.setProperty("movesupsub",!0),d.attributes.setInherited("movablelimits",!0)),a&&(d.texClass=MmlNode_js_1$k.TEXCLASS[a],d.setProperty("texClass",d.texClass)),this.addAttributes(d,t),this.checkClass(d,t),this.addChildren(d,t),d},t.prototype.addAttributes=function(t,e){var r,n,o=!1;try{for(var i=__values$E(this.adaptor.allAttributes(e)),a=i.next();!a.done;a=i.next()){var s=a.value,l=s.name,c=this.filterAttribute(l,s.value);if(null!==c&&"xmlns"!==l)if("data-mjx-"===l.substr(0,9))switch(l.substr(9)){case"alternate":t.setProperty("variantForm",!0);break;case"variant":t.attributes.set("mathvariant",c),o=!0;break;case"smallmatrix":t.setProperty("scriptlevel",1),t.setProperty("useHeight",!1);break;case"accent":t.setProperty("mathaccent","true"===c);break;case"auto-op":t.setProperty("autoOP","true"===c);break;case"script-align":t.setProperty("scriptalign",c)}else if("class"!==l){var u=c.toLowerCase();"true"===u||"false"===u?t.attributes.set(l,"true"===u):o&&"mathvariant"===l||t.attributes.set(l,c)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.filterAttribute=function(t,e){return e},t.prototype.filterClassList=function(t){return t},t.prototype.addChildren=function(t,e){var r,n;if(0!==t.arity){var o=this.adaptor;try{for(var i=__values$E(o.childNodes(e)),a=i.next();!a.done;a=i.next()){var s=a.value,l=o.kind(s);if("#comment"!==l)if("#text"===l)this.addText(t,s);else if(t.isKind("annotation-xml"))t.appendChild(this.factory.create("XML").setXML(s,o));else{var c=t.appendChild(this.makeNode(s));0===c.arity&&o.childNodes(s).length&&(this.options.fixMisplacedChildren?this.addChildren(t,s):c.mError("There should not be children for "+c.kind+" nodes",this.options.verify,!0))}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}},t.prototype.addText=function(t,e){var r=this.adaptor.value(e);(t.isToken||t.getProperty("isChars"))&&t.arity?(t.isToken&&(r=Entities.translate(r),r=this.trimSpace(r)),t.appendChild(this.factory.create("text").setText(r))):r.match(/\S/)&&this.error('Unexpected text node "'+r+'"')},t.prototype.checkClass=function(t,e){var r,n,o=[];try{for(var i=__values$E(this.filterClassList(this.adaptor.allClasses(e))),a=i.next();!a.done;a=i.next()){var s=a.value;"MJX-"===s.substr(0,4)?"MJX-variant"===s?t.setProperty("variantForm",!0):"MJX-TeXAtom"!==s.substr(0,11)&&t.attributes.set("mathvariant",this.fixCalligraphic(s.substr(3))):o.push(s)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o.length&&t.attributes.set("class",o.join(" "))},t.prototype.fixCalligraphic=function(t){return t.replace(/caligraphic/,"calligraphic")},t.prototype.markMrows=function(t){if(t.isKind("mrow")&&!t.isInferred&&t.childNodes.length>=2){var e=t.childNodes[0],r=t.childNodes[t.childNodes.length-1];e.isKind("mo")&&e.attributes.get("fence")&&e.attributes.get("stretchy")&&r.isKind("mo")&&r.attributes.get("fence")&&r.attributes.get("stretchy")&&(e.childNodes.length&&t.setProperty("open",e.getText()),r.childNodes.length&&t.setProperty("close",r.getText()))}},t.prototype.trimSpace=function(t){return t.replace(/[\t\n\r]/g," ").replace(/^ +/,"").replace(/ +$/,"").replace(/ +/g," ")},t.prototype.error=function(t){throw new Error(t)},t.OPTIONS={MmlFactory:null,fixMisplacedChildren:!0,verify:__assign$b({},MmlNode_js_1$k.AbstractMmlNode.verifyDefaults),translateEntities:!0},t}();MathMLCompile$1.MathMLCompile=MathMLCompile;var __extends$1k=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$O=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(mathml,"__esModule",{value:!0});var MathML_1=mathml.MathML=void 0,InputJax_js_1$1=InputJax,Options_js_1$a=Options,FunctionList_js_1$1=FunctionList$1,FindMathML_js_1=FindMathML$1,MathMLCompile_js_1=MathMLCompile$1,MathML=function(t){function e(e){void 0===e&&(e={});var r=this,n=__read$O((0,Options_js_1$a.separateOptions)(e,FindMathML_js_1.FindMathML.OPTIONS,MathMLCompile_js_1.MathMLCompile.OPTIONS),3),o=n[0],i=n[1],a=n[2];return(r=t.call(this,o)||this).findMathML=r.options.FindMathML||new FindMathML_js_1.FindMathML(i),r.mathml=r.options.MathMLCompile||new MathMLCompile_js_1.MathMLCompile(a),r.mmlFilters=new FunctionList_js_1$1.FunctionList,r}return __extends$1k(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||"<math></math>").trim()),o=this.checkForErrors(this.adaptor.parse(n,"text/"+this.options.parseAs)),i=this.adaptor.body(o);1!==this.adaptor.childNodes(i).length&&this.error("MathML must consist of a single element"),r=this.adaptor.remove(this.adaptor.firstChild(i)),"math"!==this.adaptor.kind(r).replace(/^[a-z]+:/,"")&&this.error("MathML must be formed by a <math> element, not <"+this.adaptor.kind(r)+">")}return r=this.executeFilters(this.mmlFilters,t,e,r),this.executeFilters(this.postFilters,t,e,this.mathml.compile(r))},e.prototype.checkForErrors=function(t){var e=this.adaptor.tags(this.adaptor.body(t),"parsererror")[0];return e&&(""===this.adaptor.textContent(e)&&this.error("Error processing MathML"),this.options.parseError.call(this,e)),t},e.prototype.error=function(t){throw new Error(t)},e.prototype.findMath=function(t){return this.findMathML.findMath(t)},e.NAME="MathML",e.OPTIONS=(0,Options_js_1$a.defaultOptions)({parseAs:"html",forceReparse:!1,FindMathML:null,MathMLCompile:null,parseError:function(t){this.error(this.adaptor.textContent(t).replace(/\n.*/g,""))}},InputJax_js_1$1.AbstractInputJax.OPTIONS),e}(InputJax_js_1$1.AbstractInputJax);MathML_1=mathml.MathML=MathML;var tex$2={},FindTeX$1={},__extends$1j=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$N=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(FindTeX$1,"__esModule",{value:!0}),FindTeX$1.FindTeX=void 0;var FindMath_js_1=FindMath,string_js_1$7=string,MathItem_js_1$3=MathItem,FindTeX=function(t){function e(e){var r=t.call(this,e)||this;return r.getPatterns(),r}return __extends$1j(e,t),e.prototype.getPatterns=function(){var t=this,e=this.options,r=[],n=[],o=[];this.end={},this.env=this.sub=0;var i=1;e.inlineMath.forEach((function(e){return t.addPattern(r,e,!1)})),e.displayMath.forEach((function(e){return t.addPattern(r,e,!0)})),r.length&&n.push(r.sort(string_js_1$7.sortLength).join("|")),e.processEnvironments&&(n.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=i,i++),e.processEscapes&&o.push("\\\\([\\\\$])"),e.processRefs&&o.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),o.length&&(n.push("("+o.join("|")+")"),this.sub=i),this.start=new RegExp(n.join("|"),"g"),this.hasPatterns=n.length>0},e.prototype.addPattern=function(t,e,r){var n=__read$N(e,2),o=n[0],i=n[1];t.push((0,string_js_1$7.quotePattern)(o)),this.end[o]=[i,r,this.endPattern(i)]},e.prototype.endPattern=function(t,e){return new RegExp((e||(0,string_js_1$7.quotePattern)(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")},e.prototype.findEnd=function(t,e,r,n){for(var o,i=__read$N(n,3),a=i[0],s=i[1],l=i[2],c=l.lastIndex=r.index+r[0].length,u=0;o=l.exec(t);){if((o[1]||o[0])===a&&0===u)return(0,MathItem_js_1$3.protoItem)(r[0],t.substr(c,o.index-c),o[0],e,r.index,o.index+o[0].length,s);"{"===o[0]?u++:"}"===o[0]&&u&&u--}return null},e.prototype.findMathInString=function(t,e,r){var n,o;for(this.start.lastIndex=0;n=this.start.exec(r);){if(void 0!==n[this.env]&&this.env){var i="\\\\end\\s*(\\{"+(0,string_js_1$7.quotePattern)(n[this.env])+"\\})";(o=this.findEnd(r,e,n,["{"+n[this.env]+"}",!0,this.endPattern(null,i)]))&&(o.math=o.open+o.math+o.close,o.open=o.close="")}else if(void 0!==n[this.sub]&&this.sub){var a=n[this.sub];i=n.index+n[this.sub].length;o=2===a.length?(0,MathItem_js_1$3.protoItem)("",a.substr(1),"",e,n.index,i):(0,MathItem_js_1$3.protoItem)("",a,"",e,n.index,i,!1)}else o=this.findEnd(r,e,n,this.end[n[0]]);o&&(t.push(o),this.start.lastIndex=o.end.n)}},e.prototype.findMath=function(t){var e=[];if(this.hasPatterns)for(var r=0,n=t.length;r<n;r++)this.findMathInString(e,r,t[r]);return e},e.OPTIONS={inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0,processRefs:!0},e}(FindMath_js_1.AbstractFindMath);FindTeX$1.FindTeX=FindTeX;var FilterUtil$1={},NodeUtil$1={},__values$D=commonjsGlobal&&commonjsGlobal.__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.")},__read$M=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$r=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(NodeUtil$1,"__esModule",{value:!0});var MmlNode_js_1$j=MmlNode,mo_js_1$2=mo$2,NodeUtil;!function(t){var e=new Map([["autoOP",!0],["fnOP",!0],["movesupsub",!0],["subsupOK",!0],["texprimestyle",!0],["useHeight",!0],["variantForm",!0],["withDelims",!0],["mathaccent",!0],["open",!0],["close",!0]]);function r(t,r){var n,o;try{for(var i=__values$D(Object.keys(r)),a=i.next();!a.done;a=i.next()){var s=a.value,l=r[s];"texClass"===s?(t.texClass=l,t.setProperty(s,l)):"movablelimits"===s?(t.setProperty("movablelimits",l),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",l)):"inferred"===s||(e.has(s)?t.setProperty(s,l):t.attributes.set(s,l))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}function n(t,e,r){t.childNodes[e]=r,r&&(r.parent=t)}function o(t,e){return t.isKind(e)}t.createEntity=function(t){return String.fromCodePoint(parseInt(t,16))},t.getChildren=function(t){return t.childNodes},t.getText=function(t){return t.getText()},t.appendChildren=function(t,e){var r,n;try{for(var o=__values$D(e),i=o.next();!i.done;i=o.next()){var a=i.value;t.appendChild(a)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.setAttribute=function(t,e,r){t.attributes.set(e,r)},t.setProperty=function(t,e,r){t.setProperty(e,r)},t.setProperties=r,t.getProperty=function(t,e){return t.getProperty(e)},t.getAttribute=function(t,e){return t.attributes.get(e)},t.removeProperties=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t.removeProperty.apply(t,__spreadArray$r([],__read$M(e),!1))},t.getChildAt=function(t,e){return t.childNodes[e]},t.setChild=n,t.copyChildren=function(t,e){for(var r=t.childNodes,o=0;o<r.length;o++)n(e,o,r[o])},t.copyAttributes=function(t,e){e.attributes=t.attributes,r(e,t.getAllProperties())},t.isType=o,t.isEmbellished=function(t){return t.isEmbellished},t.getTexClass=function(t){return t.texClass},t.getCoreMO=function(t){return t.coreMO()},t.isNode=function(t){return t instanceof MmlNode_js_1$j.AbstractMmlNode||t instanceof MmlNode_js_1$j.AbstractMmlEmptyNode},t.isInferred=function(t){return t.isInferred},t.getForm=function(t){var e,r;if(!o(t,"mo"))return null;var n=t,i=n.getForms();try{for(var a=__values$D(i),s=a.next();!s.done;s=a.next()){var l=s.value,c=mo_js_1$2.MmlMo.OPTABLE[l][n.getText()];if(c)return c}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return null}}(NodeUtil||(NodeUtil={})),NodeUtil$1.default=NodeUtil;var __values$C=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$J=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(FilterUtil$1,"__esModule",{value:!0});var MmlNode_js_1$i=MmlNode,NodeUtil_js_1$h=__importDefault$J(NodeUtil$1),FilterUtil;!function(t){t.cleanStretchy=function(t){var e,r,n=t.data;try{for(var o=__values$C(n.getList("fixStretchy")),i=o.next();!i.done;i=o.next()){var a=i.value;if(NodeUtil_js_1$h.default.getProperty(a,"fixStretchy")){var s=NodeUtil_js_1$h.default.getForm(a);s&&s[3]&&s[3].stretchy&&NodeUtil_js_1$h.default.setAttribute(a,"stretchy",!1);var l=a.parent;if(!(NodeUtil_js_1$h.default.getTexClass(a)||s&&s[2])){var c=n.nodeFactory.create("node","TeXAtom",[a]);l.replaceChild(c,a),c.inheritAttributesFrom(a)}NodeUtil_js_1$h.default.removeProperties(a,"fixStretchy")}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},t.cleanAttributes=function(t){t.data.root.walkTree((function(t,e){var r,n,o=t.attributes;if(o){var i=new Set((o.get("mjx-keep-attrs")||"").split(/ /));delete o.getAllAttributes()["mjx-keep-attrs"];try{for(var a=__values$C(o.getExplicitNames()),s=a.next();!s.done;s=a.next()){var l=s.value;i.has(l)||o.attributes[l]!==t.attributes.getInherited(l)||delete o.attributes[l]}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}),{})},t.combineRelations=function(t){var n,o,i,a,s=[];try{for(var l=__values$C(t.data.getList("mo")),c=l.next();!c.done;c=l.next()){var u=c.value;if(!u.getProperty("relationsCombined")&&u.parent&&(!u.parent||NodeUtil_js_1$h.default.isType(u.parent,"mrow"))&&NodeUtil_js_1$h.default.getTexClass(u)===MmlNode_js_1$i.TEXCLASS.REL){for(var d=u.parent,p=void 0,m=d.childNodes,h=m.indexOf(u)+1,f=NodeUtil_js_1$h.default.getProperty(u,"variantForm");h<m.length&&(p=m[h])&&NodeUtil_js_1$h.default.isType(p,"mo")&&NodeUtil_js_1$h.default.getTexClass(p)===MmlNode_js_1$i.TEXCLASS.REL;){if(f!==NodeUtil_js_1$h.default.getProperty(p,"variantForm")||!r(u,p)){null==u.attributes.getExplicit("rspace")&&NodeUtil_js_1$h.default.setAttribute(u,"rspace","0pt"),null==p.attributes.getExplicit("lspace")&&NodeUtil_js_1$h.default.setAttribute(p,"lspace","0pt");break}NodeUtil_js_1$h.default.appendChildren(u,NodeUtil_js_1$h.default.getChildren(p)),e(["stretchy","rspace"],u,p);try{for(var _=(i=void 0,__values$C(p.getPropertyNames())),g=_.next();!g.done;g=_.next()){var y=g.value;u.setProperty(y,p.getProperty(y))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}m.splice(h,1),s.push(p),p.parent=null,p.setProperty("relationsCombined",!0)}u.attributes.setInherited("form",u.getForms()[0])}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}t.data.removeFromList("mo",s)};var e=function(t,e,r){var n=e.attributes,o=r.attributes;t.forEach((function(t){var e=o.getExplicit(t);null!=e&&n.set(t,e)}))},r=function(t,e){var r,n,o=function(t,e){return t.getExplicitNames().filter((function(r){return r!==e&&("stretchy"!==r||t.getExplicit("stretchy"))}))},i=t.attributes,a=e.attributes,s=o(i,"lspace"),l=o(a,"rspace");if(s.length!==l.length)return!1;try{for(var c=__values$C(s),u=c.next();!u.done;u=c.next()){var d=u.value;if(i.getExplicit(d)!==a.getExplicit(d))return!1}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return!0},n=function(t,e,r){var n,o,i=[];try{for(var a=__values$C(t.getList("m"+e+r)),s=a.next();!s.done;s=a.next()){var l=s.value,c=l.childNodes;if(!c[l[e]]||!c[l[r]]){var u=l.parent,d=c[l[e]]?t.nodeFactory.create("node","m"+e,[c[l.base],c[l[e]]]):t.nodeFactory.create("node","m"+r,[c[l.base],c[l[r]]]);NodeUtil_js_1$h.default.copyAttributes(l,d),u?u.replaceChild(d,l):t.root=d,i.push(l)}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}t.removeFromList("m"+e+r,i)};t.cleanSubSup=function(t){var e=t.data;e.error||(n(e,"sub","sup"),n(e,"under","over"))};var o=function(t,e,r){var n,o,i=[];try{for(var a=__values$C(t.getList(e)),s=a.next();!s.done;s=a.next()){var l=s.value;if(!l.attributes.get("displaystyle")){var c=l.childNodes[l.base],u=c.coreMO();if(c.getProperty("movablelimits")&&!u.attributes.getExplicit("movablelimits")){var d=t.nodeFactory.create("node",r,l.childNodes);NodeUtil_js_1$h.default.copyAttributes(l,d),l.parent?l.parent.replaceChild(d,l):t.root=d,i.push(l)}}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}t.removeFromList(e,i)};t.moveLimits=function(t){var e=t.data;o(e,"munderover","msubsup"),o(e,"munder","msub"),o(e,"mover","msup")},t.setInherited=function(t){t.data.root.setInheritedAttributes({},t.math.display,0,!1)}}(FilterUtil||(FilterUtil={})),FilterUtil$1.default=FilterUtil;var TexParser$1={},ParseUtil$1={},TexError$1={};Object.defineProperty(TexError$1,"__esModule",{value:!0});var TexError=function(){function t(e,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.id=e,this.message=t.processString(r,n)}return t.processString=function(e,r){for(var n=e.split(t.pattern),o=1,i=n.length;o<i;o+=2){var a=n[o].charAt(0);if(a>="0"&&a<="9")n[o]=r[parseInt(n[o],10)-1],"number"==typeof n[o]&&(n[o]=n[o].toString());else if("{"===a){if((a=n[o].substr(1))>="0"&&a<="9")n[o]=r[parseInt(n[o].substr(1,n[o].length-2),10)-1],"number"==typeof n[o]&&(n[o]=n[o].toString());else n[o].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(n[o]="%"+n[o])}null==n[o]&&(n[o]="???")}return n.join("")},t.pattern=/%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,t}();TexError$1.default=TexError;var __read$L=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$B=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$I=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ParseUtil$1,"__esModule",{value:!0});var MmlNode_js_1$h=MmlNode,NodeUtil_js_1$g=__importDefault$I(NodeUtil$1),TexParser_js_1$a=__importDefault$I(TexParser$1),TexError_js_1$k=__importDefault$I(TexError$1),Entities_js_1$2=Entities$1,ParseUtil;!function(t){var e=7.2,r={em:function(t){return t},ex:function(t){return.43*t},pt:function(t){return t/10},pc:function(t){return 1.2*t},px:function(t){return t*e/72},in:function(t){return t*e},cm:function(t){return t*e/2.54},mm:function(t){return t*e/25.4},mu:function(t){return t/18}},n="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",o="(pt|em|ex|mu|px|mm|cm|in|pc)",i=RegExp("^\\s*"+n+"\\s*"+o+"\\s*$"),a=RegExp("^\\s*"+n+"\\s*"+o+" ?");function s(t,e){void 0===e&&(e=!1);var n=t.match(e?a:i);return n?function(t){var e=__read$L(t,3),n=e[0],o=e[1],i=e[2];if("mu"!==o)return[n,o,i];return[l(r[o](parseFloat(n||"1"))).slice(0,-2),"em",i]}([n[1].replace(/,/,"."),n[4],n[0].length]):[null,null,0]}function l(t){return Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function c(t,e,r){"{"!==e&&"}"!==e||(e="\\"+e);var n="{\\bigg"+r+" "+e+"}",o="{\\big"+r+" "+e+"}";return new TexParser_js_1$a.default("\\mathchoice"+n+o+o+o,{},t).mml()}function u(t,e,r){e=e.replace(/^\s+/,Entities_js_1$2.entities.nbsp).replace(/\s+$/,Entities_js_1$2.entities.nbsp);var n=t.create("text",e);return t.create("node","mtext",[],r,n)}function d(t,e,r){if(r.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+r.length>t.configuration.options.maxBuffer)throw new TexError_js_1$k.default("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+r}function p(t,e){for(;e>0;)t=t.trim().slice(1,-1),e--;return t.trim()}function m(t,e){for(var r=t.length,n=0,o="",i=0,a=0,s=!0,l=!1;i<r;){var c=t[i++];switch(c){case" ":break;case"{":s?a++:(l=!1,a>n&&(a=n)),n++;break;case"}":n&&n--,(s||l)&&(a--,l=!0),s=!1;break;default:if(!n&&-1!==e.indexOf(c))return[l?"true":p(o,a),c,t.slice(i)];s=!1,l=!1}o+=c}if(n)throw new TexError_js_1$k.default("ExtraOpenMissingClose","Extra open brace or missing close brace");return[l?"true":p(o,a),"",t.slice(i)]}t.matchDimen=s,t.dimen2em=function(t){var e=__read$L(s(t),2),n=e[0],o=e[1],i=parseFloat(n||"1"),a=r[o];return a?a(i):0},t.Em=l,t.cols=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.map((function(t){return l(t)})).join(" ")},t.fenced=function(t,e,r,n,o,i){void 0===o&&(o=""),void 0===i&&(i="");var a,s=t.nodeFactory,l=s.create("node","mrow",[],{open:e,close:n,texClass:MmlNode_js_1$h.TEXCLASS.INNER});if(o)a=new TexParser_js_1$a.default("\\"+o+"l"+e,t.parser.stack.env,t).mml();else{var c=s.create("text",e);a=s.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:MmlNode_js_1$h.TEXCLASS.OPEN},c)}if(NodeUtil_js_1$g.default.appendChildren(l,[a,r]),o)a=new TexParser_js_1$a.default("\\"+o+"r"+n,t.parser.stack.env,t).mml();else{var u=s.create("text",n);a=s.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:MmlNode_js_1$h.TEXCLASS.CLOSE},u)}return i&&a.attributes.set("mathcolor",i),NodeUtil_js_1$g.default.appendChildren(l,[a]),l},t.fixedFence=function(t,e,r,n){var o=t.nodeFactory.create("node","mrow",[],{open:e,close:n,texClass:MmlNode_js_1$h.TEXCLASS.ORD});return e&&NodeUtil_js_1$g.default.appendChildren(o,[c(t,e,"l")]),NodeUtil_js_1$g.default.isType(r,"mrow")?NodeUtil_js_1$g.default.appendChildren(o,NodeUtil_js_1$g.default.getChildren(r)):NodeUtil_js_1$g.default.appendChildren(o,[r]),n&&NodeUtil_js_1$g.default.appendChildren(o,[c(t,n,"r")]),o},t.mathPalette=c,t.fixInitialMO=function(t,e){for(var r=0,n=e.length;r<n;r++){var o=e[r];if(o&&!NodeUtil_js_1$g.default.isType(o,"mspace")&&(!NodeUtil_js_1$g.default.isType(o,"TeXAtom")||NodeUtil_js_1$g.default.getChildren(o)[0]&&NodeUtil_js_1$g.default.getChildren(NodeUtil_js_1$g.default.getChildren(o)[0]).length)){if(NodeUtil_js_1$g.default.isEmbellished(o)||NodeUtil_js_1$g.default.isType(o,"TeXAtom")&&NodeUtil_js_1$g.default.getTexClass(o)===MmlNode_js_1$h.TEXCLASS.REL){var i=t.nodeFactory.create("node","mi");e.unshift(i)}break}}},t.internalMath=function(t,e,r,n){if(t.configuration.options.internalMath)return t.configuration.options.internalMath(t,e,r,n);var o,i,a=n||t.stack.env.font,s=a?{mathvariant:a}:{},l=[],c=0,d=0,p="",m=0;if(e.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)){for(;c<e.length;)if("$"===(o=e.charAt(c++)))"$"===p&&0===m?(i=t.create("node","TeXAtom",[new TexParser_js_1$a.default(e.slice(d,c-1),{},t.configuration).mml()]),l.push(i),p="",d=c):""===p&&(d<c-1&&l.push(u(t,e.slice(d,c-1),s)),p="$",d=c);else if("{"===o&&""!==p)m++;else if("}"===o)if("}"===p&&0===m){var h=new TexParser_js_1$a.default(e.slice(d,c),{},t.configuration).mml();i=t.create("node","TeXAtom",[h],s),l.push(i),p="",d=c}else""!==p&&m&&m--;else if("\\"===o)if(""===p&&e.substr(c).match(/^(eq)?ref\s*\{/)){var f=RegExp["$&"].length;d<c-1&&l.push(u(t,e.slice(d,c-1),s)),p="}",d=c-1,c+=f}else"("===(o=e.charAt(c++))&&""===p?(d<c-2&&l.push(u(t,e.slice(d,c-2),s)),p=")",d=c):")"===o&&")"===p&&0===m?(i=t.create("node","TeXAtom",[new TexParser_js_1$a.default(e.slice(d,c-2),{},t.configuration).mml()]),l.push(i),p="",d=c):o.match(/[${}\\]/)&&""===p&&(c--,e=e.substr(0,c-1)+e.substr(c));if(""!==p)throw new TexError_js_1$k.default("MathNotTerminated","Math not terminated in text box")}return d<e.length&&l.push(u(t,e.slice(d),s)),null!=r?l=[t.create("node","mstyle",l,{displaystyle:!1,scriptlevel:r})]:l.length>1&&(l=[t.create("node","mrow",l)]),l},t.internalText=u,t.underOver=function(e,r,n,o,i){if(t.checkMovableLimits(r),NodeUtil_js_1$g.default.isType(r,"munderover")&&NodeUtil_js_1$g.default.isEmbellished(r)){NodeUtil_js_1$g.default.setProperties(NodeUtil_js_1$g.default.getCoreMO(r),{lspace:0,rspace:0});var a=e.create("node","mo",[],{rspace:0});r=e.create("node","mrow",[a,r])}var s=e.create("node","munderover",[r]);NodeUtil_js_1$g.default.setChild(s,"over"===o?s.over:s.under,n);var l=s;return i&&(l=e.create("node","TeXAtom",[s],{texClass:MmlNode_js_1$h.TEXCLASS.OP,movesupsub:!0})),NodeUtil_js_1$g.default.setProperty(l,"subsupOK",!0),l},t.checkMovableLimits=function(t){var e=NodeUtil_js_1$g.default.isType(t,"mo")?NodeUtil_js_1$g.default.getForm(t):null;(NodeUtil_js_1$g.default.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&NodeUtil_js_1$g.default.setProperties(t,{movablelimits:!1})},t.trimSpaces=function(t){if("string"!=typeof t)return t;var e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e},t.setArrayAlign=function(e,r){return"t"===(r=t.trimSpaces(r||""))?e.arraydef.align="baseline 1":"b"===r?e.arraydef.align="baseline -1":"c"===r?e.arraydef.align="axis":r&&(e.arraydef.align=r),e},t.substituteArgs=function(t,e,r){for(var n="",o="",i=0;i<r.length;){var a=r.charAt(i++);if("\\"===a)n+=a+r.charAt(i++);else if("#"===a)if("#"===(a=r.charAt(i++)))n+=a;else{if(!a.match(/[1-9]/)||parseInt(a,10)>e.length)throw new TexError_js_1$k.default("IllegalMacroParam","Illegal macro parameter reference");o=d(t,d(t,o,n),e[parseInt(a,10)-1]),n=""}else n+=a}return d(t,o,n)},t.addArgs=d,t.checkMaxMacros=function(t,e){if(void 0===e&&(e=!0),!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new TexError_js_1$k.default("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new TexError_js_1$k.default("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},t.checkEqnEnv=function(t){if(t.stack.global.eqnenv)throw new TexError_js_1$k.default("ErroneousNestingEq","Erroneous nesting of equation structures");t.stack.global.eqnenv=!0},t.copyNode=function(t,e){var r=t.copy(),n=e.configuration;return r.walkTree((function(t){var e,r;n.addNode(t.kind,t);var o=(t.getProperty("in-lists")||"").split(/,/);try{for(var i=__values$B(o),a=i.next();!a.done;a=i.next()){var s=a.value;s&&n.addNode(s,t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}})),r},t.MmlFilterAttribute=function(t,e,r){return r},t.getFontDef=function(t){var e=t.stack.env.font;return e?{mathvariant:e}:{}},t.keyvalOptions=function(t,e,r){var n,o;void 0===e&&(e=null),void 0===r&&(r=!1);var i=function(t){var e,r,n,o,i,a={},s=t;for(;s;)o=(e=__read$L(m(s,["=",","]),3))[0],n=e[1],s=e[2],"="===n?(i=(r=__read$L(m(s,[","]),3))[0],n=r[1],s=r[2],i="false"===i||"true"===i?JSON.parse(i):i,a[o]=i):o&&(a[o]=!0);return a}(t);if(e)try{for(var a=__values$B(Object.keys(i)),s=a.next();!s.done;s=a.next()){var l=s.value;if(!e.hasOwnProperty(l)){if(r)throw new TexError_js_1$k.default("InvalidOption","Invalid option: %1",l);delete i[l]}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}(ParseUtil||(ParseUtil={})),ParseUtil$1.default=ParseUtil;var Stack$1={},__values$A=commonjsGlobal&&commonjsGlobal.__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.")},__read$K=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$q=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$H=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Stack$1,"__esModule",{value:!0});var NodeUtil_js_1$f=__importDefault$H(NodeUtil$1),Stack=function(){function t(t,e,r){this._factory=t,this._env=e,this.global={},this.stack=[],this.global={isInner:r},this.stack=[this._factory.create("start",this.global)],e&&(this.stack[0].env=e),this.env=this.stack[0].env}return Object.defineProperty(t.prototype,"env",{get:function(){return this._env},set:function(t){this._env=t},enumerable:!1,configurable:!0}),t.prototype.Push=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var o=__values$A(r),i=o.next();!i.done;i=o.next()){var a=i.value;if(a){var s=NodeUtil_js_1$f.default.isNode(a)?this._factory.create("mml",a):a;s.global=this.global;var l=__read$K(this.stack.length?this.Top().checkItem(s):[null,!0],2),c=l[0],u=l[1];u&&(c?(this.Pop(),this.Push.apply(this,__spreadArray$q([],__read$K(c),!1))):(this.stack.push(s),s.env?(s.copyEnv&&Object.assign(s.env,this.env),this.env=s.env):s.env=this.env))}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},t.prototype.Pop=function(){var t=this.stack.pop();return t.isOpen||delete t.env,this.env=this.stack.length?this.Top().env:{},t},t.prototype.Top=function(t){return void 0===t&&(t=1),this.stack.length<t?null:this.stack[this.stack.length-t]},t.prototype.Prev=function(t){var e=this.Top();return t?e.First:e.Pop()},t.prototype.toString=function(){return"stack[\n "+this.stack.join("\n ")+"\n]"},t}();Stack$1.default=Stack;var __values$z=commonjsGlobal&&commonjsGlobal.__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.")},__read$J=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$p=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$G=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TexParser$1,"__esModule",{value:!0});var ParseUtil_js_1$f=__importDefault$G(ParseUtil$1),Stack_js_1$1=__importDefault$G(Stack$1),TexError_js_1$j=__importDefault$G(TexError$1),MmlNode_js_1$g=MmlNode,TexParser=function(){function t(t,e,r){var n,o;this._string=t,this.configuration=r,this.macroCount=0,this.i=0,this.currentCS="";var i,a=e.hasOwnProperty("isInner"),s=e.isInner;if(delete e.isInner,e){i={};try{for(var l=__values$z(Object.keys(e)),c=l.next();!c.done;c=l.next()){var u=c.value;i[u]=e[u]}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}}this.configuration.pushParser(this),this.stack=new Stack_js_1$1.default(this.itemFactory,i,!a||s),this.Parse(),this.Push(this.itemFactory.create("stop"))}return Object.defineProperty(t.prototype,"options",{get:function(){return this.configuration.options},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemFactory",{get:function(){return this.configuration.itemFactory},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tags",{get:function(){return this.configuration.tags},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"string",{get:function(){return this._string},set:function(t){this._string=t},enumerable:!1,configurable:!0}),t.prototype.parse=function(t,e){return this.configuration.handlers.get(t).parse(e)},t.prototype.lookup=function(t,e){return this.configuration.handlers.get(t).lookup(e)},t.prototype.contains=function(t,e){return this.configuration.handlers.get(t).contains(e)},t.prototype.toString=function(){var t,e,r="";try{for(var n=__values$z(Array.from(this.configuration.handlers.keys())),o=n.next();!o.done;o=n.next()){var i=o.value;r+=i+": "+this.configuration.handlers.get(i)+"\n"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.Parse=function(){for(var t;this.i<this.string.length;)t=this.getCodePoint(),this.i+=t.length,this.parse("character",[this,t])},t.prototype.Push=function(t){t instanceof MmlNode_js_1$g.AbstractMmlNode&&t.isInferred?this.PushAll(t.childNodes):this.stack.Push(t)},t.prototype.PushAll=function(t){var e,r;try{for(var n=__values$z(t),o=n.next();!o.done;o=n.next()){var i=o.value;this.stack.Push(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.mml=function(){if(!this.stack.Top().isKind("mml"))return null;var t=this.stack.Top().First;return this.configuration.popParser(),t},t.prototype.convertDelimiter=function(t){var e=this.lookup("delimiter",t);return e?e.char:null},t.prototype.getCodePoint=function(){var t=this.string.codePointAt(this.i);return void 0===t?"":String.fromCodePoint(t)},t.prototype.nextIsSpace=function(){return!!this.string.charAt(this.i).match(/\s/)},t.prototype.GetNext=function(){for(;this.nextIsSpace();)this.i++;return this.getCodePoint()},t.prototype.GetCS=function(){var t=this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);return t?(this.i+=t[0].length,t[2]||t[1]):(this.i++," ")},t.prototype.GetArgument=function(t,e){switch(this.GetNext()){case"":if(!e)throw new TexError_js_1$j.default("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!e)throw new TexError_js_1$j.default("ExtraCloseMissingOpen","Extra close brace or missing open brace");return null;case"\\":return this.i++,"\\"+this.GetCS();case"{":for(var r=++this.i,n=1;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"\\":this.i++;break;case"{":n++;break;case"}":if(0==--n)return this.string.slice(r,this.i-1)}throw new TexError_js_1$j.default("MissingCloseBrace","Missing close brace")}var o=this.getCodePoint();return this.i+=o.length,o},t.prototype.GetBrackets=function(t,e){if("["!==this.GetNext())return e;for(var r=++this.i,n=0;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":n++;break;case"\\":this.i++;break;case"}":if(n--<=0)throw new TexError_js_1$j.default("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"]":if(0===n)return this.string.slice(r,this.i-1)}throw new TexError_js_1$j.default("MissingCloseBracket","Could not find closing ']' for argument to %1",this.currentCS)},t.prototype.GetDelimiter=function(t,e){var r=this.GetNext();if(this.i+=r.length,this.i<=this.string.length&&("\\"===r?r+=this.GetCS():"{"===r&&e&&(this.i--,r=this.GetArgument(t).trim()),this.contains("delimiter",r)))return this.convertDelimiter(r);throw new TexError_js_1$j.default("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)},t.prototype.GetDimen=function(t){if("{"===this.GetNext()){var e=this.GetArgument(t),r=__read$J(ParseUtil_js_1$f.default.matchDimen(e),2),n=r[0],o=r[1];if(n)return n+o}else{e=this.string.slice(this.i);var i=__read$J(ParseUtil_js_1$f.default.matchDimen(e,!0),3),a=(n=i[0],o=i[1],i[2]);if(n)return this.i+=a,n+o}throw new TexError_js_1$j.default("MissingDimOrUnits","Missing dimension or its units for %1",this.currentCS)},t.prototype.GetUpTo=function(t,e){for(;this.nextIsSpace();)this.i++;for(var r=this.i,n=0;this.i<this.string.length;){var o=this.i,i=this.GetNext();switch(this.i+=i.length,i){case"\\":i+=this.GetCS();break;case"{":n++;break;case"}":if(0===n)throw new TexError_js_1$j.default("ExtraCloseLooking","Extra close brace while looking for %1",e);n--}if(0===n&&i===e)return this.string.slice(r,o)}throw new TexError_js_1$j.default("TokenNotFoundForCommand","Could not find %1 for %2",e,this.currentCS)},t.prototype.ParseArg=function(e){return new t(this.GetArgument(e),this.stack.env,this.configuration).mml()},t.prototype.ParseUpTo=function(e,r){return new t(this.GetUpTo(e,r),this.stack.env,this.configuration).mml()},t.prototype.GetDelimiterArg=function(t){var e=ParseUtil_js_1$f.default.trimSpaces(this.GetArgument(t));if(""===e)return null;if(this.contains("delimiter",e))return e;throw new TexError_js_1$j.default("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)},t.prototype.GetStar=function(){var t="*"===this.GetNext();return t&&this.i++,t},t.prototype.create=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(e=this.configuration.nodeFactory).create.apply(e,__spreadArray$p([t],__read$J(r),!1))},t}();TexParser$1.default=TexParser;var ParseOptions$1={},StackItemFactory$1={},StackItem={},__extends$1i=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$I=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$o=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$y=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$F=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(StackItem,"__esModule",{value:!0}),StackItem.BaseItem=StackItem.MmlStack=void 0;var TexError_js_1$i=__importDefault$F(TexError$1),MmlStack=function(){function t(t){this._nodes=t}return Object.defineProperty(t.prototype,"nodes",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),t.prototype.Push=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];(t=this._nodes).push.apply(t,__spreadArray$o([],__read$I(e),!1))},t.prototype.Pop=function(){return this._nodes.pop()},Object.defineProperty(t.prototype,"First",{get:function(){return this._nodes[this.Size()-1]},set:function(t){this._nodes[this.Size()-1]=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Last",{get:function(){return this._nodes[0]},set:function(t){this._nodes[0]=t},enumerable:!1,configurable:!0}),t.prototype.Peek=function(t){return null==t&&(t=1),this._nodes.slice(this.Size()-t)},t.prototype.Size=function(){return this._nodes.length},t.prototype.Clear=function(){this._nodes=[]},t.prototype.toMml=function(t,e){return void 0===t&&(t=!0),1!==this._nodes.length||e?this.create("node",t?"inferredMrow":"mrow",this._nodes,{}):this.First},t.prototype.create=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(e=this.factory.configuration.nodeFactory).create.apply(e,__spreadArray$o([t],__read$I(r),!1))},t}();StackItem.MmlStack=MmlStack;var BaseItem=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=t.call(this,r)||this;return o.factory=e,o.global={},o._properties={},o.isOpen&&(o._env={}),o}return __extends$1i(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"base"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"env",{get:function(){return this._env},set:function(t){this._env=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"copyEnv",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.getProperty=function(t){return this._properties[t]},e.prototype.setProperty=function(t,e){return this._properties[t]=e,this},Object.defineProperty(e.prototype,"isOpen",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFinal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.isKind=function(t){return t===this.kind},e.prototype.checkItem=function(t){if(t.isKind("over")&&this.isOpen&&(t.setProperty("num",this.toMml(!1)),this.Clear()),t.isKind("cell")&&this.isOpen){if(t.getProperty("linebreak"))return e.fail;throw new TexError_js_1$i.default("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){var r=__read$I(this.getErrors(t.kind),2),n=r[0],o=r[1];throw new TexError_js_1$i.default(n,o,t.getName())}return t.isFinal?(this.Push(t.First),e.fail):e.success},e.prototype.clearEnv=function(){var t,e;try{for(var r=__values$y(Object.keys(this.env)),n=r.next();!n.done;n=r.next()){var o=n.value;delete this.env[o]}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.setProperties=function(t){return Object.assign(this._properties,t),this},e.prototype.getName=function(){return this.getProperty("name")},e.prototype.toString=function(){return this.kind+"["+this.nodes.join("; ")+"]"},e.prototype.getErrors=function(t){return(this.constructor.errors||{})[t]||e.errors[t]},e.fail=[null,!1],e.success=[null,!0],e.errors={end:["MissingBeginExtraEnd","Missing \\begin{%1} or extra \\end{%1}"],close:["ExtraCloseMissingOpen","Extra close brace or missing open brace"],right:["MissingLeftExtraRight","Missing \\left or extra \\right"],middle:["ExtraMiddle","Extra \\middle"]},e}(MmlStack);StackItem.BaseItem=BaseItem;var __extends$1h=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_a$a;Object.defineProperty(StackItemFactory$1,"__esModule",{value:!0});var StackItem_js_1$5=StackItem,Factory_js_1$1=Factory,DummyItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1h(e,t),e}(StackItem_js_1$5.BaseItem),StackItemFactory=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultKind="dummy",e.configuration=null,e}return __extends$1h(e,t),e.DefaultStackItems=((_a$a={})[DummyItem.prototype.kind]=DummyItem,_a$a),e}(Factory_js_1$1.AbstractFactory);StackItemFactory$1.default=StackItemFactory;var NodeFactory$1={},__read$H=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$n=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$E=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NodeFactory$1,"__esModule",{value:!0}),NodeFactory$1.NodeFactory=void 0;var NodeUtil_js_1$e=__importDefault$E(NodeUtil$1),NodeFactory=function(){function t(){this.mmlFactory=null,this.factory={node:t.createNode,token:t.createToken,text:t.createText,error:t.createError}}return t.createNode=function(t,e,r,n,o){void 0===r&&(r=[]),void 0===n&&(n={});var i=t.mmlFactory.create(e);return i.setChildren(r),o&&i.appendChild(o),NodeUtil_js_1$e.default.setProperties(i,n),i},t.createToken=function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n="");var o=t.create("text",n);return t.create("node",e,[],r,o)},t.createText=function(t,e){return null==e?null:t.mmlFactory.create("text").setText(e)},t.createError=function(t,e){var r=t.create("text",e),n=t.create("node","mtext",[],{},r);return t.create("node","merror",[n],{"data-mjx-error":e})},t.prototype.setMmlFactory=function(t){this.mmlFactory=t},t.prototype.set=function(t,e){this.factory[t]=e},t.prototype.setCreators=function(t){for(var e in t)this.set(e,t[e])},t.prototype.create=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=this.factory[t]||this.factory.node,o=n.apply(void 0,__spreadArray$n([this,e[0]],__read$H(e.slice(1)),!1));return"node"===t&&this.configuration.addNode(e[0],o),o},t.prototype.get=function(t){return this.factory[t]},t}();NodeFactory$1.NodeFactory=NodeFactory;var __read$G=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$m=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$x=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$D=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ParseOptions$1,"__esModule",{value:!0});var StackItemFactory_js_1=__importDefault$D(StackItemFactory$1),NodeFactory_js_1$1=NodeFactory$1,NodeUtil_js_1$d=__importDefault$D(NodeUtil$1),Options_js_1$9=Options,ParseOptions=function(){function t(t,e){void 0===e&&(e=[]),this.options={},this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new NodeFactory_js_1$1.NodeFactory,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new StackItemFactory_js_1.default(t.items),this.itemFactory.configuration=this,Options_js_1$9.defaultOptions.apply(void 0,__spreadArray$m([this.options],__read$G(e),!1)),(0,Options_js_1$9.defaultOptions)(this.options,t.options)}return t.prototype.pushParser=function(t){this.parsers.unshift(t)},t.prototype.popParser=function(){this.parsers.shift()},Object.defineProperty(t.prototype,"parser",{get:function(){return this.parsers[0]},enumerable:!1,configurable:!0}),t.prototype.clear=function(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()},t.prototype.addNode=function(t,e){var r=this.nodeLists[t];if(r||(r=this.nodeLists[t]=[]),r.push(e),e.kind!==t){var n=NodeUtil_js_1$d.default.getProperty(e,"in-lists")||"",o=(n?n.split(/,/):[]).concat(t).join(",");NodeUtil_js_1$d.default.setProperty(e,"in-lists",o)}},t.prototype.getList=function(t){var e,r,n=this.nodeLists[t]||[],o=[];try{for(var i=__values$x(n),a=i.next();!a.done;a=i.next()){var s=a.value;this.inTree(s)&&o.push(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return this.nodeLists[t]=o,o},t.prototype.removeFromList=function(t,e){var r,n,o=this.nodeLists[t]||[];try{for(var i=__values$x(e),a=i.next();!a.done;a=i.next()){var s=a.value,l=o.indexOf(s);l>=0&&o.splice(l,1)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.inTree=function(t){for(;t&&t!==this.root;)t=t.parent;return!!t},t}();ParseOptions$1.default=ParseOptions;var Tags={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.TagsFactory=t.AllTags=t.NoTags=t.AbstractTags=t.TagInfo=t.Label=void 0;var o=n(TexParser$1),i=function(t,e){void 0===t&&(t="???"),void 0===e&&(e=""),this.tag=t,this.id=e};t.Label=i;var a=function(t,e,r,n,o,i,a,s){void 0===t&&(t=""),void 0===e&&(e=!1),void 0===r&&(r=!1),void 0===n&&(n=null),void 0===o&&(o=""),void 0===i&&(i=""),void 0===a&&(a=!1),void 0===s&&(s=""),this.env=t,this.taggable=e,this.defaultTags=r,this.tag=n,this.tagId=o,this.tagFormat=i,this.noTag=a,this.labelId=s};t.TagInfo=a;var s=function(){function t(){this.counter=0,this.allCounter=0,this.configuration=null,this.ids={},this.allIds={},this.labels={},this.allLabels={},this.redo=!1,this.refUpdate=!1,this.currentTag=new a,this.history=[],this.stack=[],this.enTag=function(t,e){var r=this.configuration.nodeFactory,n=r.create("node","mtd",[t]),o=r.create("node","mlabeledtr",[e,n]);return r.create("node","mtable",[o],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}return t.prototype.start=function(t,e,r){this.currentTag&&this.stack.push(this.currentTag),this.currentTag=new a(t,e,r)},Object.defineProperty(t.prototype,"env",{get:function(){return this.currentTag.env},enumerable:!1,configurable:!0}),t.prototype.end=function(){this.history.push(this.currentTag),this.currentTag=this.stack.pop()},t.prototype.tag=function(t,e){this.currentTag.tag=t,this.currentTag.tagFormat=e?t:this.formatTag(t),this.currentTag.noTag=!1},t.prototype.notag=function(){this.tag("",!0),this.currentTag.noTag=!0},Object.defineProperty(t.prototype,"noTag",{get:function(){return this.currentTag.noTag},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this.currentTag.labelId},set:function(t){this.currentTag.labelId=t},enumerable:!1,configurable:!0}),t.prototype.formatUrl=function(t,e){return e+"#"+encodeURIComponent(t)},t.prototype.formatTag=function(t){return"("+t+")"},t.prototype.formatId=function(t){return"mjx-eqn:"+t.replace(/\s/g,"_")},t.prototype.formatNumber=function(t){return t.toString()},t.prototype.autoTag=function(){null==this.currentTag.tag&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))},t.prototype.clearTag=function(){this.label="",this.tag(null,!0),this.currentTag.tagId=""},t.prototype.getTag=function(t){if(void 0===t&&(t=!1),t)return this.autoTag(),this.makeTag();var e=this.currentTag;return e.taggable&&!e.noTag&&(e.defaultTags&&this.autoTag(),e.tag)?this.makeTag():null},t.prototype.resetTag=function(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()},t.prototype.reset=function(t){void 0===t&&(t=0),this.resetTag(),this.counter=this.allCounter=t,this.allLabels={},this.allIds={}},t.prototype.startEquation=function(t){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new a("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;var e=t.inputData.recompile;e&&(this.refUpdate=!0,this.counter=e.counter)},t.prototype.finishEquation=function(t){this.redo&&(t.inputData.recompile={state:t.state(),counter:this.allCounter}),this.refUpdate||(this.allCounter=this.counter),Object.assign(this.allIds,this.ids),Object.assign(this.allLabels,this.labels)},t.prototype.finalize=function(t,e){if(!e.display||this.currentTag.env||null==this.currentTag.tag)return t;var r=this.makeTag();return this.enTag(t,r)},t.prototype.makeId=function(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)},t.prototype.makeTag=function(){this.makeId(),this.label&&(this.labels[this.label]=new i(this.currentTag.tag,this.currentTag.tagId));var t=new o.default("\\text{"+this.currentTag.tagFormat+"}",{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[t],{id:this.currentTag.tagId})},t}();t.AbstractTags=s;var l=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.autoTag=function(){},r.prototype.getTag=function(){return this.currentTag.tag?t.prototype.getTag.call(this):null},r}(s);t.NoTags=l;var c,u,d,p=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.finalize=function(t,e){if(!e.display||this.history.find((function(t){return t.taggable})))return t;var r=this.getTag(!0);return this.enTag(t,r)},r}(s);t.AllTags=p,c=t.TagsFactory||(t.TagsFactory={}),u=new Map([["none",l],["all",p]]),d="none",c.OPTIONS={tags:d,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1},c.add=function(t,e){u.set(t,e)},c.addTags=function(t){var e,n;try{for(var o=r(Object.keys(t)),i=o.next();!i.done;i=o.next()){var a=i.value;c.add(a,t[a])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},c.create=function(t){var e=u.get(t)||u.get(d);if(!e)throw Error("Unknown tags class");return new e},c.setDefault=function(t){d=t},c.getDefault=function(){return c.create(d)}}(Tags),getDefaultExportFromCjs(Tags);var Configuration={},MapHandler={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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.")},r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.SubHandlers=t.SubHandler=t.MapHandler=void 0;var n,o=PrioritizedList$1,i=FunctionList$1;!function(t){var e=new Map;t.register=function(t){e.set(t.name,t)},t.getMap=function(t){return e.get(t)}}(n=t.MapHandler||(t.MapHandler={}));var a=function(){function t(){this._configuration=new o.PrioritizedList,this._fallback=new i.FunctionList}return t.prototype.add=function(t,r,i){var a,s;void 0===i&&(i=o.PrioritizedList.DEFAULTPRIORITY);try{for(var l=e(t.slice().reverse()),c=l.next();!c.done;c=l.next()){var u=c.value,d=n.getMap(u);if(!d)return void this.warn("Configuration "+u+" not found! Omitted.");this._configuration.add(d,i)}}catch(t){a={error:t}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}r&&this._fallback.add(r,i)},t.prototype.parse=function(t){var n,o;try{for(var i=e(this._configuration),a=i.next();!a.done;a=i.next()){var s=a.value.item.parse(t);if(s)return s}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}var l=r(t,2),c=l[0],u=l[1];Array.from(this._fallback)[0].item(c,u)},t.prototype.lookup=function(t){var e=this.applicable(t);return e?e.lookup(t):null},t.prototype.contains=function(t){return!!this.applicable(t)},t.prototype.toString=function(){var t,r,n=[];try{for(var o=e(this._configuration),i=o.next();!i.done;i=o.next()){var a=i.value.item;n.push(a.name)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n.join(", ")},t.prototype.applicable=function(t){var r,n;try{for(var o=e(this._configuration),i=o.next();!i.done;i=o.next()){var a=i.value.item;if(a.contains(t))return a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null},t.prototype.retrieve=function(t){var r,n;try{for(var o=e(this._configuration),i=o.next();!i.done;i=o.next()){var a=i.value.item;if(a.name===t)return a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null},t.prototype.warn=function(t){console.log("TexParser Warning: "+t)},t}();t.SubHandler=a;var s=function(){function t(){this.map=new Map}return t.prototype.add=function(t,r,n){var i,s;void 0===n&&(n=o.PrioritizedList.DEFAULTPRIORITY);try{for(var l=e(Object.keys(t)),c=l.next();!c.done;c=l.next()){var u=c.value,d=this.get(u);d||(d=new a,this.set(u,d)),d.add(t[u],r[u],n)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}},t.prototype.set=function(t,e){this.map.set(t,e)},t.prototype.get=function(t){return this.map.get(t)},t.prototype.retrieve=function(t){var r,n;try{for(var o=e(this.map.values()),i=o.next();!i.done;i=o.next()){var a=i.value.retrieve(t);if(a)return a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null},t.prototype.keys=function(){return this.map.keys()},t}();t.SubHandlers=s}(MapHandler),getDefaultExportFromCjs(MapHandler),function(t){var e=commonjsGlobal&&commonjsGlobal.__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.")},r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserConfiguration=t.ConfigurationHandler=t.Configuration=void 0;var n,o=Options,i=MapHandler,a=FunctionList$1,s=PrioritizedList$1,l=Tags,c=function(){function t(t,e,r,n,o,i,a,s,l,c,u,d,p){void 0===e&&(e={}),void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i={}),void 0===a&&(a={}),void 0===s&&(s=[]),void 0===l&&(l=[]),void 0===c&&(c=null),void 0===u&&(u=null),this.name=t,this.handler=e,this.fallback=r,this.items=n,this.tags=o,this.options=i,this.nodes=a,this.preprocessors=s,this.postprocessors=l,this.initMethod=c,this.configMethod=u,this.priority=d,this.parser=p,this.handler=Object.assign({character:[],delimiter:[],macro:[],environment:[]},e)}return t.makeProcessor=function(t,e){return Array.isArray(t)?t:[t,e]},t._create=function(e,r){var n=this;void 0===r&&(r={});var o=r.priority||s.PrioritizedList.DEFAULTPRIORITY,i=r.init?this.makeProcessor(r.init,o):null,a=r.config?this.makeProcessor(r.config,o):null,l=(r.preprocessors||[]).map((function(t){return n.makeProcessor(t,o)})),c=(r.postprocessors||[]).map((function(t){return n.makeProcessor(t,o)})),u=r.parser||"tex";return new t(e,r.handler||{},r.fallback||{},r.items||{},r.tags||{},r.options||{},r.nodes||{},l,c,i,a,o,u)},t.create=function(e,r){void 0===r&&(r={});var o=t._create(e,r);return n.set(e,o),o},t.local=function(e){return void 0===e&&(e={}),t._create("",e)},Object.defineProperty(t.prototype,"init",{get:function(){return this.initMethod?this.initMethod[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this.configMethod?this.configMethod[0]:null},enumerable:!1,configurable:!0}),t}();t.Configuration=c,function(t){var e=new Map;t.set=function(t,r){e.set(t,r)},t.get=function(t){return e.get(t)},t.keys=function(){return e.keys()}}(n=t.ConfigurationHandler||(t.ConfigurationHandler={}));var u=function(){function t(t,r){var n,o,l,c;void 0===r&&(r=["tex"]),this.initMethod=new a.FunctionList,this.configMethod=new a.FunctionList,this.configurations=new s.PrioritizedList,this.parsers=[],this.handlers=new i.SubHandlers,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=r;try{for(var u=e(t.slice().reverse()),d=u.next();!d.done;d=u.next()){var p=d.value;this.addPackage(p)}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}try{for(var m=e(this.configurations),h=m.next();!h.done;h=m.next()){var f=h.value,_=f.item,g=f.priority;this.append(_,g)}}catch(t){l={error:t}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}}return t.prototype.init=function(){this.initMethod.execute(this)},t.prototype.config=function(t){var r,n;this.configMethod.execute(this,t);try{for(var o=e(this.configurations),i=o.next();!i.done;i=o.next()){var a=i.value;this.addFilters(t,a.item)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.addPackage=function(t){var e="string"==typeof t?t:t[0],r=this.getPackage(e);r&&this.configurations.add(r,"string"==typeof t?r.priority:t[1])},t.prototype.add=function(t,r,n){var i,a;void 0===n&&(n={});var s=this.getPackage(t);this.append(s),this.configurations.add(s,s.priority),this.init();var c=r.parseOptions;c.nodeFactory.setCreators(s.nodes);try{for(var u=e(Object.keys(s.items)),d=u.next();!d.done;d=u.next()){var p=d.value;c.itemFactory.setNodeClass(p,s.items[p])}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}l.TagsFactory.addTags(s.tags),(0,o.defaultOptions)(c.options,s.options),(0,o.userOptions)(c.options,n),this.addFilters(r,s),s.config&&s.config(this,r)},t.prototype.getPackage=function(t){var e=n.get(t);if(e&&this.parsers.indexOf(e.parser)<0)throw Error("Package ".concat(t," doesn't target the proper parser"));return e},t.prototype.append=function(t,e){e=e||t.priority,t.initMethod&&this.initMethod.add(t.initMethod[0],t.initMethod[1]),t.configMethod&&this.configMethod.add(t.configMethod[0],t.configMethod[1]),this.handlers.add(t.handler,t.fallback,e),Object.assign(this.items,t.items),Object.assign(this.tags,t.tags),(0,o.defaultOptions)(this.options,t.options),Object.assign(this.nodes,t.nodes)},t.prototype.addFilters=function(t,n){var o,i,a,s;try{for(var l=e(n.preprocessors),c=l.next();!c.done;c=l.next()){var u=r(c.value,2),d=u[0],p=u[1];t.preFilters.add(d,p)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}try{for(var m=e(n.postprocessors),h=m.next();!h.done;h=m.next()){var f=r(h.value,2),_=f[0];p=f[1];t.postFilters.add(_,p)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}},t}();t.ParserConfiguration=u}(Configuration),getDefaultExportFromCjs(Configuration);var BaseConfiguration={},SymbolMap={},_Symbol={};Object.defineProperty(_Symbol,"__esModule",{value:!0}),_Symbol.Macro=_Symbol.Symbol=void 0;var Symbol$1=function(){function t(t,e,r){this._symbol=t,this._char=e,this._attributes=r}return Object.defineProperty(t.prototype,"symbol",{get:function(){return this._symbol},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"char",{get:function(){return this._char},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),t}();_Symbol.Symbol=Symbol$1;var Macro=function(){function t(t,e,r){void 0===r&&(r=[]),this._symbol=t,this._func=e,this._args=r}return Object.defineProperty(t.prototype,"symbol",{get:function(){return this._symbol},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"func",{get:function(){return this._func},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!1,configurable:!0}),t}();_Symbol.Macro=Macro;var __extends$1g=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$F=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$w=commonjsGlobal&&commonjsGlobal.__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.")},__spreadArray$l=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(SymbolMap,"__esModule",{value:!0}),SymbolMap.EnvironmentMap=SymbolMap.CommandMap=SymbolMap.MacroMap=SymbolMap.DelimiterMap=SymbolMap.CharacterMap=SymbolMap.AbstractParseMap=SymbolMap.RegExpMap=SymbolMap.AbstractSymbolMap=SymbolMap.parseResult=void 0;var Symbol_js_1$3=_Symbol,MapHandler_js_1$2=MapHandler;function parseResult(t){return void 0===t||t}SymbolMap.parseResult=parseResult;var AbstractSymbolMap=function(){function t(t,e){this._name=t,this._parser=e,MapHandler_js_1$2.MapHandler.register(this)}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t.prototype.parserFor=function(t){return this.contains(t)?this.parser:null},t.prototype.parse=function(t){var e=__read$F(t,2),r=e[0],n=e[1],o=this.parserFor(n),i=this.lookup(n);return o&&i?parseResult(o(r,i)):null},Object.defineProperty(t.prototype,"parser",{get:function(){return this._parser},set:function(t){this._parser=t},enumerable:!1,configurable:!0}),t}();SymbolMap.AbstractSymbolMap=AbstractSymbolMap;var RegExpMap=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o._regExp=n,o}return __extends$1g(e,t),e.prototype.contains=function(t){return this._regExp.test(t)},e.prototype.lookup=function(t){return this.contains(t)?t:null},e}(AbstractSymbolMap);SymbolMap.RegExpMap=RegExpMap;var AbstractParseMap=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.map=new Map,e}return __extends$1g(e,t),e.prototype.lookup=function(t){return this.map.get(t)},e.prototype.contains=function(t){return this.map.has(t)},e.prototype.add=function(t,e){this.map.set(t,e)},e.prototype.remove=function(t){this.map.delete(t)},e}(AbstractSymbolMap);SymbolMap.AbstractParseMap=AbstractParseMap;var CharacterMap=function(t){function e(e,r,n){var o,i,a=t.call(this,e,r)||this;try{for(var s=__values$w(Object.keys(n)),l=s.next();!l.done;l=s.next()){var c=l.value,u=n[c],d=__read$F("string"==typeof u?[u,null]:u,2),p=d[0],m=d[1],h=new Symbol_js_1$3.Symbol(c,p,m);a.add(c,h)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a}return __extends$1g(e,t),e}(AbstractParseMap);SymbolMap.CharacterMap=CharacterMap;var DelimiterMap=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1g(e,t),e.prototype.parse=function(e){var r=__read$F(e,2),n=r[0],o=r[1];return t.prototype.parse.call(this,[n,"\\"+o])},e}(CharacterMap);SymbolMap.DelimiterMap=DelimiterMap;var MacroMap=function(t){function e(e,r,n){var o,i,a=t.call(this,e,null)||this;try{for(var s=__values$w(Object.keys(r)),l=s.next();!l.done;l=s.next()){var c=l.value,u=r[c],d=__read$F("string"==typeof u?[u]:u),p=d[0],m=d.slice(1),h=new Symbol_js_1$3.Macro(c,n[p],m);a.add(c,h)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a}return __extends$1g(e,t),e.prototype.parserFor=function(t){var e=this.lookup(t);return e?e.func:null},e.prototype.parse=function(t){var e=__read$F(t,2),r=e[0],n=e[1],o=this.lookup(n),i=this.parserFor(n);return o&&i?parseResult(i.apply(void 0,__spreadArray$l([r,o.symbol],__read$F(o.args),!1))):null},e}(AbstractParseMap);SymbolMap.MacroMap=MacroMap;var CommandMap=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1g(e,t),e.prototype.parse=function(t){var e=__read$F(t,2),r=e[0],n=e[1],o=this.lookup(n),i=this.parserFor(n);if(!o||!i)return null;var a=r.currentCS;r.currentCS="\\"+n;var s=i.apply(void 0,__spreadArray$l([r,"\\"+o.symbol],__read$F(o.args),!1));return r.currentCS=a,parseResult(s)},e}(MacroMap);SymbolMap.CommandMap=CommandMap;var EnvironmentMap=function(t){function e(e,r,n,o){var i=t.call(this,e,n,o)||this;return i.parser=r,i}return __extends$1g(e,t),e.prototype.parse=function(t){var e=__read$F(t,2),r=e[0],n=e[1],o=this.lookup(n),i=this.parserFor(n);return o&&i?parseResult(this.parser(r,o.symbol,i,o.args)):null},e}(MacroMap);SymbolMap.EnvironmentMap=EnvironmentMap;var BaseItems={},__extends$1f=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$E=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$k=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$C=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BaseItems,"__esModule",{value:!0}),BaseItems.EquationItem=BaseItems.EqnArrayItem=BaseItems.ArrayItem=BaseItems.DotsItem=BaseItems.NonscriptItem=BaseItems.NotItem=BaseItems.FnItem=BaseItems.MmlItem=BaseItems.CellItem=BaseItems.PositionItem=BaseItems.StyleItem=BaseItems.EndItem=BaseItems.BeginItem=BaseItems.RightItem=BaseItems.Middle=BaseItems.LeftItem=BaseItems.OverItem=BaseItems.SubsupItem=BaseItems.PrimeItem=BaseItems.CloseItem=BaseItems.OpenItem=BaseItems.StopItem=BaseItems.StartItem=void 0;var MapHandler_js_1$1=MapHandler,Entities_js_1$1=Entities$1,MmlNode_js_1$f=MmlNode,TexError_js_1$h=__importDefault$C(TexError$1),ParseUtil_js_1$e=__importDefault$C(ParseUtil$1),NodeUtil_js_1$c=__importDefault$C(NodeUtil$1),StackItem_js_1$4=StackItem,StartItem=function(t){function e(e,r){var n=t.call(this,e)||this;return n.global=r,n}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"start"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("stop")){var r=this.toMml();return this.global.isInner||(r=this.factory.configuration.tags.finalize(r,this.env)),[[this.factory.create("mml",r)],!0]}return t.prototype.checkItem.call(this,e)},e}(StackItem_js_1$4.BaseItem);BaseItems.StartItem=StartItem;var StopItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"stop"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.StopItem=StopItem;var OpenItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"open"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("close")){var r=this.toMml(),n=this.create("node","TeXAtom",[r]);return[[this.factory.create("mml",n)],!0]}return t.prototype.checkItem.call(this,e)},e.errors=Object.assign(Object.create(StackItem_js_1$4.BaseItem.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]}),e}(StackItem_js_1$4.BaseItem);BaseItems.OpenItem=OpenItem;var CloseItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"close"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.CloseItem=CloseItem;var PrimeItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"prime"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(t){var e=__read$E(this.Peek(2),2),r=e[0],n=e[1];return!NodeUtil_js_1$c.default.isType(r,"msubsup")||NodeUtil_js_1$c.default.isType(r,"msup")?[[this.create("node","msup",[r,n]),t],!0]:(NodeUtil_js_1$c.default.setChild(r,r.sup,n),[[r,t],!0])},e}(StackItem_js_1$4.BaseItem);BaseItems.PrimeItem=PrimeItem;var SubsupItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"subsup"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("open")||e.isKind("left"))return StackItem_js_1$4.BaseItem.success;var r=this.First,n=this.getProperty("position");if(e.isKind("mml")){if(this.getProperty("primes"))if(2!==n)NodeUtil_js_1$c.default.setChild(r,2,this.getProperty("primes"));else{NodeUtil_js_1$c.default.setProperty(this.getProperty("primes"),"variantForm",!0);var o=this.create("node","mrow",[this.getProperty("primes"),e.First]);e.First=o}return NodeUtil_js_1$c.default.setChild(r,n,e.First),null!=this.getProperty("movesupsub")&&NodeUtil_js_1$c.default.setProperty(r,"movesupsub",this.getProperty("movesupsub")),[[this.factory.create("mml",r)],!0]}if(t.prototype.checkItem.call(this,e)[1]){var i=this.getErrors(["","sub","sup"][n]);throw new(TexError_js_1$h.default.bind.apply(TexError_js_1$h.default,__spreadArray$k([void 0,i[0],i[1]],__read$E(i.splice(2)),!1)))}return null},e.errors=Object.assign(Object.create(StackItem_js_1$4.BaseItem.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]}),e}(StackItem_js_1$4.BaseItem);BaseItems.SubsupItem=SubsupItem;var OverItem=function(t){function e(e){var r=t.call(this,e)||this;return r.setProperty("name","\\over"),r}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"over"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("over"))throw new TexError_js_1$h.default("AmbiguousUseOf","Ambiguous use of %1",e.getName());if(e.isClose){var r=this.create("node","mfrac",[this.getProperty("num"),this.toMml(!1)]);return null!=this.getProperty("thickness")&&NodeUtil_js_1$c.default.setAttribute(r,"linethickness",this.getProperty("thickness")),(this.getProperty("open")||this.getProperty("close"))&&(NodeUtil_js_1$c.default.setProperty(r,"withDelims",!0),r=ParseUtil_js_1$e.default.fixedFence(this.factory.configuration,this.getProperty("open"),r,this.getProperty("close"))),[[this.factory.create("mml",r),e],!0]}return t.prototype.checkItem.call(this,e)},e.prototype.toString=function(){return"over["+this.getProperty("num")+" / "+this.nodes.join("; ")+"]"},e}(StackItem_js_1$4.BaseItem);BaseItems.OverItem=OverItem;var LeftItem=function(t){function e(e,r){var n=t.call(this,e)||this;return n.setProperty("delim",r),n}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"left"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("right"))return[[this.factory.create("mml",ParseUtil_js_1$e.default.fenced(this.factory.configuration,this.getProperty("delim"),this.toMml(),e.getProperty("delim"),"",e.getProperty("color")))],!0];if(e.isKind("middle")){var r={stretchy:!0};return e.getProperty("color")&&(r.mathcolor=e.getProperty("color")),this.Push(this.create("node","TeXAtom",[],{texClass:MmlNode_js_1$f.TEXCLASS.CLOSE}),this.create("token","mo",r,e.getProperty("delim")),this.create("node","TeXAtom",[],{texClass:MmlNode_js_1$f.TEXCLASS.OPEN})),this.env={},[[this],!0]}return t.prototype.checkItem.call(this,e)},e.errors=Object.assign(Object.create(StackItem_js_1$4.BaseItem.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]}),e}(StackItem_js_1$4.BaseItem);BaseItems.LeftItem=LeftItem;var Middle=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.setProperty("delim",r),n&&o.setProperty("color",n),o}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"middle"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.Middle=Middle;var RightItem=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.setProperty("delim",r),n&&o.setProperty("color",n),o}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"right"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.RightItem=RightItem;var BeginItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"begin"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("end")){if(e.getName()!==this.getName())throw new TexError_js_1$h.default("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),e.getName());return this.getProperty("end")?StackItem_js_1$4.BaseItem.fail:[[this.factory.create("mml",this.toMml())],!0]}if(e.isKind("stop"))throw new TexError_js_1$h.default("EnvMissingEnd","Missing \\end{%1}",this.getName());return t.prototype.checkItem.call(this,e)},e}(StackItem_js_1$4.BaseItem);BaseItems.BeginItem=BeginItem;var EndItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"end"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.EndItem=EndItem;var StyleItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"style"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(!e.isClose)return t.prototype.checkItem.call(this,e);var r=this.create("node","mstyle",this.nodes,this.getProperty("styles"));return[[this.factory.create("mml",r),e],!0]},e}(StackItem_js_1$4.BaseItem);BaseItems.StyleItem=StyleItem;var PositionItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"position"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isClose)throw new TexError_js_1$h.default("MissingBoxFor","Missing box for %1",this.getName());if(e.isFinal){var r=e.toMml();switch(this.getProperty("move")){case"vertical":return r=this.create("node","mpadded",[r],{height:this.getProperty("dh"),depth:this.getProperty("dd"),voffset:this.getProperty("dh")}),[[this.factory.create("mml",r)],!0];case"horizontal":return[[this.factory.create("mml",this.getProperty("left")),e,this.factory.create("mml",this.getProperty("right"))],!0]}}return t.prototype.checkItem.call(this,e)},e}(StackItem_js_1$4.BaseItem);BaseItems.PositionItem=PositionItem;var CellItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"cell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClose",{get:function(){return!0},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.CellItem=CellItem;var MmlItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"isFinal",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return"mml"},enumerable:!1,configurable:!0}),e}(StackItem_js_1$4.BaseItem);BaseItems.MmlItem=MmlItem;var FnItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"fn"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){var r=this.First;if(r){if(e.isOpen)return StackItem_js_1$4.BaseItem.success;if(!e.isKind("fn")){var n=e.First;if(!e.isKind("mml")||!n)return[[r,e],!0];if(NodeUtil_js_1$c.default.isType(n,"mstyle")&&n.childNodes.length&&NodeUtil_js_1$c.default.isType(n.childNodes[0].childNodes[0],"mspace")||NodeUtil_js_1$c.default.isType(n,"mspace"))return[[r,e],!0];NodeUtil_js_1$c.default.isEmbellished(n)&&(n=NodeUtil_js_1$c.default.getCoreMO(n));var o=NodeUtil_js_1$c.default.getForm(n);if(null!=o&&[0,0,1,1,0,1,1,0,0,0][o[2]])return[[r,e],!0]}var i=this.create("token","mo",{texClass:MmlNode_js_1$f.TEXCLASS.NONE},Entities_js_1$1.entities.ApplyFunction);return[[r,i,e],!0]}return t.prototype.checkItem.apply(this,arguments)},e}(StackItem_js_1$4.BaseItem);BaseItems.FnItem=FnItem;var NotItem=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remap=MapHandler_js_1$1.MapHandler.getMap("not_remap"),e}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"not"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(t){var e,r,n;if(t.isKind("open")||t.isKind("left"))return StackItem_js_1$4.BaseItem.success;if(t.isKind("mml")&&(NodeUtil_js_1$c.default.isType(t.First,"mo")||NodeUtil_js_1$c.default.isType(t.First,"mi")||NodeUtil_js_1$c.default.isType(t.First,"mtext"))&&(e=t.First,1===(r=NodeUtil_js_1$c.default.getText(e)).length&&!NodeUtil_js_1$c.default.getProperty(e,"movesupsub")&&1===NodeUtil_js_1$c.default.getChildren(e).length))return this.remap.contains(r)?(n=this.create("text",this.remap.lookup(r).char),NodeUtil_js_1$c.default.setChild(e,0,n)):(n=this.create("text","̸"),NodeUtil_js_1$c.default.appendChildren(e,[n])),[[t],!0];n=this.create("text","⧸");var o=this.create("node","mtext",[],{},n),i=this.create("node","mpadded",[o],{width:0});return[[e=this.create("node","TeXAtom",[i],{texClass:MmlNode_js_1$f.TEXCLASS.REL}),t],!0]},e}(StackItem_js_1$4.BaseItem);BaseItems.NotItem=NotItem;var NonscriptItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"nonscript"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(t){if(t.isKind("mml")&&1===t.Size()){var e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=NodeUtil_js_1$c.default.getChildren(NodeUtil_js_1$c.default.getChildren(e)[0])[0]),e.isKind("mspace")){if(e!==t.First){var r=this.create("node","mrow",[t.Pop()]);t.Push(r)}this.factory.configuration.addNode("nonscript",t.First)}}return[[t],!0]},e}(StackItem_js_1$4.BaseItem);BaseItems.NonscriptItem=NonscriptItem;var DotsItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"dots"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(t){if(t.isKind("open")||t.isKind("left"))return StackItem_js_1$4.BaseItem.success;var e=this.getProperty("ldots"),r=t.First;if(t.isKind("mml")&&NodeUtil_js_1$c.default.isEmbellished(r)){var n=NodeUtil_js_1$c.default.getTexClass(NodeUtil_js_1$c.default.getCoreMO(r));n!==MmlNode_js_1$f.TEXCLASS.BIN&&n!==MmlNode_js_1$f.TEXCLASS.REL||(e=this.getProperty("cdots"))}return[[e,t],!0]},e}(StackItem_js_1$4.BaseItem);BaseItems.DotsItem=DotsItem;var ArrayItem=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.table=[],e.row=[],e.frame=[],e.hfill=[],e.arraydef={},e.dashed=!1,e}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"array"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"copyEnv",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isClose&&!e.isKind("over")){if(e.getProperty("isEntry"))return this.EndEntry(),this.clearEnv(),StackItem_js_1$4.BaseItem.fail;if(e.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),StackItem_js_1$4.BaseItem.fail;this.EndTable(),this.clearEnv();var r=this.factory.create("mml",this.createMml());if(this.getProperty("requireClose")){if(e.isKind("close"))return[[r],!0];throw new TexError_js_1$h.default("MissingCloseBrace","Missing close brace")}return[[r,e],!0]}return t.prototype.checkItem.call(this,e)},e.prototype.createMml=function(){var t=this.arraydef.scriptlevel;delete this.arraydef.scriptlevel;var e=this.create("node","mtable",this.table,this.arraydef);return t&&e.setProperty("scriptlevel",t),4===this.frame.length?NodeUtil_js_1$c.default.setAttribute(e,"frame",this.dashed?"dashed":"solid"):this.frame.length&&(this.arraydef.rowlines&&(this.arraydef.rowlines=this.arraydef.rowlines.replace(/none( none)+$/,"none")),NodeUtil_js_1$c.default.setAttribute(e,"frame",""),e=this.create("node","menclose",[e],{notation:this.frame.join(" ")}),"none"===(this.arraydef.columnlines||"none")&&"none"===(this.arraydef.rowlines||"none")||NodeUtil_js_1$c.default.setAttribute(e,"data-padding",0)),(this.getProperty("open")||this.getProperty("close"))&&(e=ParseUtil_js_1$e.default.fenced(this.factory.configuration,this.getProperty("open"),e,this.getProperty("close"))),e},e.prototype.EndEntry=function(){var t=this.create("node","mtd",this.nodes);this.hfill.length&&(0===this.hfill[0]&&NodeUtil_js_1$c.default.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&NodeUtil_js_1$c.default.setAttribute(t,"columnalign",NodeUtil_js_1$c.default.getAttribute(t,"columnalign")?"center":"left")),this.row.push(t),this.Clear(),this.hfill=[]},e.prototype.EndRow=function(){var t;this.getProperty("isNumbered")&&3===this.row.length?(this.row.unshift(this.row.pop()),t=this.create("node","mlabeledtr",this.row)):t=this.create("node","mtr",this.row),this.table.push(t),this.row=[]},e.prototype.EndTable=function(){(this.Size()||this.row.length)&&(this.EndEntry(),this.EndRow()),this.checkLines()},e.prototype.checkLines=function(){if(this.arraydef.rowlines){var t=this.arraydef.rowlines.split(/ /);t.length===this.table.length?(this.frame.push("bottom"),t.pop(),this.arraydef.rowlines=t.join(" ")):t.length<this.table.length-1&&(this.arraydef.rowlines+=" none")}if(this.getProperty("rowspacing")){for(var e=this.arraydef.rowspacing.split(/ /);e.length<this.table.length;)e.push(this.getProperty("rowspacing")+"em");this.arraydef.rowspacing=e.join(" ")}},e.prototype.addRowSpacing=function(t){if(this.arraydef.rowspacing){var e=this.arraydef.rowspacing.split(/ /);if(!this.getProperty("rowspacing")){var r=ParseUtil_js_1$e.default.dimen2em(e[0]);this.setProperty("rowspacing",r)}for(var n=this.getProperty("rowspacing");e.length<this.table.length;)e.push(ParseUtil_js_1$e.default.Em(n));e[this.table.length-1]=ParseUtil_js_1$e.default.Em(Math.max(0,n+ParseUtil_js_1$e.default.dimen2em(t))),this.arraydef.rowspacing=e.join(" ")}},e}(StackItem_js_1$4.BaseItem);BaseItems.ArrayItem=ArrayItem;var EqnArrayItem=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=t.call(this,e)||this;return o.maxrow=0,o.factory.configuration.tags.start(r[0],r[2],r[1]),o}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"eqnarray"},enumerable:!1,configurable:!0}),e.prototype.EndEntry=function(){this.row.length&&ParseUtil_js_1$e.default.fixInitialMO(this.factory.configuration,this.nodes);var t=this.create("node","mtd",this.nodes);this.row.push(t),this.Clear()},e.prototype.EndRow=function(){this.row.length>this.maxrow&&(this.maxrow=this.row.length);var t="mtr",e=this.factory.configuration.tags.getTag();e&&(this.row=[e].concat(this.row),t="mlabeledtr"),this.factory.configuration.tags.clearTag();var r=this.create("node",t,this.row);this.table.push(r),this.row=[]},e.prototype.EndTable=function(){t.prototype.EndTable.call(this),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1)},e.prototype.extendArray=function(t,e){if(this.arraydef[t]){var r=this.arraydef[t].split(/ /),n=__spreadArray$k([],__read$E(r),!1);if(n.length>1){for(;n.length<e;)n.push.apply(n,__spreadArray$k([],__read$E(r),!1));this.arraydef[t]=n.slice(0,e).join(" ")}}},e}(ArrayItem);BaseItems.EqnArrayItem=EqnArrayItem;var EquationItem=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=t.call(this,e)||this;return o.factory.configuration.tags.start("equation",!0,r[0]),o}return __extends$1f(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"equation"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("end")){var r=this.toMml(),n=this.factory.configuration.tags.getTag();return this.factory.configuration.tags.end(),[[n?this.factory.configuration.tags.enTag(r,n):r,e],!0]}if(e.isKind("stop"))throw new TexError_js_1$h.default("EnvMissingEnd","Missing \\end{%1}",this.getName());return t.prototype.checkItem.call(this,e)},e}(StackItem_js_1$4.BaseItem);BaseItems.EquationItem=EquationItem;var BaseMappings={},TexConstants={};!function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.TexConstant=void 0,(e=t.TexConstant||(t.TexConstant={})).Variant={NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALLIGRAPHIC:"-tex-calligraphic",BOLDCALLIGRAPHIC:"-tex-bold-calligraphic",OLDSTYLE:"-tex-oldstyle",BOLDOLDSTYLE:"-tex-bold-oldstyle",MATHITALIC:"-tex-mathit"},e.Form={PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},e.LineBreak={AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},e.LineBreakStyle={BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},e.IndentAlign={LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},e.IndentShift={INDENTSHIFT:"indentshift"},e.LineThickness={THIN:"thin",MEDIUM:"medium",THICK:"thick"},e.Notation={LONGDIV:"longdiv",ACTUARIAL:"actuarial",PHASORANGLE:"phasorangle",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",NORTHEASTARROW:"northeastarrow",MADRUWB:"madruwb",UPDIAGONALARROW:"updiagonalarrow"},e.Align={TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},e.Lines={NONE:"none",SOLID:"solid",DASHED:"dashed"},e.Side={LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},e.Width={AUTO:"auto",FIT:"fit"},e.Actiontype={TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},e.Overflow={LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},e.Unit={EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"}}(TexConstants),getDefaultExportFromCjs(TexConstants);var BaseMethods$1={},lengths={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.px=t.emRounded=t.em=t.percent=t.length2em=t.MATHSPACE=t.RELUNITS=t.UNITS=t.BIGDIMEN=void 0,t.BIGDIMEN=1e6,t.UNITS={px:1,in:96,cm:96/2.54,mm:96/25.4},t.RELUNITS={em:1,ex:.431,pt:.1,pc:1.2,mu:1/18},t.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:t.BIGDIMEN},t.length2em=function(e,r,n,o){if(void 0===r&&(r=0),void 0===n&&(n=1),void 0===o&&(o=16),"string"!=typeof e&&(e=String(e)),""===e||null==e)return r;if(t.MATHSPACE[e])return t.MATHSPACE[e];var i=e.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);if(!i)return r;var a=parseFloat(i[1]||"1"),s=i[2];return t.UNITS.hasOwnProperty(s)?a*t.UNITS[s]/o/n:t.RELUNITS.hasOwnProperty(s)?a*t.RELUNITS[s]:"%"===s?a/100*r:a*r},t.percent=function(t){return(100*t).toFixed(1).replace(/\.?0+$/,"")+"%"},t.em=function(t){return Math.abs(t)<.001?"0":t.toFixed(3).replace(/\.?0+$/,"")+"em"},t.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"},t.px=function(e,r,n){return void 0===r&&(r=-t.BIGDIMEN),void 0===n&&(n=16),e*=n,r&&e<r&&(e=r),Math.abs(e)<.1?"0":e.toFixed(1).replace(/\.0$/,"")+"px"}}(lengths),getDefaultExportFromCjs(lengths);var __assign$a=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$a.apply(this,arguments)},__createBinding$c=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$c=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$c=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$c(e,t,r);return __setModuleDefault$c(e,t),e},__read$D=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__importDefault$B=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BaseMethods$1,"__esModule",{value:!0});var sitem=__importStar$c(BaseItems),NodeUtil_js_1$b=__importDefault$B(NodeUtil$1),TexError_js_1$g=__importDefault$B(TexError$1),TexParser_js_1$9=__importDefault$B(TexParser$1),TexConstants_js_1$b=TexConstants,ParseUtil_js_1$d=__importDefault$B(ParseUtil$1),MmlNode_js_1$e=MmlNode,Tags_js_1$6=Tags,lengths_js_1$6=lengths,Entities_js_1=Entities$1,Options_js_1$8=Options,BaseMethods={},P_HEIGHT=1.2/.85,MmlTokenAllow={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function parseRoot(t,e){var r=t.stack.env,n=r.inRoot;r.inRoot=!0;var o=new TexParser_js_1$9.default(e,r,t.configuration),i=o.mml(),a=o.stack.global;if(a.leftRoot||a.upRoot){var s={};a.leftRoot&&(s.width=a.leftRoot),a.upRoot&&(s.voffset=a.upRoot,s.height=a.upRoot),i=t.create("node","mpadded",[i],s)}return r.inRoot=n,i}BaseMethods.Open=function(t,e){t.Push(t.itemFactory.create("open"))},BaseMethods.Close=function(t,e){t.Push(t.itemFactory.create("close"))},BaseMethods.Tilde=function(t,e){t.Push(t.create("token","mtext",{},Entities_js_1.entities.nbsp))},BaseMethods.Space=function(t,e){},BaseMethods.Superscript=function(t,e){var r,n,o;t.GetNext().match(/\d/)&&(t.string=t.string.substr(0,t.i+1)+" "+t.string.substr(t.i+1));var i=t.stack.Top();i.isKind("prime")?(o=(r=__read$D(i.Peek(2),2))[0],n=r[1],t.stack.Pop()):(o=t.stack.Prev())||(o=t.create("token","mi",{},""));var a=NodeUtil_js_1$b.default.getProperty(o,"movesupsub"),s=NodeUtil_js_1$b.default.isType(o,"msubsup")?o.sup:o.over;if(NodeUtil_js_1$b.default.isType(o,"msubsup")&&!NodeUtil_js_1$b.default.isType(o,"msup")&&NodeUtil_js_1$b.default.getChildAt(o,o.sup)||NodeUtil_js_1$b.default.isType(o,"munderover")&&!NodeUtil_js_1$b.default.isType(o,"mover")&&NodeUtil_js_1$b.default.getChildAt(o,o.over)&&!NodeUtil_js_1$b.default.getProperty(o,"subsupOK"))throw new TexError_js_1$g.default("DoubleExponent","Double exponent: use braces to clarify");NodeUtil_js_1$b.default.isType(o,"msubsup")&&!NodeUtil_js_1$b.default.isType(o,"msup")||(a?((!NodeUtil_js_1$b.default.isType(o,"munderover")||NodeUtil_js_1$b.default.isType(o,"mover")||NodeUtil_js_1$b.default.getChildAt(o,o.over))&&(o=t.create("node","munderover",[o],{movesupsub:!0})),s=o.over):s=(o=t.create("node","msubsup",[o])).sup),t.Push(t.itemFactory.create("subsup",o).setProperties({position:s,primes:n,movesupsub:a}))},BaseMethods.Subscript=function(t,e){var r,n,o;t.GetNext().match(/\d/)&&(t.string=t.string.substr(0,t.i+1)+" "+t.string.substr(t.i+1));var i=t.stack.Top();i.isKind("prime")?(o=(r=__read$D(i.Peek(2),2))[0],n=r[1],t.stack.Pop()):(o=t.stack.Prev())||(o=t.create("token","mi",{},""));var a=NodeUtil_js_1$b.default.getProperty(o,"movesupsub"),s=NodeUtil_js_1$b.default.isType(o,"msubsup")?o.sub:o.under;if(NodeUtil_js_1$b.default.isType(o,"msubsup")&&!NodeUtil_js_1$b.default.isType(o,"msup")&&NodeUtil_js_1$b.default.getChildAt(o,o.sub)||NodeUtil_js_1$b.default.isType(o,"munderover")&&!NodeUtil_js_1$b.default.isType(o,"mover")&&NodeUtil_js_1$b.default.getChildAt(o,o.under)&&!NodeUtil_js_1$b.default.getProperty(o,"subsupOK"))throw new TexError_js_1$g.default("DoubleSubscripts","Double subscripts: use braces to clarify");NodeUtil_js_1$b.default.isType(o,"msubsup")&&!NodeUtil_js_1$b.default.isType(o,"msup")||(a?((!NodeUtil_js_1$b.default.isType(o,"munderover")||NodeUtil_js_1$b.default.isType(o,"mover")||NodeUtil_js_1$b.default.getChildAt(o,o.under))&&(o=t.create("node","munderover",[o],{movesupsub:!0})),s=o.under):s=(o=t.create("node","msubsup",[o])).sub),t.Push(t.itemFactory.create("subsup",o).setProperties({position:s,primes:n,movesupsub:a}))},BaseMethods.Prime=function(t,e){var r=t.stack.Prev();if(r||(r=t.create("node","mi")),NodeUtil_js_1$b.default.isType(r,"msubsup")&&!NodeUtil_js_1$b.default.isType(r,"msup")&&NodeUtil_js_1$b.default.getChildAt(r,r.sup))throw new TexError_js_1$g.default("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");var n="";t.i--;do{n+=Entities_js_1.entities.prime,t.i++,e=t.GetNext()}while("'"===e||e===Entities_js_1.entities.rsquo);n=["","′","″","‴","⁗"][n.length]||n;var o=t.create("token","mo",{variantForm:!0},n);t.Push(t.itemFactory.create("prime",r,o))},BaseMethods.Comment=function(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++},BaseMethods.Hash=function(t,e){throw new TexError_js_1$g.default("CantUseHash1","You can't use 'macro parameter character #' in math mode")},BaseMethods.MathFont=function(t,e,r){var n=t.GetArgument(e),o=new TexParser_js_1$9.default(n,__assign$a(__assign$a({},t.stack.env),{font:r,multiLetterIdentifiers:/^[a-zA-Z]+/,noAutoOP:!0}),t.configuration).mml();t.Push(t.create("node","TeXAtom",[o]))},BaseMethods.SetFont=function(t,e,r){t.stack.env.font=r},BaseMethods.SetStyle=function(t,e,r,n,o){t.stack.env.style=r,t.stack.env.level=o,t.Push(t.itemFactory.create("style").setProperty("styles",{displaystyle:n,scriptlevel:o}))},BaseMethods.SetSize=function(t,e,r){t.stack.env.size=r,t.Push(t.itemFactory.create("style").setProperty("styles",{mathsize:(0,lengths_js_1$6.em)(r)}))},BaseMethods.Spacer=function(t,e,r){var n=t.create("node","mspace",[],{width:(0,lengths_js_1$6.em)(r)}),o=t.create("node","mstyle",[n],{scriptlevel:0});t.Push(o)},BaseMethods.LeftRight=function(t,e){var r=e.substr(1);t.Push(t.itemFactory.create(r,t.GetDelimiter(e),t.stack.env.color))},BaseMethods.NamedFn=function(t,e,r){r||(r=e.substr(1));var n=t.create("token","mi",{texClass:MmlNode_js_1$e.TEXCLASS.OP},r);t.Push(t.itemFactory.create("fn",n))},BaseMethods.NamedOp=function(t,e,r){r||(r=e.substr(1)),r=r.replace(/&thinsp;/," ");var n=t.create("token","mo",{movablelimits:!0,movesupsub:!0,form:TexConstants_js_1$b.TexConstant.Form.PREFIX,texClass:MmlNode_js_1$e.TEXCLASS.OP},r);t.Push(n)},BaseMethods.Limits=function(t,e,r){var n=t.stack.Prev(!0);if(!n||NodeUtil_js_1$b.default.getTexClass(NodeUtil_js_1$b.default.getCoreMO(n))!==MmlNode_js_1$e.TEXCLASS.OP&&null==NodeUtil_js_1$b.default.getProperty(n,"movesupsub"))throw new TexError_js_1$g.default("MisplacedLimits","%1 is allowed only on operators",t.currentCS);var o,i=t.stack.Top();NodeUtil_js_1$b.default.isType(n,"munderover")&&!r?(o=t.create("node","msubsup"),NodeUtil_js_1$b.default.copyChildren(n,o),n=i.Last=o):NodeUtil_js_1$b.default.isType(n,"msubsup")&&r&&(o=t.create("node","munderover"),NodeUtil_js_1$b.default.copyChildren(n,o),n=i.Last=o),NodeUtil_js_1$b.default.setProperty(n,"movesupsub",!!r),NodeUtil_js_1$b.default.setProperties(NodeUtil_js_1$b.default.getCoreMO(n),{movablelimits:!1}),(NodeUtil_js_1$b.default.getAttribute(n,"movablelimits")||NodeUtil_js_1$b.default.getProperty(n,"movablelimits"))&&NodeUtil_js_1$b.default.setProperties(n,{movablelimits:!1})},BaseMethods.Over=function(t,e,r,n){var o=t.itemFactory.create("over").setProperty("name",t.currentCS);r||n?(o.setProperty("open",r),o.setProperty("close",n)):e.match(/withdelims$/)&&(o.setProperty("open",t.GetDelimiter(e)),o.setProperty("close",t.GetDelimiter(e))),e.match(/^\\above/)?o.setProperty("thickness",t.GetDimen(e)):(e.match(/^\\atop/)||r||n)&&o.setProperty("thickness",0),t.Push(o)},BaseMethods.Frac=function(t,e){var r=t.ParseArg(e),n=t.ParseArg(e),o=t.create("node","mfrac",[r,n]);t.Push(o)},BaseMethods.Sqrt=function(t,e){var r=t.GetBrackets(e),n=t.GetArgument(e);"\\frac"===n&&(n+="{"+t.GetArgument(n)+"}{"+t.GetArgument(n)+"}");var o=new TexParser_js_1$9.default(n,t.stack.env,t.configuration).mml();o=r?t.create("node","mroot",[o,parseRoot(t,r)]):t.create("node","msqrt",[o]),t.Push(o)},BaseMethods.Root=function(t,e){var r=t.GetUpTo(e,"\\of"),n=t.ParseArg(e),o=t.create("node","mroot",[n,parseRoot(t,r)]);t.Push(o)},BaseMethods.MoveRoot=function(t,e,r){if(!t.stack.env.inRoot)throw new TexError_js_1$g.default("MisplacedMoveRoot","%1 can appear only within a root",t.currentCS);if(t.stack.global[r])throw new TexError_js_1$g.default("MultipleMoveRoot","Multiple use of %1",t.currentCS);var n=t.GetArgument(e);if(!n.match(/-?[0-9]+/))throw new TexError_js_1$g.default("IntegerArg","The argument to %1 must be an integer",t.currentCS);"-"!==(n=parseInt(n,10)/15+"em").substr(0,1)&&(n="+"+n),t.stack.global[r]=n},BaseMethods.Accent=function(t,e,r,n){var o=t.ParseArg(e),i=__assign$a(__assign$a({},ParseUtil_js_1$d.default.getFontDef(t)),{accent:!0,mathaccent:!0}),a=NodeUtil_js_1$b.default.createEntity(r),s=t.create("token","mo",i,a);NodeUtil_js_1$b.default.setAttribute(s,"stretchy",!!n);var l=NodeUtil_js_1$b.default.isEmbellished(o)?NodeUtil_js_1$b.default.getCoreMO(o):o;(NodeUtil_js_1$b.default.isType(l,"mo")||NodeUtil_js_1$b.default.getProperty(l,"movablelimits"))&&NodeUtil_js_1$b.default.setProperties(l,{movablelimits:!1});var c=t.create("node","munderover");NodeUtil_js_1$b.default.setChild(c,0,o),NodeUtil_js_1$b.default.setChild(c,1,null),NodeUtil_js_1$b.default.setChild(c,2,s);var u=t.create("node","TeXAtom",[c]);t.Push(u)},BaseMethods.UnderOver=function(t,e,r,n){var o=NodeUtil_js_1$b.default.createEntity(r),i=t.create("token","mo",{stretchy:!0,accent:!0},o),a="o"===e.charAt(1)?"over":"under",s=t.ParseArg(e);t.Push(ParseUtil_js_1$d.default.underOver(t,s,i,a,n))},BaseMethods.Overset=function(t,e){var r=t.ParseArg(e),n=t.ParseArg(e);ParseUtil_js_1$d.default.checkMovableLimits(n),r.isKind("mo")&&NodeUtil_js_1$b.default.setAttribute(r,"accent",!1);var o=t.create("node","mover",[n,r]);t.Push(o)},BaseMethods.Underset=function(t,e){var r=t.ParseArg(e),n=t.ParseArg(e);ParseUtil_js_1$d.default.checkMovableLimits(n),r.isKind("mo")&&NodeUtil_js_1$b.default.setAttribute(r,"accent",!1);var o=t.create("node","munder",[n,r],{accentunder:!1});t.Push(o)},BaseMethods.Overunderset=function(t,e){var r=t.ParseArg(e),n=t.ParseArg(e),o=t.ParseArg(e);ParseUtil_js_1$d.default.checkMovableLimits(o),r.isKind("mo")&&NodeUtil_js_1$b.default.setAttribute(r,"accent",!1),n.isKind("mo")&&NodeUtil_js_1$b.default.setAttribute(n,"accent",!1);var i=t.create("node","munderover",[o,n,r],{accent:!1,accentunder:!1});t.Push(i)},BaseMethods.TeXAtom=function(t,e,r){var n,o,i,a={texClass:r};if(r===MmlNode_js_1$e.TEXCLASS.OP){a.movesupsub=a.movablelimits=!0;var s=t.GetArgument(e),l=s.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);l?(a.mathvariant=TexConstants_js_1$b.TexConstant.Variant.NORMAL,o=t.create("token","mi",a,l[1])):(i=new TexParser_js_1$9.default(s,t.stack.env,t.configuration).mml(),o=t.create("node","TeXAtom",[i],a)),n=t.itemFactory.create("fn",o)}else i=t.ParseArg(e),n=t.create("node","TeXAtom",[i],a);t.Push(n)},BaseMethods.MmlToken=function(t,e){var r,n=t.GetArgument(e),o=t.GetBrackets(e,"").replace(/^\s+/,""),i=t.GetArgument(e),a={},s=[];try{r=t.create("node",n)}catch(t){r=null}if(!r||!r.isToken)throw new TexError_js_1$g.default("NotMathMLToken","%1 is not a token element",n);for(;""!==o;){var l=o.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);if(!l)throw new TexError_js_1$g.default("InvalidMathMLAttr","Invalid MathML attribute: %1",o);if(!r.attributes.hasDefault(l[1])&&!MmlTokenAllow[l[1]])throw new TexError_js_1$g.default("UnknownAttrForElement","%1 is not a recognized attribute for %2",l[1],n);var c=ParseUtil_js_1$d.default.MmlFilterAttribute(t,l[1],l[2].replace(/^(['"])(.*)\1$/,"$2"));c&&("true"===c.toLowerCase()?c=!0:"false"===c.toLowerCase()&&(c=!1),a[l[1]]=c,s.push(l[1])),o=o.substr(l[0].length)}s.length&&(a["mjx-keep-attrs"]=s.join(" "));var u=t.create("text",i);r.appendChild(u),NodeUtil_js_1$b.default.setProperties(r,a),t.Push(r)},BaseMethods.Strut=function(t,e){var r=t.create("node","mrow"),n=t.create("node","mpadded",[r],{height:"8.6pt",depth:"3pt",width:0});t.Push(n)},BaseMethods.Phantom=function(t,e,r,n){var o=t.create("node","mphantom",[t.ParseArg(e)]);(r||n)&&(o=t.create("node","mpadded",[o]),n&&(NodeUtil_js_1$b.default.setAttribute(o,"height",0),NodeUtil_js_1$b.default.setAttribute(o,"depth",0)),r&&NodeUtil_js_1$b.default.setAttribute(o,"width",0));var i=t.create("node","TeXAtom",[o]);t.Push(i)},BaseMethods.Smash=function(t,e){var r=ParseUtil_js_1$d.default.trimSpaces(t.GetBrackets(e,"")),n=t.create("node","mpadded",[t.ParseArg(e)]);switch(r){case"b":NodeUtil_js_1$b.default.setAttribute(n,"depth",0);break;case"t":NodeUtil_js_1$b.default.setAttribute(n,"height",0);break;default:NodeUtil_js_1$b.default.setAttribute(n,"height",0),NodeUtil_js_1$b.default.setAttribute(n,"depth",0)}var o=t.create("node","TeXAtom",[n]);t.Push(o)},BaseMethods.Lap=function(t,e){var r=t.create("node","mpadded",[t.ParseArg(e)],{width:0});"\\llap"===e&&NodeUtil_js_1$b.default.setAttribute(r,"lspace","-1width");var n=t.create("node","TeXAtom",[r]);t.Push(n)},BaseMethods.RaiseLower=function(t,e){var r=t.GetDimen(e),n=t.itemFactory.create("position").setProperties({name:t.currentCS,move:"vertical"});"-"===r.charAt(0)&&(r=r.slice(1),e="raise"===e.substr(1)?"\\lower":"\\raise"),"\\lower"===e?(n.setProperty("dh","-"+r),n.setProperty("dd","+"+r)):(n.setProperty("dh","+"+r),n.setProperty("dd","-"+r)),t.Push(n)},BaseMethods.MoveLeftRight=function(t,e){var r=t.GetDimen(e),n="-"===r.charAt(0)?r.slice(1):"-"+r;if("\\moveleft"===e){var o=r;r=n,n=o}t.Push(t.itemFactory.create("position").setProperties({name:t.currentCS,move:"horizontal",left:t.create("node","mspace",[],{width:r}),right:t.create("node","mspace",[],{width:n})}))},BaseMethods.Hskip=function(t,e){var r=t.create("node","mspace",[],{width:t.GetDimen(e)});t.Push(r)},BaseMethods.Nonscript=function(t,e){t.Push(t.itemFactory.create("nonscript"))},BaseMethods.Rule=function(t,e,r){var n={width:t.GetDimen(e),height:t.GetDimen(e),depth:t.GetDimen(e)};"blank"!==r&&(n.mathbackground=t.stack.env.color||"black");var o=t.create("node","mspace",[],n);t.Push(o)},BaseMethods.rule=function(t,e){var r=t.GetBrackets(e),n=t.GetDimen(e),o=t.GetDimen(e),i=t.create("node","mspace",[],{width:n,height:o,mathbackground:t.stack.env.color||"black"});r&&(i=t.create("node","mpadded",[i],{voffset:r}),r.match(/^\-/)?(NodeUtil_js_1$b.default.setAttribute(i,"height",r),NodeUtil_js_1$b.default.setAttribute(i,"depth","+"+r.substr(1))):NodeUtil_js_1$b.default.setAttribute(i,"height","+"+r)),t.Push(i)},BaseMethods.MakeBig=function(t,e,r,n){var o=String(n*=P_HEIGHT).replace(/(\.\d\d\d).+/,"$1")+"em",i=t.GetDelimiter(e,!0),a=t.create("token","mo",{minsize:o,maxsize:o,fence:!0,stretchy:!0,symmetric:!0},i),s=t.create("node","TeXAtom",[a],{texClass:r});t.Push(s)},BaseMethods.BuildRel=function(t,e){var r=t.ParseUpTo(e,"\\over"),n=t.ParseArg(e),o=t.create("node","munderover");NodeUtil_js_1$b.default.setChild(o,0,n),NodeUtil_js_1$b.default.setChild(o,1,null),NodeUtil_js_1$b.default.setChild(o,2,r);var i=t.create("node","TeXAtom",[o],{texClass:MmlNode_js_1$e.TEXCLASS.REL});t.Push(i)},BaseMethods.HBox=function(t,e,r,n){t.PushAll(ParseUtil_js_1$d.default.internalMath(t,t.GetArgument(e),r,n))},BaseMethods.FBox=function(t,e){var r=ParseUtil_js_1$d.default.internalMath(t,t.GetArgument(e)),n=t.create("node","menclose",r,{notation:"box"});t.Push(n)},BaseMethods.FrameBox=function(t,e){var r=t.GetBrackets(e),n=t.GetBrackets(e)||"c",o=ParseUtil_js_1$d.default.internalMath(t,t.GetArgument(e));r&&(o=[t.create("node","mpadded",o,{width:r,"data-align":(0,Options_js_1$8.lookup)(n,{l:"left",r:"right"},"center")})]);var i=t.create("node","TeXAtom",[t.create("node","menclose",o,{notation:"box"})],{texClass:MmlNode_js_1$e.TEXCLASS.ORD});t.Push(i)},BaseMethods.Not=function(t,e){t.Push(t.itemFactory.create("not"))},BaseMethods.Dots=function(t,e){var r=NodeUtil_js_1$b.default.createEntity("2026"),n=NodeUtil_js_1$b.default.createEntity("22EF"),o=t.create("token","mo",{stretchy:!1},r),i=t.create("token","mo",{stretchy:!1},n);t.Push(t.itemFactory.create("dots").setProperties({ldots:o,cdots:i}))},BaseMethods.Matrix=function(t,e,r,n,o,i,a,s,l,c){var u=t.GetNext();if(""===u)throw new TexError_js_1$g.default("MissingArgFor","Missing argument for %1",t.currentCS);"{"===u?t.i++:(t.string=u+"}"+t.string.slice(t.i+1),t.i=0);var d=t.itemFactory.create("array").setProperty("requireClose",!0);d.arraydef={rowspacing:a||"4pt",columnspacing:i||"1em"},l&&d.setProperty("isCases",!0),c&&(d.setProperty("isNumbered",!0),d.arraydef.side=c),(r||n)&&(d.setProperty("open",r),d.setProperty("close",n)),"D"===s&&(d.arraydef.displaystyle=!0),null!=o&&(d.arraydef.columnalign=o),t.Push(d)},BaseMethods.Entry=function(t,e){t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}));var r=t.stack.Top(),n=r.getProperty("casesEnv");if(r.getProperty("isCases")||n){for(var o=t.string,i=0,a=-1,s=t.i,l=o.length,c=n?new RegExp("^\\\\end\\s*\\{".concat(n.replace(/\*/,"\\*"),"\\}")):null;s<l;){var u=o.charAt(s);if("{"===u)i++,s++;else if("}"===u)0===i?l=0:(0===--i&&a<0&&(a=s-t.i),s++);else{if("&"===u&&0===i)throw new TexError_js_1$g.default("ExtraAlignTab","Extra alignment tab in \\cases text");if("\\"===u){var d=o.substr(s);d.match(/^((\\cr)[^a-zA-Z]|\\\\)/)||c&&d.match(c)?l=0:s+=2}else s++}}var p=o.substr(t.i,s-t.i);if(!p.match(/^\s*\\text[^a-zA-Z]/)||a!==p.replace(/\s+$/,"").length-1){var m=ParseUtil_js_1$d.default.internalMath(t,ParseUtil_js_1$d.default.trimSpaces(p),0);t.PushAll(m),t.i=s}}},BaseMethods.Cr=function(t,e){t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e}))},BaseMethods.CrLaTeX=function(t,e,r){var n;if(void 0===r&&(r=!1),!r&&("*"===t.string.charAt(t.i)&&t.i++,"["===t.string.charAt(t.i))){var o=t.GetBrackets(e,""),i=__read$D(ParseUtil_js_1$d.default.matchDimen(o),2),a=i[0],s=i[1];if(o&&!a)throw new TexError_js_1$g.default("BracketMustBeDimension","Bracket argument to %1 must be a dimension",t.currentCS);n=a+s}t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e,linebreak:!0}));var l,c=t.stack.Top();c instanceof sitem.ArrayItem?n&&c.addRowSpacing(n):(n&&(l=t.create("node","mspace",[],{depth:n}),t.Push(l)),l=t.create("node","mspace",[],{linebreak:TexConstants_js_1$b.TexConstant.LineBreak.NEWLINE}),t.Push(l))},BaseMethods.HLine=function(t,e,r){null==r&&(r="solid");var n=t.stack.Top();if(!(n instanceof sitem.ArrayItem)||n.Size())throw new TexError_js_1$g.default("Misplaced","Misplaced %1",t.currentCS);if(n.table.length){for(var o=n.arraydef.rowlines?n.arraydef.rowlines.split(/ /):[];o.length<n.table.length;)o.push("none");o[n.table.length-1]=r,n.arraydef.rowlines=o.join(" ")}else n.frame.push("top")},BaseMethods.HFill=function(t,e){var r=t.stack.Top();if(!(r instanceof sitem.ArrayItem))throw new TexError_js_1$g.default("UnsupportedHFill","Unsupported use of %1",t.currentCS);r.hfill.push(r.Size())},BaseMethods.BeginEnd=function(t,e){var r=t.GetArgument(e);if(r.match(/\\/i))throw new TexError_js_1$g.default("InvalidEnv","Invalid environment name '%1'",r);var n=t.configuration.handlers.get("environment").lookup(r);if(n&&"\\end"===e){if(!n.args[0]){var o=t.itemFactory.create("end").setProperty("name",r);return void t.Push(o)}t.stack.env.closing=r}ParseUtil_js_1$d.default.checkMaxMacros(t,!1),t.parse("environment",[t,r])},BaseMethods.Array=function(t,e,r,n,o,i,a,s,l){o||(o=t.GetArgument("\\begin{"+e.getName()+"}"));var c=("c"+o).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");o=(o=o.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var u=t.itemFactory.create("array");return u.arraydef={columnalign:o,columnspacing:i||"1em",rowspacing:a||"4pt"},c.match(/[|:]/)&&(c.charAt(0).match(/[|:]/)&&(u.frame.push("left"),u.dashed=":"===c.charAt(0)),c.charAt(c.length-1).match(/[|:]/)&&u.frame.push("right"),c=c.substr(1,c.length-2),u.arraydef.columnlines=c.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")),r&&u.setProperty("open",t.convertDelimiter(r)),n&&u.setProperty("close",t.convertDelimiter(n)),"'"===(s||"").charAt(1)&&(u.arraydef["data-cramped"]=!0,s=s.charAt(0)),"D"===s?u.arraydef.displaystyle=!0:s&&(u.arraydef.displaystyle=!1),"S"===s&&(u.arraydef.scriptlevel=1),l&&(u.arraydef.useHeight=!1),t.Push(e),u},BaseMethods.AlignedArray=function(t,e){var r=t.GetBrackets("\\begin{"+e.getName()+"}"),n=BaseMethods.Array(t,e);return ParseUtil_js_1$d.default.setArrayAlign(n,r)},BaseMethods.Equation=function(t,e,r){return t.Push(e),ParseUtil_js_1$d.default.checkEqnEnv(t),t.itemFactory.create("equation",r).setProperty("name",e.getName())},BaseMethods.EqnArray=function(t,e,r,n,o,i){t.Push(e),n&&ParseUtil_js_1$d.default.checkEqnEnv(t),o=(o=o.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var a=t.itemFactory.create("eqnarray",e.getName(),r,n,t.stack.global);return a.arraydef={displaystyle:!0,columnalign:o,columnspacing:i||"1em",rowspacing:"3pt",side:t.options.tagSide,minlabelspacing:t.options.tagIndent},a},BaseMethods.HandleNoTag=function(t,e){t.tags.notag()},BaseMethods.HandleLabel=function(t,e){var r=t.GetArgument(e);if(""!==r&&!t.tags.refUpdate){if(t.tags.label)throw new TexError_js_1$g.default("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=r,(t.tags.allLabels[r]||t.tags.labels[r])&&!t.options.ignoreDuplicateLabels)throw new TexError_js_1$g.default("MultipleLabel","Label '%1' multiply defined",r);t.tags.labels[r]=new Tags_js_1$6.Label}},BaseMethods.HandleRef=function(t,e,r){var n=t.GetArgument(e),o=t.tags.allLabels[n]||t.tags.labels[n];o||(t.tags.refUpdate||(t.tags.redo=!0),o=new Tags_js_1$6.Label);var i=o.tag;r&&(i=t.tags.formatTag(i));var a=t.create("node","mrow",ParseUtil_js_1$d.default.internalMath(t,i),{href:t.tags.formatUrl(o.id,t.options.baseURL),class:"MathJax_ref"});t.Push(a)},BaseMethods.Macro=function(t,e,r,n,o){if(n){var i=[];if(null!=o){var a=t.GetBrackets(e);i.push(null==a?o:a)}for(var s=i.length;s<n;s++)i.push(t.GetArgument(e));r=ParseUtil_js_1$d.default.substituteArgs(t,i,r)}t.string=ParseUtil_js_1$d.default.addArgs(t,r,t.string.slice(t.i)),t.i=0,ParseUtil_js_1$d.default.checkMaxMacros(t)},BaseMethods.MathChoice=function(t,e){var r=t.ParseArg(e),n=t.ParseArg(e),o=t.ParseArg(e),i=t.ParseArg(e);t.Push(t.create("node","MathChoice",[r,n,o,i]))},BaseMethods$1.default=BaseMethods;var ParseMethods$1={},__read$C=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$j=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$A=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ParseMethods$1,"__esModule",{value:!0});var NodeUtil_js_1$a=__importDefault$A(NodeUtil$1),TexConstants_js_1$a=TexConstants,ParseUtil_js_1$c=__importDefault$A(ParseUtil$1),ParseMethods;!function(t){t.variable=function(t,e){var r=ParseUtil_js_1$c.default.getFontDef(t),n=t.stack.env;n.multiLetterIdentifiers&&""!==n.font&&(e=t.string.substr(t.i-1).match(n.multiLetterIdentifiers)[0],t.i+=e.length-1,r.mathvariant===TexConstants_js_1$a.TexConstant.Variant.NORMAL&&n.noAutoOP&&e.length>1&&(r.autoOP=!1));var o=t.create("token","mi",r,e);t.Push(o)},t.digit=function(t,e){var r,n=t.configuration.options.digits,o=t.string.slice(t.i-1).match(n),i=ParseUtil_js_1$c.default.getFontDef(t);o?(r=t.create("token","mn",i,o[0].replace(/[{}]/g,"")),t.i+=o[0].length-1):r=t.create("token","mo",i,e),t.Push(r)},t.controlSequence=function(t,e){var r=t.GetCS();t.parse("macro",[t,r])},t.mathchar0mi=function(t,e){var r=e.attributes||{mathvariant:TexConstants_js_1$a.TexConstant.Variant.ITALIC},n=t.create("token","mi",r,e.char);t.Push(n)},t.mathchar0mo=function(t,e){var r=e.attributes||{};r.stretchy=!1;var n=t.create("token","mo",r,e.char);NodeUtil_js_1$a.default.setProperty(n,"fixStretchy",!0),t.configuration.addNode("fixStretchy",n),t.Push(n)},t.mathchar7=function(t,e){var r=e.attributes||{mathvariant:TexConstants_js_1$a.TexConstant.Variant.NORMAL};t.stack.env.font&&(r.mathvariant=t.stack.env.font);var n=t.create("token","mi",r,e.char);t.Push(n)},t.delimiter=function(t,e){var r=e.attributes||{};r=Object.assign({fence:!1,stretchy:!1},r);var n=t.create("token","mo",r,e.char);t.Push(n)},t.environment=function(t,e,r,n){var o=n[0],i=t.itemFactory.create("begin").setProperties({name:e,end:o});i=r.apply(void 0,__spreadArray$j([t,i],__read$C(n.slice(1)),!1)),t.Push(i)}}(ParseMethods||(ParseMethods={})),ParseMethods$1.default=ParseMethods;var __createBinding$b=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$b=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$b=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$b(e,t,r);return __setModuleDefault$b(e,t),e},__importDefault$z=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BaseMappings,"__esModule",{value:!0});var sm$4=__importStar$b(SymbolMap),TexConstants_js_1$9=TexConstants,BaseMethods_js_1$6=__importDefault$z(BaseMethods$1),ParseMethods_js_1$7=__importDefault$z(ParseMethods$1),ParseUtil_js_1$b=__importDefault$z(ParseUtil$1),MmlNode_js_1$d=MmlNode,lengths_js_1$5=lengths;new sm$4.RegExpMap("letter",ParseMethods_js_1$7.default.variable,/[a-z]/i),new sm$4.RegExpMap("digit",ParseMethods_js_1$7.default.digit,/[0-9.,]/),new sm$4.RegExpMap("command",ParseMethods_js_1$7.default.controlSequence,/^\\/),new sm$4.MacroMap("special",{"{":"Open","}":"Close","~":"Tilde","^":"Superscript",_:"Subscript"," ":"Space","\t":"Space","\r":"Space","\n":"Space","'":"Prime","%":"Comment","&":"Entry","#":"Hash"," ":"Space","’":"Prime"},BaseMethods_js_1$6.default),new sm$4.CharacterMap("mathchar0mi",ParseMethods_js_1$7.default.mathchar0mi,{alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ϵ",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"ϕ",chi:"χ",psi:"ψ",omega:"ω",varepsilon:"ε",vartheta:"ϑ",varpi:"ϖ",varrho:"ϱ",varsigma:"ς",varphi:"φ",S:["§",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],aleph:["ℵ",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],hbar:["ℏ",{variantForm:!0}],imath:"ı",jmath:"ȷ",ell:"ℓ",wp:["℘",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],Re:["ℜ",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],Im:["ℑ",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],partial:["∂",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.ITALIC}],infty:["∞",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],prime:["′",{variantForm:!0}],emptyset:["∅",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],nabla:["∇",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],top:["⊤",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],bot:["⊥",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],angle:["∠",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],triangle:["△",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],backslash:["∖",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],forall:["∀",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],exists:["∃",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],neg:["¬",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],lnot:["¬",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],flat:["♭",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],natural:["♮",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],sharp:["♯",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],clubsuit:["♣",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],diamondsuit:["♢",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],heartsuit:["♡",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}],spadesuit:["♠",{mathvariant:TexConstants_js_1$9.TexConstant.Variant.NORMAL}]}),new sm$4.CharacterMap("mathchar0mo",ParseMethods_js_1$7.default.mathchar0mo,{surd:"√",coprod:["∐",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigvee:["⋁",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigwedge:["⋀",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],biguplus:["⨄",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigcap:["⋂",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigcup:["⋃",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],int:["∫",{texClass:MmlNode_js_1$d.TEXCLASS.OP}],intop:["∫",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0,movablelimits:!0}],iint:["∬",{texClass:MmlNode_js_1$d.TEXCLASS.OP}],iiint:["∭",{texClass:MmlNode_js_1$d.TEXCLASS.OP}],prod:["∏",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],sum:["∑",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigotimes:["⨂",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigoplus:["⨁",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],bigodot:["⨀",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],oint:["∮",{texClass:MmlNode_js_1$d.TEXCLASS.OP}],bigsqcup:["⨆",{texClass:MmlNode_js_1$d.TEXCLASS.OP,movesupsub:!0}],smallint:["∫",{largeop:!1}],triangleleft:"◃",triangleright:"▹",bigtriangleup:"△",bigtriangledown:"▽",wedge:"∧",land:"∧",vee:"∨",lor:"∨",cap:"∩",cup:"∪",ddagger:"‡",dagger:"†",sqcap:"⊓",sqcup:"⊔",uplus:"⊎",amalg:"⨿",diamond:"⋄",bullet:"∙",wr:"≀",div:"÷",divsymbol:"÷",odot:["⊙",{largeop:!1}],oslash:["⊘",{largeop:!1}],otimes:["⊗",{largeop:!1}],ominus:["⊖",{largeop:!1}],oplus:["⊕",{largeop:!1}],mp:"∓",pm:"±",circ:"∘",bigcirc:"◯",setminus:"∖",cdot:"⋅",ast:"∗",times:"×",star:"⋆",propto:"∝",sqsubseteq:"⊑",sqsupseteq:"⊒",parallel:"∥",mid:"∣",dashv:"⊣",vdash:"⊢",leq:"≤",le:"≤",geq:"≥",ge:"≥",lt:"<",gt:">",succ:"≻",prec:"≺",approx:"≈",succeq:"⪰",preceq:"⪯",supset:"⊃",subset:"⊂",supseteq:"⊇",subseteq:"⊆",in:"∈",ni:"∋",notin:"∉",owns:"∋",gg:"≫",ll:"≪",sim:"∼",simeq:"≃",perp:"⊥",equiv:"≡",asymp:"≍",smile:"⌣",frown:"⌢",ne:"≠",neq:"≠",cong:"≅",doteq:"≐",bowtie:"⋈",models:"⊨",notChar:"⧸",Leftrightarrow:"⇔",Leftarrow:"⇐",Rightarrow:"⇒",leftrightarrow:"↔",leftarrow:"←",gets:"←",rightarrow:"→",to:["→",{accent:!1}],mapsto:"↦",leftharpoonup:"↼",leftharpoondown:"↽",rightharpoonup:"⇀",rightharpoondown:"⇁",nearrow:"↗",searrow:"↘",nwarrow:"↖",swarrow:"↙",rightleftharpoons:"⇌",hookrightarrow:"↪",hookleftarrow:"↩",longleftarrow:"⟵",Longleftarrow:"⟸",longrightarrow:"⟶",Longrightarrow:"⟹",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",ldots:"…",cdots:"⋯",vdots:"⋮",ddots:"⋱",dotsc:"…",dotsb:"⋯",dotsm:"⋯",dotsi:"⋯",dotso:"…",ldotp:[".",{texClass:MmlNode_js_1$d.TEXCLASS.PUNCT}],cdotp:["⋅",{texClass:MmlNode_js_1$d.TEXCLASS.PUNCT}],colon:[":",{texClass:MmlNode_js_1$d.TEXCLASS.PUNCT}]}),new sm$4.CharacterMap("mathchar7",ParseMethods_js_1$7.default.mathchar7,{Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Upsilon:"Υ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new sm$4.DelimiterMap("delimiter",ParseMethods_js_1$7.default.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"⟨",">":"⟩","\\lt":"⟨","\\gt":"⟩","/":"/","|":["|",{texClass:MmlNode_js_1$d.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"⎰","\\rmoustache":"⎱","\\lgroup":"⟮","\\rgroup":"⟯","\\arrowvert":"⏐","\\Arrowvert":"‖","\\bracevert":"⎪","\\Vert":["‖",{texClass:MmlNode_js_1$d.TEXCLASS.ORD}],"\\|":["‖",{texClass:MmlNode_js_1$d.TEXCLASS.ORD}],"\\vert":["|",{texClass:MmlNode_js_1$d.TEXCLASS.ORD}],"\\uparrow":"↑","\\downarrow":"↓","\\updownarrow":"↕","\\Uparrow":"⇑","\\Downarrow":"⇓","\\Updownarrow":"⇕","\\backslash":"\\","\\rangle":"⟩","\\langle":"⟨","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"⌉","\\lceil":"⌈","\\rfloor":"⌋","\\lfloor":"⌊","\\lbrack":"[","\\rbrack":"]"}),new sm$4.CommandMap("macros",{displaystyle:["SetStyle","D",!0,0],textstyle:["SetStyle","T",!1,0],scriptstyle:["SetStyle","S",!1,1],scriptscriptstyle:["SetStyle","SS",!1,2],rm:["SetFont",TexConstants_js_1$9.TexConstant.Variant.NORMAL],mit:["SetFont",TexConstants_js_1$9.TexConstant.Variant.ITALIC],oldstyle:["SetFont",TexConstants_js_1$9.TexConstant.Variant.OLDSTYLE],cal:["SetFont",TexConstants_js_1$9.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont",TexConstants_js_1$9.TexConstant.Variant.MATHITALIC],bf:["SetFont",TexConstants_js_1$9.TexConstant.Variant.BOLD],bbFont:["SetFont",TexConstants_js_1$9.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",TexConstants_js_1$9.TexConstant.Variant.SCRIPT],frak:["SetFont",TexConstants_js_1$9.TexConstant.Variant.FRAKTUR],sf:["SetFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIF],tt:["SetFont",TexConstants_js_1$9.TexConstant.Variant.MONOSPACE],mathrm:["MathFont",TexConstants_js_1$9.TexConstant.Variant.NORMAL],mathup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.NORMAL],mathnormal:["MathFont",""],mathbf:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLD],mathbfup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLD],mathit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.MATHITALIC],mathbfit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDITALIC],mathbb:["MathFont",TexConstants_js_1$9.TexConstant.Variant.DOUBLESTRUCK],Bbb:["MathFont",TexConstants_js_1$9.TexConstant.Variant.DOUBLESTRUCK],mathfrak:["MathFont",TexConstants_js_1$9.TexConstant.Variant.FRAKTUR],mathbffrak:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDFRAKTUR],mathscr:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SCRIPT],mathbfscr:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDSCRIPT],mathsf:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIF],mathsfup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIF],mathbfsf:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDSANSSERIF],mathbfsfup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDSANSSERIF],mathsfit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIFITALIC],mathbfsfit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIFBOLDITALIC],mathtt:["MathFont",TexConstants_js_1$9.TexConstant.Variant.MONOSPACE],mathcal:["MathFont",TexConstants_js_1$9.TexConstant.Variant.CALLIGRAPHIC],mathbfcal:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDCALLIGRAPHIC],symrm:["MathFont",TexConstants_js_1$9.TexConstant.Variant.NORMAL],symup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.NORMAL],symnormal:["MathFont",""],symbf:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLD],symbfup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLD],symit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.ITALIC],symbfit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDITALIC],symbb:["MathFont",TexConstants_js_1$9.TexConstant.Variant.DOUBLESTRUCK],symfrak:["MathFont",TexConstants_js_1$9.TexConstant.Variant.FRAKTUR],symbffrak:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDFRAKTUR],symscr:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SCRIPT],symbfscr:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDSCRIPT],symsf:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIF],symsfup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIF],symbfsf:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDSANSSERIF],symbfsfup:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDSANSSERIF],symsfit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIFITALIC],symbfsfit:["MathFont",TexConstants_js_1$9.TexConstant.Variant.SANSSERIFBOLDITALIC],symtt:["MathFont",TexConstants_js_1$9.TexConstant.Variant.MONOSPACE],symcal:["MathFont",TexConstants_js_1$9.TexConstant.Variant.CALLIGRAPHIC],symbfcal:["MathFont",TexConstants_js_1$9.TexConstant.Variant.BOLDCALLIGRAPHIC],textrm:["HBox",null,TexConstants_js_1$9.TexConstant.Variant.NORMAL],textup:["HBox",null,TexConstants_js_1$9.TexConstant.Variant.NORMAL],textnormal:["HBox"],textit:["HBox",null,TexConstants_js_1$9.TexConstant.Variant.ITALIC],textbf:["HBox",null,TexConstants_js_1$9.TexConstant.Variant.BOLD],textsf:["HBox",null,TexConstants_js_1$9.TexConstant.Variant.SANSSERIF],texttt:["HBox",null,TexConstants_js_1$9.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:"NamedFn",arccos:"NamedFn",arctan:"NamedFn",arg:"NamedFn",cos:"NamedFn",cosh:"NamedFn",cot:"NamedFn",coth:"NamedFn",csc:"NamedFn",deg:"NamedFn",det:"NamedOp",dim:"NamedFn",exp:"NamedFn",gcd:"NamedOp",hom:"NamedFn",inf:"NamedOp",ker:"NamedFn",lg:"NamedFn",lim:"NamedOp",liminf:["NamedOp","lim&thinsp;inf"],limsup:["NamedOp","lim&thinsp;sup"],ln:"NamedFn",log:"NamedFn",max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:"NamedFn",sin:"NamedFn",sinh:"NamedFn",sup:"NamedOp",tan:"NamedFn",tanh:"NamedFn",limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","2015"],underline:["UnderOver","2015"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",overunderset:"Overunderset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:["Macro","\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"LeftRight",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",lengths_js_1$5.MATHSPACE.thinmathspace],":":["Spacer",lengths_js_1$5.MATHSPACE.mediummathspace],">":["Spacer",lengths_js_1$5.MATHSPACE.mediummathspace],";":["Spacer",lengths_js_1$5.MATHSPACE.thickmathspace],"!":["Spacer",lengths_js_1$5.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",lengths_js_1$5.MATHSPACE.thinmathspace],negthinspace:["Spacer",lengths_js_1$5.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],nonscript:"Nonscript",big:["MakeBig",MmlNode_js_1$d.TEXCLASS.ORD,.85],Big:["MakeBig",MmlNode_js_1$d.TEXCLASS.ORD,1.15],bigg:["MakeBig",MmlNode_js_1$d.TEXCLASS.ORD,1.45],Bigg:["MakeBig",MmlNode_js_1$d.TEXCLASS.ORD,1.75],bigl:["MakeBig",MmlNode_js_1$d.TEXCLASS.OPEN,.85],Bigl:["MakeBig",MmlNode_js_1$d.TEXCLASS.OPEN,1.15],biggl:["MakeBig",MmlNode_js_1$d.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",MmlNode_js_1$d.TEXCLASS.OPEN,1.75],bigr:["MakeBig",MmlNode_js_1$d.TEXCLASS.CLOSE,.85],Bigr:["MakeBig",MmlNode_js_1$d.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",MmlNode_js_1$d.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",MmlNode_js_1$d.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",MmlNode_js_1$d.TEXCLASS.REL,.85],Bigm:["MakeBig",MmlNode_js_1$d.TEXCLASS.REL,1.15],biggm:["MakeBig",MmlNode_js_1$d.TEXCLASS.REL,1.45],Biggm:["MakeBig",MmlNode_js_1$d.TEXCLASS.REL,1.75],mathord:["TeXAtom",MmlNode_js_1$d.TEXCLASS.ORD],mathop:["TeXAtom",MmlNode_js_1$d.TEXCLASS.OP],mathopen:["TeXAtom",MmlNode_js_1$d.TEXCLASS.OPEN],mathclose:["TeXAtom",MmlNode_js_1$d.TEXCLASS.CLOSE],mathbin:["TeXAtom",MmlNode_js_1$d.TEXCLASS.BIN],mathrel:["TeXAtom",MmlNode_js_1$d.TEXCLASS.REL],mathpunct:["TeXAtom",MmlNode_js_1$d.TEXCLASS.PUNCT],mathinner:["TeXAtom",MmlNode_js_1$d.TEXCLASS.INNER],vcenter:["TeXAtom",MmlNode_js_1$d.TEXCLASS.VCENTER],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",boxed:["Macro","\\fbox{$\\displaystyle{#1}$}",1],framebox:"FrameBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,!0],eqalign:["Matrix",null,null,"right left",(0,lengths_js_1$5.em)(lengths_js_1$5.MATHSPACE.thickmathspace),".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:["CrLaTeX",!0],hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",(0,lengths_js_1$5.em)(lengths_js_1$5.MATHSPACE.thickmathspace),".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",(0,lengths_js_1$5.em)(lengths_js_1$5.MATHSPACE.thickmathspace),".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde"," ":"Tilde",begin:"BeginEnd",end:"BeginEnd",label:"HandleLabel",ref:"HandleRef",nonumber:"HandleNoTag",mathchoice:"MathChoice",mmlToken:"MmlToken"},BaseMethods_js_1$6.default),new sm$4.EnvironmentMap("environment",ParseMethods_js_1$7.default.environment,{array:["AlignedArray"],equation:["Equation",null,!0],eqnarray:["EqnArray",null,!0,!0,"rcl",ParseUtil_js_1$b.default.cols(0,lengths_js_1$5.MATHSPACE.thickmathspace),".5em"]},BaseMethods_js_1$6.default),new sm$4.CharacterMap("not_remap",null,{"←":"↚","→":"↛","↔":"↮","⇐":"⇍","⇒":"⇏","⇔":"⇎","∈":"∉","∋":"∌","∣":"∤","∥":"∦","∼":"≁","~":"≁","≃":"≄","≅":"≇","≈":"≉","≍":"≭","=":"≠","≡":"≢","<":"≮",">":"≯","≤":"≰","≥":"≱","≲":"≴","≳":"≵","≶":"≸","≷":"≹","≺":"⊀","≻":"⊁","⊂":"⊄","⊃":"⊅","⊆":"⊈","⊇":"⊉","⊢":"⊬","⊨":"⊭","⊩":"⊮","⊫":"⊯","≼":"⋠","≽":"⋡","⊑":"⋢","⊒":"⋣","⊲":"⋪","⊳":"⋫","⊴":"⋬","⊵":"⋭","∃":"∄"});var __extends$1e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__createBinding$a=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$a=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$a=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$a(e,t,r);return __setModuleDefault$a(e,t),e},__values$v=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$y=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_a$9;Object.defineProperty(BaseConfiguration,"__esModule",{value:!0}),BaseConfiguration.BaseConfiguration=BaseConfiguration.BaseTags=BaseConfiguration.Other=void 0;var Configuration_js_1$k=Configuration,MapHandler_js_1=MapHandler,TexError_js_1$f=__importDefault$y(TexError$1),NodeUtil_js_1$9=__importDefault$y(NodeUtil$1),SymbolMap_js_1$g=SymbolMap,bitem=__importStar$a(BaseItems),Tags_js_1$5=Tags,OperatorDictionary_js_1=OperatorDictionary;function Other(t,e){var r=t.stack.env.font?{mathvariant:t.stack.env.font}:{},n=MapHandler_js_1.MapHandler.getMap("remap").lookup(e),o=(0,OperatorDictionary_js_1.getRange)(e),i=o?o[3]:"mo",a=t.create("token",i,r,n?n.char:e);o[4]&&a.attributes.set("mathvariant",o[4]),"mo"===i&&(NodeUtil_js_1$9.default.setProperty(a,"fixStretchy",!0),t.configuration.addNode("fixStretchy",a)),t.Push(a)}function csUndefined(t,e){throw new TexError_js_1$f.default("UndefinedControlSequence","Undefined control sequence %1","\\"+e)}function envUndefined(t,e){throw new TexError_js_1$f.default("UnknownEnv","Unknown environment '%1'",e)}function filterNonscript(t){var e,r,n=t.data;try{for(var o=__values$v(n.getList("nonscript")),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.attributes.get("scriptlevel")>0){var s=a.parent;if(s.childNodes.splice(s.childIndex(a),1),n.removeFromList(a.kind,[a]),a.isKind("mrow")){var l=a.childNodes[0];n.removeFromList("mstyle",[l]),n.removeFromList("mspace",l.childNodes[0].childNodes)}}else a.isKind("mrow")&&(a.parent.replaceChild(a.childNodes[0],a),n.removeFromList("mrow",[a]))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}new SymbolMap_js_1$g.CharacterMap("remap",null,{"-":"−","*":"∗","`":"‘"}),BaseConfiguration.Other=Other;var BaseTags=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1e(e,t),e}(Tags_js_1$5.AbstractTags);BaseConfiguration.BaseTags=BaseTags,BaseConfiguration.BaseConfiguration=Configuration_js_1$k.Configuration.create("base",{handler:{character:["command","special","letter","digit"],delimiter:["delimiter"],macro:["delimiter","macros","mathchar0mi","mathchar0mo","mathchar7"],environment:["environment"]},fallback:{character:Other,macro:csUndefined,environment:envUndefined},items:(_a$9={},_a$9[bitem.StartItem.prototype.kind]=bitem.StartItem,_a$9[bitem.StopItem.prototype.kind]=bitem.StopItem,_a$9[bitem.OpenItem.prototype.kind]=bitem.OpenItem,_a$9[bitem.CloseItem.prototype.kind]=bitem.CloseItem,_a$9[bitem.PrimeItem.prototype.kind]=bitem.PrimeItem,_a$9[bitem.SubsupItem.prototype.kind]=bitem.SubsupItem,_a$9[bitem.OverItem.prototype.kind]=bitem.OverItem,_a$9[bitem.LeftItem.prototype.kind]=bitem.LeftItem,_a$9[bitem.Middle.prototype.kind]=bitem.Middle,_a$9[bitem.RightItem.prototype.kind]=bitem.RightItem,_a$9[bitem.BeginItem.prototype.kind]=bitem.BeginItem,_a$9[bitem.EndItem.prototype.kind]=bitem.EndItem,_a$9[bitem.StyleItem.prototype.kind]=bitem.StyleItem,_a$9[bitem.PositionItem.prototype.kind]=bitem.PositionItem,_a$9[bitem.CellItem.prototype.kind]=bitem.CellItem,_a$9[bitem.MmlItem.prototype.kind]=bitem.MmlItem,_a$9[bitem.FnItem.prototype.kind]=bitem.FnItem,_a$9[bitem.NotItem.prototype.kind]=bitem.NotItem,_a$9[bitem.NonscriptItem.prototype.kind]=bitem.NonscriptItem,_a$9[bitem.DotsItem.prototype.kind]=bitem.DotsItem,_a$9[bitem.ArrayItem.prototype.kind]=bitem.ArrayItem,_a$9[bitem.EqnArrayItem.prototype.kind]=bitem.EqnArrayItem,_a$9[bitem.EquationItem.prototype.kind]=bitem.EquationItem,_a$9),options:{maxMacros:1e3,baseURL:"undefined"==typeof document||0===document.getElementsByTagName("base").length?"":String(document.location).replace(/#.*$/,"")},tags:{base:BaseTags},postprocessors:[[filterNonscript,-4]]});var __extends$1d=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$9=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$9=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$9.apply(this,arguments)},__read$B=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__importDefault$x=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tex$2,"__esModule",{value:!0});var TeX_1=tex$2.TeX=void 0,InputJax_js_1=InputJax,Options_js_1$7=Options,FindTeX_js_1=FindTeX$1,FilterUtil_js_1=__importDefault$x(FilterUtil$1),NodeUtil_js_1$8=__importDefault$x(NodeUtil$1),TexParser_js_1$8=__importDefault$x(TexParser$1),TexError_js_1$e=__importDefault$x(TexError$1),ParseOptions_js_1$1=__importDefault$x(ParseOptions$1),Tags_js_1$4=Tags,Configuration_js_1$j=Configuration,TeX=function(t){function e(r){void 0===r&&(r={});var n=this,o=__read$B((0,Options_js_1$7.separateOptions)(r,e.OPTIONS,FindTeX_js_1.FindTeX.OPTIONS),3),i=o[0],a=o[1],s=o[2];(n=t.call(this,a)||this).findTeX=n.options.FindTeX||new FindTeX_js_1.FindTeX(s);var l=n.options.packages,c=n.configuration=e.configure(l),u=n._parseOptions=new ParseOptions_js_1$1.default(c,[n.options,Tags_js_1$4.TagsFactory.OPTIONS]);return(0,Options_js_1$7.userOptions)(u.options,i),c.config(n),e.tags(u,c),n.postFilters.add(FilterUtil_js_1.default.cleanSubSup,-6),n.postFilters.add(FilterUtil_js_1.default.setInherited,-5),n.postFilters.add(FilterUtil_js_1.default.moveLimits,-4),n.postFilters.add(FilterUtil_js_1.default.cleanStretchy,-3),n.postFilters.add(FilterUtil_js_1.default.cleanAttributes,-2),n.postFilters.add(FilterUtil_js_1.default.combineRelations,-1),n}return __extends$1d(e,t),e.configure=function(t){var e=new Configuration_js_1$j.ParserConfiguration(t,["tex"]);return e.init(),e},e.tags=function(t,e){Tags_js_1$4.TagsFactory.addTags(e.tags),Tags_js_1$4.TagsFactory.setDefault(t.options.tags),t.tags=Tags_js_1$4.TagsFactory.getDefault(),t.tags.configuration=t},e.prototype.setMmlFactory=function(e){t.prototype.setMmlFactory.call(this,e),this._parseOptions.nodeFactory.setMmlFactory(e)},Object.defineProperty(e.prototype,"parseOptions",{get:function(){return this._parseOptions},enumerable:!1,configurable:!0}),e.prototype.reset=function(t){void 0===t&&(t=0),this.parseOptions.tags.reset(t)},e.prototype.compile=function(t,e){this.parseOptions.clear(),this.executeFilters(this.preFilters,t,e,this.parseOptions);var r,n,o=t.display;this.latex=t.math,this.parseOptions.tags.startEquation(t);try{var i=new TexParser_js_1$8.default(this.latex,{display:o,isInner:!1},this.parseOptions);r=i.mml(),n=i.stack.global}catch(t){if(!(t instanceof TexError_js_1$e.default))throw t;this.parseOptions.error=!0,r=this.options.formatError(this,t)}return r=this.parseOptions.nodeFactory.create("node","math",[r]),(null==n?void 0:n.indentalign)&&NodeUtil_js_1$8.default.setAttribute(r,"indentalign",n.indentalign),o&&NodeUtil_js_1$8.default.setAttribute(r,"display","block"),this.parseOptions.tags.finishEquation(t),this.parseOptions.root=r,this.executeFilters(this.postFilters,t,e,this.parseOptions),this.mathNode=this.parseOptions.root,this.mathNode},e.prototype.findMath=function(t){return this.findTeX.findMath(t)},e.prototype.formatError=function(t){var e=t.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",e,t.id,this.latex)},e.NAME="TeX",e.OPTIONS=__assign$9(__assign$9({},InputJax_js_1.AbstractInputJax.OPTIONS),{FindTeX:null,packages:["base"],digits:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,maxBuffer:5120,formatError:function(t,e){return t.formatError(e)}}),e}(InputJax_js_1.AbstractInputJax);TeX_1=tex$2.TeX=TeX;var chtml={},OutputJax$1={},OutputJax={};Object.defineProperty(OutputJax,"__esModule",{value:!0}),OutputJax.AbstractOutputJax=void 0;var Options_js_1$6=Options,FunctionList_js_1=FunctionList$1,AbstractOutputJax=function(){function t(t){void 0===t&&(t={}),this.adaptor=null;var e=this.constructor;this.options=(0,Options_js_1$6.userOptions)((0,Options_js_1$6.defaultOptions)({},e.OPTIONS),t),this.postFilters=new FunctionList_js_1.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<arguments.length;e++)t[e]=arguments[e]},t.prototype.getMetrics=function(t){},t.prototype.styleSheet=function(t){return null},t.prototype.pageElements=function(t){return null},t.prototype.executeFilters=function(t,e,r,n){var o={math:e,document:r,data:n};return t.execute(o),o.data},t.NAME="generic",t.OPTIONS={},t}();OutputJax.AbstractOutputJax=AbstractOutputJax;var Styles$1={},__values$u=commonjsGlobal&&commonjsGlobal.__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.")},__read$A=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$i=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(Styles$1,"__esModule",{value:!0}),Styles$1.Styles=void 0;var TRBL=["top","right","bottom","left"],WSC=["width","style","color"];function splitSpaces(t){for(var e=t.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),r=[];e.length>1;)e.shift(),r.push(e.shift());return r}function splitTRBL(t){var e,r,n=splitSpaces(this.styles[t]);0===n.length&&n.push(""),1===n.length&&n.push(n[0]),2===n.length&&n.push(n[0]),3===n.length&&n.push(n[1]);try{for(var o=__values$u(Styles.connect[t].children),i=o.next();!i.done;i=o.next()){var a=i.value;this.setStyle(this.childName(t,a),n.shift())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}function combineTRBL(t){var e,r,n=Styles.connect[t].children,o=[];try{for(var i=__values$u(n),a=i.next();!a.done;a=i.next()){var s=a.value,l=this.styles[t+"-"+s];if(!l)return void delete this.styles[t];o.push(l)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}o[3]===o[1]&&(o.pop(),o[2]===o[0]&&(o.pop(),o[1]===o[0]&&o.pop())),this.styles[t]=o.join(" ")}function splitSame(t){var e,r;try{for(var n=__values$u(Styles.connect[t].children),o=n.next();!o.done;o=n.next()){var i=o.value;this.setStyle(this.childName(t,i),this.styles[t])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}function combineSame(t){var e,r,n=__spreadArray$i([],__read$A(Styles.connect[t].children),!1),o=this.styles[this.childName(t,n.shift())];try{for(var i=__values$u(n),a=i.next();!a.done;a=i.next()){var s=a.value;if(this.styles[this.childName(t,s)]!==o)return void delete this.styles[t]}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}this.styles[t]=o}var BORDER={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function splitWSC(t){var e,r,n,o,i={width:"",style:"",color:""};try{for(var a=__values$u(splitSpaces(this.styles[t])),s=a.next();!s.done;s=a.next()){var l=s.value;l.match(BORDER.width)&&""===i.width?i.width=l:l.match(BORDER.style)&&""===i.style?i.style=l:i.color=l}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}try{for(var c=__values$u(Styles.connect[t].children),u=c.next();!u.done;u=c.next()){var d=u.value;this.setStyle(this.childName(t,d),i[d])}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}}function combineWSC(t){var e,r,n=[];try{for(var o=__values$u(Styles.connect[t].children),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.styles[this.childName(t,a)];s&&n.push(s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}n.length?this.styles[t]=n.join(" "):delete this.styles[t]}var FONT={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 splitFont(t){var e,r,n,o,i=splitSpaces(this.styles[t]),a={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};try{for(var s=__values$u(i),l=s.next();!l.done;l=s.next()){var c=l.value;a.family=c;try{for(var u=(n=void 0,__values$u(Object.keys(FONT))),d=u.next();!d.done;d=u.next()){var p=d.value;if((Array.isArray(a[p])||""===a[p])&&c.match(FONT[p]))if("size"===p){var m=__read$A(c.split(/\//),2),h=m[0],f=m[1];a[p]=h,f&&(a["line-height"]=f)}else""===a.size&&(Array.isArray(a[p])?a[p].push(c):a[p]=c)}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}saveFontParts(t,a),delete this.styles[t]}function saveFontParts(t,e){var r,n;try{for(var o=__values$u(Styles.connect[t].children),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.childName(t,a);if(Array.isArray(e[a])){var l=e[a];l.length&&(this.styles[s]=l.join(" "))}else""!==e[a]&&(this.styles[s]=e[a])}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}function combineFont(t){}var Styles=function(){function t(t){void 0===t&&(t=""),this.parse(t)}return Object.defineProperty(t.prototype,"cssText",{get:function(){var t,e,r=[];try{for(var n=__values$u(Object.keys(this.styles)),o=n.next();!o.done;o=n.next()){var i=o.value,a=this.parentName(i);this.styles[a]||r.push(i+": "+this.styles[i]+";")}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r.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 r,n,o=this.parentName(e);try{for(var i=__values$u(t.connect[e].children),a=i.next();!a.done;a=i.next()){var s=a.value,l=this.childName(o,s);t.connect[l].combine.call(this,l)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.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 n=__read$A(r.splice(0,3),3),o=n[0],i=n[1],a=n[2];if(o.match(/[^\s\n]/))return;this.set(i,a)}},t.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},t.connect={padding:{children:TRBL,split:splitTRBL,combine:combineTRBL},border:{children:TRBL,split:splitSame,combine:combineSame},"border-top":{children:WSC,split:splitWSC,combine:combineWSC},"border-right":{children:WSC,split:splitWSC,combine:combineWSC},"border-bottom":{children:WSC,split:splitWSC,combine:combineWSC},"border-left":{children:WSC,split:splitWSC,combine:combineWSC},"border-width":{children:TRBL,split:splitTRBL,combine:null},"border-style":{children:TRBL,split:splitTRBL,combine:null},"border-color":{children:TRBL,split:splitTRBL,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:splitFont,combine:combineFont}},t}();Styles$1.Styles=Styles;var StyleList={},__values$t=commonjsGlobal&&commonjsGlobal.__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(StyleList,"__esModule",{value:!0}),StyleList.CssStyles=void 0;var CssStyles=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,r;if(t)try{for(var n=__values$t(Object.keys(t)),o=n.next();!o.done;o=n.next()){var i=o.value;this.styles[i]||(this.styles[i]={}),Object.assign(this.styles[i],t[i])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.removeStyles=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var o=__values$t(r),i=o.next();!i.done;i=o.next()){var a=i.value;delete this.styles[a]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},t.prototype.clear=function(){this.styles={}},t.prototype.getStyleString=function(){return this.getStyleRules().join("\n\n")},t.prototype.getStyleRules=function(){var t,e,r=Object.keys(this.styles),n=new Array(r.length),o=0;try{for(var i=__values$t(r),a=i.next();!a.done;a=i.next()){var s=a.value;n[o++]=s+" {\n"+this.getStyleDefString(this.styles[s])+"\n}"}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return n},t.prototype.getStyleDefString=function(t){var e,r,n=Object.keys(t),o=new Array(n.length),i=0;try{for(var a=__values$t(n),s=a.next();!s.done;s=a.next()){var l=s.value;o[i++]=" "+l+": "+t[l]+";"}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return o.join("\n")},t}();StyleList.CssStyles=CssStyles;var __extends$1c=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$8=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$8=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$8.apply(this,arguments)},__read$z=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$s=commonjsGlobal&&commonjsGlobal.__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(OutputJax$1,"__esModule",{value:!0}),OutputJax$1.CommonOutputJax=void 0;var OutputJax_js_1$1=OutputJax,MathItem_js_1$2=MathItem,Options_js_1$5=Options,lengths_js_1$4=lengths,Styles_js_1$1=Styles$1,StyleList_js_1$1=StyleList,CommonOutputJax=function(t){function e(e,r,n){void 0===e&&(e=null),void 0===r&&(r=null),void 0===n&&(n=null);var o=this,i=__read$z((0,Options_js_1$5.separateOptions)(e,n.OPTIONS),2),a=i[0],s=i[1];return(o=t.call(this,a)||this).factory=o.options.wrapperFactory||new r,o.factory.jax=o,o.cssStyles=o.options.cssStyles||new StyleList_js_1$1.CssStyles,o.font=o.options.font||new n(s),o.unknownCache=new Map,o}return __extends$1c(e,t),e.prototype.typeset=function(t,e){this.setDocument(e);var r=this.createNode();return this.toDOM(t,r,e),r},e.prototype.createNode=function(){var t=this.constructor.NAME;return this.html("mjx-container",{class:"MathJax",jax:t})},e.prototype.setScale=function(t){var e=this.math.metrics.scale*this.options.scale;1!==e&&this.adaptor.setStyle(t,"fontSize",(0,lengths_js_1$4.percent)(e))},e.prototype.toDOM=function(t,e,r){void 0===r&&(r=null),this.setDocument(r),this.math=t,this.pxPerEm=t.metrics.ex/this.font.params.x_height,t.root.setTeXclass(null),this.setScale(e),this.nodeMap=new Map,this.container=e,this.processMath(t.root,e),this.nodeMap=null,this.executeFilters(this.postFilters,t,r,e)},e.prototype.getBBox=function(t,e){this.setDocument(e),this.math=t,t.root.setTeXclass(null),this.nodeMap=new Map;var r=this.factory.wrap(t.root).getOuterBBox();return this.nodeMap=null,r},e.prototype.getMetrics=function(t){var e,r;this.setDocument(t);var n=this.adaptor,o=this.getMetricMaps(t);try{for(var i=__values$s(t.math),a=i.next();!a.done;a=i.next()){var s=a.value,l=n.parent(s.start.node);if(s.state()<MathItem_js_1$2.STATE.METRICS&&l){var c=o[s.display?1:0].get(l),u=c.em,d=c.ex,p=c.containerWidth,m=c.lineWidth,h=c.scale,f=c.family;s.setMetrics(u,d,p,m,h),this.options.mtextInheritFont&&(s.outputData.mtextFamily=f),this.options.merrorInheritFont&&(s.outputData.merrorFamily=f),s.state(MathItem_js_1$2.STATE.METRICS)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},e.prototype.getMetricsFor=function(t,e){var r=this.options.mtextInheritFont||this.options.merrorInheritFont,n=this.getTestElement(t,e),o=this.measureMetrics(n,r);return this.adaptor.remove(n),o},e.prototype.getMetricMaps=function(t){var e,r,n,o,i,a,s,l,c,u,d=this.adaptor,p=[new Map,new Map];try{for(var m=__values$s(t.math),h=m.next();!h.done;h=m.next()){var f=h.value;if((E=d.parent(f.start.node))&&f.state()<MathItem_js_1$2.STATE.METRICS){var _=p[f.display?1:0];_.has(E)||_.set(E,this.getTestElement(E,f.display))}}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=m.return)&&r.call(m)}finally{if(e)throw e.error}}var g=this.options.mtextInheritFont||this.options.merrorInheritFont,y=[new Map,new Map];try{for(var b=__values$s(y.keys()),v=b.next();!v.done;v=b.next()){var x=v.value;try{for(var M=(i=void 0,__values$s(p[x].keys())),S=M.next();!S.done;S=M.next()){var E=S.value;y[x].set(E,this.measureMetrics(p[x].get(E),g))}}catch(t){i={error:t}}finally{try{S&&!S.done&&(a=M.return)&&a.call(M)}finally{if(i)throw i.error}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(o=b.return)&&o.call(b)}finally{if(n)throw n.error}}try{for(var C=__values$s(y.keys()),$=C.next();!$.done;$=C.next()){x=$.value;try{for(var O=(c=void 0,__values$s(p[x].values())),A=O.next();!A.done;A=O.next()){E=A.value;d.remove(E)}}catch(t){c={error:t}}finally{try{A&&!A.done&&(u=O.return)&&u.call(O)}finally{if(c)throw c.error}}}}catch(t){s={error:t}}finally{try{$&&!$.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}return y},e.prototype.getTestElement=function(t,e){var r=this.adaptor;if(!this.testInline){this.testInline=this.html("mjx-test",{style:{display:"inline-block",width:"100%","font-style":"normal","font-weight":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-transform":"none","letter-spacing":"normal","word-spacing":"normal",overflow:"hidden",height:"1px","margin-right":"-1px"}},[this.html("mjx-left-box",{style:{display:"inline-block",width:0,float:"left"}}),this.html("mjx-ex-box",{style:{position:"absolute",overflow:"hidden",width:"1px",height:"60ex"}}),this.html("mjx-right-box",{style:{display:"inline-block",width:0,float:"right"}})]),this.testDisplay=r.clone(this.testInline),r.setStyle(this.testDisplay,"display","table"),r.setStyle(this.testDisplay,"margin-right",""),r.setStyle(r.firstChild(this.testDisplay),"display","none");var n=r.lastChild(this.testDisplay);r.setStyle(n,"display","table-cell"),r.setStyle(n,"width","10000em"),r.setStyle(n,"float","")}return r.append(t,r.clone(e?this.testDisplay:this.testInline))},e.prototype.measureMetrics=function(t,e){var r=this.adaptor,n=e?r.fontFamily(t):"",o=r.fontSize(t),i=__read$z(r.nodeSize(r.childNode(t,1)),2),a=i[0],s=i[1],l=a?s/60:o*this.options.exFactor;return{em:o,ex:l,containerWidth:a?"table"===r.getStyle(t,"display")?r.nodeSize(r.lastChild(t))[0]-1:r.nodeBBox(r.lastChild(t)).left-r.nodeBBox(r.firstChild(t)).left-2:1e6,lineWidth:1e6,scale:Math.max(this.options.minScale,this.options.matchFontHeight?l/this.font.params.x_height/o:1),family:n}},e.prototype.styleSheet=function(t){var e,r;if(this.setDocument(t),this.cssStyles.clear(),this.cssStyles.addStyles(this.constructor.commonStyles),"getStyles"in t)try{for(var n=__values$s(t.getStyles()),o=n.next();!o.done;o=n.next()){var i=o.value;this.cssStyles.addStyles(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this.addWrapperStyles(this.cssStyles),this.addFontStyles(this.cssStyles),this.html("style",{id:"MJX-styles"},[this.text("\n"+this.cssStyles.cssText+"\n")])},e.prototype.addFontStyles=function(t){t.addStyles(this.font.styles)},e.prototype.addWrapperStyles=function(t){var e,r;try{for(var n=__values$s(this.factory.getKinds()),o=n.next();!o.done;o=n.next()){var i=o.value;this.addClassStyles(this.factory.getNodeClass(i),t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},e.prototype.addClassStyles=function(t,e){e.addStyles(t.styles)},e.prototype.setDocument=function(t){t&&(this.document=t,this.adaptor.document=t.document)},e.prototype.html=function(t,e,r,n){return void 0===e&&(e={}),void 0===r&&(r=[]),this.adaptor.node(t,e,r,n)},e.prototype.text=function(t){return this.adaptor.text(t)},e.prototype.fixed=function(t,e){return void 0===e&&(e=3),Math.abs(t)<6e-4?"0":t.toFixed(e).replace(/\.?0+$/,"")},e.prototype.measureText=function(t,e,r){void 0===r&&(r=["",!1,!1]);var n=this.unknownText(t,e);if("-explicitFont"===e){var o=this.cssFontStyles(r);this.adaptor.setAttributes(n,{style:o})}return this.measureTextNodeWithCache(n,t,e,r)},e.prototype.measureTextNodeWithCache=function(t,e,r,n){void 0===n&&(n=["",!1,!1]),"-explicitFont"===r&&(r=[n[0],n[1]?"T":"F",n[2]?"T":"F",""].join("-")),this.unknownCache.has(r)||this.unknownCache.set(r,new Map);var o=this.unknownCache.get(r),i=o.get(e);if(i)return i;var a=this.measureTextNode(t);return o.set(e,a),a},e.prototype.measureXMLnode=function(t){var e=this.adaptor,r=this.html("mjx-xml-block",{style:{display:"inline-block"}},[e.clone(t)]),n=this.html("mjx-baseline",{style:{display:"inline-block",width:0,height:0}}),o=this.html("mjx-measure-xml",{style:{position:"absolute",display:"inline-block","font-family":"initial","line-height":"normal"}},[n,r]);e.append(e.parent(this.math.start.node),this.container),e.append(this.container,o);var i=this.math.metrics.em*this.math.metrics.scale,a=e.nodeBBox(r),s=a.left,l=a.right,c=a.bottom,u=a.top,d=(l-s)/i,p=(e.nodeBBox(n).top-u)/i,m=(c-u)/i-p;return e.remove(this.container),e.remove(o),{w:d,h:p,d:m}},e.prototype.cssFontStyles=function(t,e){void 0===e&&(e={});var r=__read$z(t,3),n=r[0],o=r[1],i=r[2];return e["font-family"]=this.font.getFamily(n),o&&(e["font-style"]="italic"),i&&(e["font-weight"]="bold"),e},e.prototype.getFontData=function(t){return t||(t=new Styles_js_1$1.Styles),[this.font.getFamily(t.get("font-family")),"italic"===t.get("font-style"),"bold"===t.get("font-weight")]},e.NAME="Common",e.OPTIONS=__assign$8(__assign$8({},OutputJax_js_1$1.AbstractOutputJax.OPTIONS),{scale:1,minScale:.5,mtextInheritFont:!1,merrorInheritFont:!1,mtextFont:"",merrorFont:"serif",mathmlSpacing:!1,skipAttributes:{},exFactor:.5,displayAlign:"center",displayIndent:"0",wrapperFactory:null,font:null,cssStyles:null}),e.commonStyles={},e}(OutputJax_js_1$1.AbstractOutputJax);OutputJax$1.CommonOutputJax=CommonOutputJax;var WrapperFactory$2={},WrapperFactory$1={},WrapperFactory={},__extends$1b=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$y=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$h=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(WrapperFactory,"__esModule",{value:!0}),WrapperFactory.AbstractWrapperFactory=void 0;var Factory_js_1=Factory,AbstractWrapperFactory=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1b(e,t),e.prototype.wrap=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.create.apply(this,__spreadArray$h([t.kind,t],__read$y(e),!1))},e}(Factory_js_1.AbstractFactory);WrapperFactory.AbstractWrapperFactory=AbstractWrapperFactory;var __extends$1a=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(WrapperFactory$1,"__esModule",{value:!0}),WrapperFactory$1.CommonWrapperFactory=void 0;var WrapperFactory_js_1$2=WrapperFactory,CommonWrapperFactory=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.jax=null,e}return __extends$1a(e,t),Object.defineProperty(e.prototype,"Wrappers",{get:function(){return this.node},enumerable:!1,configurable:!0}),e.defaultNodes={},e}(WrapperFactory_js_1$2.AbstractWrapperFactory);WrapperFactory$1.CommonWrapperFactory=CommonWrapperFactory;var Wrappers={},Wrapper$2={},Wrapper$1={},Wrapper={};Object.defineProperty(Wrapper,"__esModule",{value:!0}),Wrapper.AbstractWrapper=void 0;var AbstractWrapper=function(){function t(t,e){this.factory=t,this.node=e}return Object.defineProperty(t.prototype,"kind",{get:function(){return this.node.kind},enumerable:!1,configurable:!0}),t.prototype.wrap=function(t){return this.factory.wrap(t)},t}();Wrapper.AbstractWrapper=AbstractWrapper;var BBox$1={};Object.defineProperty(BBox$1,"__esModule",{value:!0}),BBox$1.BBox=void 0;var lengths_js_1$3=lengths,BBox=function(){function t(t){void 0===t&&(t={w:0,h:-lengths_js_1$3.BIGDIMEN,d:-lengths_js_1$3.BIGDIMEN}),this.w=t.w||0,this.h="h"in t?t.h:-lengths_js_1$3.BIGDIMEN,this.d="d"in t?t.d:-lengths_js_1$3.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=-lengths_js_1$3.BIGDIMEN,this},t.prototype.clean=function(){this.w===-lengths_js_1$3.BIGDIMEN&&(this.w=0),this.h===-lengths_js_1$3.BIGDIMEN&&(this.h=0),this.d===-lengths_js_1$3.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,a=n*t.d-r;o>this.w&&(this.w=o),i>this.h&&(this.h=i),a>this.d&&(this.d=a)},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}();BBox$1.BBox=BBox;var FontData$2={},__assign$7=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$7=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$7.apply(this,arguments)},__read$x=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$g=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$r=commonjsGlobal&&commonjsGlobal.__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(FontData$2,"__esModule",{value:!0}),FontData$2.FontData=FontData$2.NOSTRETCH=FontData$2.H=FontData$2.V=void 0;var Options_js_1$4=Options;FontData$2.V=1,FontData$2.H=2,FontData$2.NOSTRETCH={dir:0};var FontData$1=function(){function t(t){var e,r,n,o;void 0===t&&(t=null),this.variant={},this.delimiters={},this.cssFontMap={},this.remapChars={},this.skewIcFactor=.75;var i=this.constructor;this.options=(0,Options_js_1$4.userOptions)((0,Options_js_1$4.defaultOptions)({},i.OPTIONS),t),this.params=__assign$7({},i.defaultParams),this.sizeVariants=__spreadArray$g([],__read$x(i.defaultSizeVariants),!1),this.stretchVariants=__spreadArray$g([],__read$x(i.defaultStretchVariants),!1),this.cssFontMap=__assign$7({},i.defaultCssFonts);try{for(var a=__values$r(Object.keys(this.cssFontMap)),s=a.next();!s.done;s=a.next()){var l=s.value;"unknown"===this.cssFontMap[l][0]&&(this.cssFontMap[l][0]=this.options.unknownFamily)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}this.cssFamilyPrefix=i.defaultCssFamilyPrefix,this.createVariants(i.defaultVariants),this.defineDelimiters(i.defaultDelimiters);try{for(var c=__values$r(Object.keys(i.defaultChars)),u=c.next();!u.done;u=c.next()){var d=u.value;this.defineChars(d,i.defaultChars[d])}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.defineRemap("accent",i.defaultAccentMap),this.defineRemap("mo",i.defaultMoMap),this.defineRemap("mn",i.defaultMnMap)}return t.charOptions=function(t,e){var r=t[e];return 3===r.length&&(r[3]={}),r[3]},Object.defineProperty(t.prototype,"styles",{get:function(){return this._styles},set:function(t){this._styles=t},enumerable:!1,configurable:!0}),t.prototype.createVariant=function(t,e,r){void 0===e&&(e=null),void 0===r&&(r=null);var n={linked:[],chars:e?Object.create(this.variant[e].chars):{}};r&&this.variant[r]&&(Object.assign(n.chars,this.variant[r].chars),this.variant[r].linked.push(n.chars),n.chars=Object.create(n.chars)),this.remapSmpChars(n.chars,t),this.variant[t]=n},t.prototype.remapSmpChars=function(t,e){var r,n,o,i,a=this.constructor;if(a.VariantSmp[e]){var s=a.SmpRemap,l=[null,null,a.SmpRemapGreekU,a.SmpRemapGreekL];try{for(var c=__values$r(a.SmpRanges),u=c.next();!u.done;u=c.next()){var d=__read$x(u.value,3),p=d[0],m=d[1],h=d[2],f=a.VariantSmp[e][p];if(f){for(var _=m;_<=h;_++)if(930!==_){var g=f+_-m;t[_]=this.smpChar(s[g]||g)}if(l[p])try{for(var y=(o=void 0,__values$r(Object.keys(l[p]).map((function(t){return parseInt(t)})))),b=y.next();!b.done;b=y.next()){t[_=b.value]=this.smpChar(f+l[p][_])}}catch(t){o={error:t}}finally{try{b&&!b.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}"bold"===e&&(t[988]=this.smpChar(120778),t[989]=this.smpChar(120779))},t.prototype.smpChar=function(t){return[,,,{smp:t}]},t.prototype.createVariants=function(t){var e,r;try{for(var n=__values$r(t),o=n.next();!o.done;o=n.next()){var i=o.value;this.createVariant(i[0],i[1],i[2])}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.defineChars=function(t,e){var r,n,o=this.variant[t];Object.assign(o.chars,e);try{for(var i=__values$r(o.linked),a=i.next();!a.done;a=i.next()){var s=a.value;Object.assign(s,e)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.defineDelimiters=function(t){Object.assign(this.delimiters,t)},t.prototype.defineRemap=function(t,e){this.remapChars.hasOwnProperty(t)||(this.remapChars[t]={}),Object.assign(this.remapChars[t],e)},t.prototype.getDelimiter=function(t){return this.delimiters[t]},t.prototype.getSizeVariant=function(t,e){return this.delimiters[t].variants&&(e=this.delimiters[t].variants[e]),this.sizeVariants[e]},t.prototype.getStretchVariant=function(t,e){return this.stretchVariants[this.delimiters[t].stretchv?this.delimiters[t].stretchv[e]:0]},t.prototype.getChar=function(t,e){return this.variant[t].chars[e]},t.prototype.getVariant=function(t){return this.variant[t]},t.prototype.getCssFont=function(t){return this.cssFontMap[t]||["serif",!1,!1]},t.prototype.getFamily=function(t){return this.cssFamilyPrefix?this.cssFamilyPrefix+", "+t:t},t.prototype.getRemappedChar=function(t,e){return(this.remapChars[t]||{})[e]},t.OPTIONS={unknownFamily:"serif"},t.JAX="common",t.NAME="",t.defaultVariants=[["normal"],["bold","normal"],["italic","normal"],["bold-italic","italic","bold"],["double-struck","bold"],["fraktur","normal"],["bold-fraktur","bold","fraktur"],["script","italic"],["bold-script","bold-italic","script"],["sans-serif","normal"],["bold-sans-serif","bold","sans-serif"],["sans-serif-italic","italic","sans-serif"],["sans-serif-bold-italic","bold-italic","bold-sans-serif"],["monospace","normal"]],t.defaultCssFonts={normal:["unknown",!1,!1],bold:["unknown",!1,!0],italic:["unknown",!0,!1],"bold-italic":["unknown",!0,!0],"double-struck":["unknown",!1,!0],fraktur:["unknown",!1,!1],"bold-fraktur":["unknown",!1,!0],script:["cursive",!1,!1],"bold-script":["cursive",!1,!0],"sans-serif":["sans-serif",!1,!1],"bold-sans-serif":["sans-serif",!1,!0],"sans-serif-italic":["sans-serif",!0,!1],"sans-serif-bold-italic":["sans-serif",!0,!0],monospace:["monospace",!1,!1]},t.defaultCssFamilyPrefix="",t.VariantSmp={bold:[119808,119834,120488,120514,120782],italic:[119860,119886,120546,120572],"bold-italic":[119912,119938,120604,120630],script:[119964,119990],"bold-script":[120016,120042],fraktur:[120068,120094],"double-struck":[120120,120146,,,120792],"bold-fraktur":[120172,120198],"sans-serif":[120224,120250,,,120802],"bold-sans-serif":[120276,120302,120662,120688,120812],"sans-serif-italic":[120328,120354],"sans-serif-bold-italic":[120380,120406,120720,120746],monospace:[120432,120458,,,120822]},t.SmpRanges=[[0,65,90],[1,97,122],[2,913,937],[3,945,969],[4,48,57]],t.SmpRemap={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},t.SmpRemapGreekU={8711:25,1012:17},t.SmpRemapGreekL={977:27,981:29,982:31,1008:28,1009:30,1013:26,8706:25},t.defaultAccentMap={768:"ˋ",769:"ˊ",770:"ˆ",771:"˜",772:"ˉ",774:"˘",775:"˙",776:"¨",778:"˚",780:"ˇ",8594:"⃗",8242:"'",8243:"''",8244:"'''",8245:"`",8246:"``",8247:"```",8279:"''''",8400:"↼",8401:"⇀",8406:"←",8417:"↔",8432:"*",8411:"...",8412:"....",8428:"⇁",8429:"↽",8430:"←",8431:"→"},t.defaultMoMap={45:"−"},t.defaultMnMap={45:"−"},t.defaultParams={x_height:.442,quad:1,num1:.676,num2:.394,num3:.444,denom1:.686,denom2:.345,sup1:.413,sup2:.363,sup3:.289,sub1:.15,sub2:.247,sup_drop:.386,sub_drop:.05,delim1:2.39,delim2:1,axis_height:.25,rule_thickness:.06,big_op_spacing1:.111,big_op_spacing2:.167,big_op_spacing3:.2,big_op_spacing4:.6,big_op_spacing5:.1,surd_height:.075,scriptspace:.05,nulldelimiterspace:.12,delimiterfactor:901,delimitershortfall:.3,min_rule_thickness:1.25,separation_factor:1.75,extra_ic:.033},t.defaultDelimiters={},t.defaultChars={},t.defaultSizeVariants=[],t.defaultStretchVariants=[],t}();FontData$2.FontData=FontData$1;var __extends$19=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__createBinding$9=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$9=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$9=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$9(e,t,r);return __setModuleDefault$9(e,t),e},__values$q=commonjsGlobal&&commonjsGlobal.__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.")},__read$w=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$f=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(Wrapper$1,"__esModule",{value:!0}),Wrapper$1.CommonWrapper=void 0;var Wrapper_js_1$n=Wrapper,MmlNode_js_1$c=MmlNode,string_js_1$6=string,LENGTHS$1=__importStar$9(lengths),Styles_js_1=Styles$1,BBox_js_1$5=BBox$1,FontData_js_1$j=FontData$2,SMALLSIZE=2/18;function MathMLSpace(t,e){return t?e<SMALLSIZE?0:SMALLSIZE:e}var CommonWrapper=function(t){function e(e,r,n){void 0===n&&(n=null);var o=t.call(this,e,r)||this;return o.parent=null,o.removedStyles=null,o.styles=null,o.variant="",o.bboxComputed=!1,o.stretch=FontData_js_1$j.NOSTRETCH,o.font=null,o.parent=n,o.font=e.jax.font,o.bbox=BBox_js_1$5.BBox.zero(),o.getStyles(),o.getVariant(),o.getScale(),o.getSpace(),o.childNodes=r.childNodes.map((function(t){var e=o.wrap(t);return e.bbox.pwidth&&(r.notParent||r.isKind("math"))&&(o.bbox.pwidth=BBox_js_1$5.BBox.fullWidth),e})),o}return __extends$19(e,t),Object.defineProperty(e.prototype,"jax",{get:function(){return this.factory.jax},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptor",{get:function(){return this.factory.jax.adaptor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metrics",{get:function(){return this.factory.jax.math.metrics},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fixesPWidth",{get:function(){return!this.node.notParent&&!this.node.isToken},enumerable:!1,configurable:!0}),e.prototype.wrap=function(t,e){void 0===e&&(e=null);var r=this.factory.wrap(t,e||this);return e&&e.childNodes.push(r),this.jax.nodeMap.set(t,r),r},e.prototype.getBBox=function(t){if(void 0===t&&(t=!0),this.bboxComputed)return this.bbox;var e=t?this.bbox:BBox_js_1$5.BBox.zero();return this.computeBBox(e),this.bboxComputed=t,e},e.prototype.getOuterBBox=function(t){var e,r;void 0===t&&(t=!0);var n=this.getBBox(t);if(!this.styles)return n;var o=new BBox_js_1$5.BBox;Object.assign(o,n);try{for(var i=__values$q(BBox_js_1$5.BBox.StyleAdjust),a=i.next();!a.done;a=i.next()){var s=__read$w(a.value,2),l=s[0],c=s[1],u=this.styles.get(l);u&&(o[c]+=this.length2em(u,1,o.rscale))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o},e.prototype.computeBBox=function(t,e){var r,n;void 0===e&&(e=!1),t.empty();try{for(var o=__values$q(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value;t.append(a.getOuterBBox())}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}t.clean(),this.fixesPWidth&&this.setChildPWidths(e)&&this.computeBBox(t,!0)},e.prototype.setChildPWidths=function(t,e,r){var n,o;if(void 0===e&&(e=null),void 0===r&&(r=!0),t)return!1;r&&(this.bbox.pwidth="");var i=!1;try{for(var a=__values$q(this.childNodes),s=a.next();!s.done;s=a.next()){var l=s.value,c=l.getOuterBBox();c.pwidth&&l.setChildPWidths(t,null===e?c.w:e,r)&&(i=!0)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i},e.prototype.invalidateBBox=function(){this.bboxComputed&&(this.bboxComputed=!1,this.parent&&this.parent.invalidateBBox())},e.prototype.copySkewIC=function(t){var e=this.childNodes[0];(null==e?void 0:e.bbox.sk)&&(t.sk=e.bbox.sk),(null==e?void 0:e.bbox.dx)&&(t.dx=e.bbox.dx);var r=this.childNodes[this.childNodes.length-1];(null==r?void 0:r.bbox.ic)&&(t.ic=r.bbox.ic,t.w+=t.ic)},e.prototype.getStyles=function(){var t=this.node.attributes.getExplicit("style");if(t)for(var r=this.styles=new Styles_js_1.Styles(t),n=0,o=e.removeStyles.length;n<o;n++){var i=e.removeStyles[n];r.get(i)&&(this.removedStyles||(this.removedStyles={}),this.removedStyles[i]=r.get(i),r.set(i,""))}},e.prototype.getVariant=function(){if(this.node.isToken){var t=this.node.attributes,r=t.get("mathvariant");if(!t.getExplicit("mathvariant")){var n=t.getList("fontfamily","fontweight","fontstyle");if(this.removedStyles){var o=this.removedStyles;o.fontFamily&&(n.family=o.fontFamily),o.fontWeight&&(n.weight=o.fontWeight),o.fontStyle&&(n.style=o.fontStyle)}n.fontfamily&&(n.family=n.fontfamily),n.fontweight&&(n.weight=n.fontweight),n.fontstyle&&(n.style=n.fontstyle),n.weight&&n.weight.match(/^\d+$/)&&(n.weight=parseInt(n.weight)>600?"bold":"normal"),n.family?r=this.explicitVariant(n.family,n.weight,n.style):(this.node.getProperty("variantForm")&&(r="-tex-variant"),r=(e.BOLDVARIANTS[n.weight]||{})[r]||r,r=(e.ITALICVARIANTS[n.style]||{})[r]||r)}this.variant=r}},e.prototype.explicitVariant=function(t,e,r){var n=this.styles;return n||(n=this.styles=new Styles_js_1.Styles),n.set("fontFamily",t),e&&n.set("fontWeight",e),r&&n.set("fontStyle",r),"-explicitFont"},e.prototype.getScale=function(){var t=1,e=this.parent,r=e?e.bbox.scale:1,n=this.node.attributes,o=Math.min(n.get("scriptlevel"),2),i=n.get("fontsize"),a=this.node.isToken||this.node.isKind("mstyle")?n.get("mathsize"):n.getInherited("mathsize");if(0!==o){t=Math.pow(n.get("scriptsizemultiplier"),o);var s=this.length2em(n.get("scriptminsize"),.8,1);t<s&&(t=s)}this.removedStyles&&this.removedStyles.fontSize&&!i&&(i=this.removedStyles.fontSize),i&&!n.getExplicit("mathsize")&&(a=i),"1"!==a&&(t*=this.length2em(a,1,1)),this.bbox.scale=t,this.bbox.rscale=t/r},e.prototype.getSpace=function(){var t=this.isTopEmbellished(),e=this.node.hasSpacingAttributes();this.jax.options.mathmlSpacing||e?t&&this.getMathMLSpacing():this.getTeXSpacing(t,e)},e.prototype.getMathMLSpacing=function(){var t=this.node.coreMO(),e=t.coreParent(),r=e.parent;if(r&&r.isKind("mrow")&&1!==r.childNodes.length){var n=t.attributes,o=n.get("scriptlevel")>0;this.bbox.L=n.isSet("lspace")?Math.max(0,this.length2em(n.get("lspace"))):MathMLSpace(o,t.lspace),this.bbox.R=n.isSet("rspace")?Math.max(0,this.length2em(n.get("rspace"))):MathMLSpace(o,t.rspace);var i=r.childIndex(e);if(0!==i){var a=r.childNodes[i-1];if(a.isEmbellished){var s=this.jax.nodeMap.get(a).getBBox();s.R&&(this.bbox.L=Math.max(0,this.bbox.L-s.R))}}}},e.prototype.getTeXSpacing=function(t,e){if(!e){var r=this.node.texSpacing();r&&(this.bbox.L=this.length2em(r))}if(t||e){var n=this.node.coreMO().attributes;n.isSet("lspace")&&(this.bbox.L=Math.max(0,this.length2em(n.get("lspace")))),n.isSet("rspace")&&(this.bbox.R=Math.max(0,this.length2em(n.get("rspace"))))}},e.prototype.isTopEmbellished=function(){return this.node.isEmbellished&&!(this.node.parent&&this.node.parent.isEmbellished)},e.prototype.core=function(){return this.jax.nodeMap.get(this.node.core())},e.prototype.coreMO=function(){return this.jax.nodeMap.get(this.node.coreMO())},e.prototype.getText=function(){var t,e,r="";if(this.node.isToken)try{for(var n=__values$q(this.node.childNodes),o=n.next();!o.done;o=n.next()){var i=o.value;i instanceof MmlNode_js_1$c.TextNode&&(r+=i.getText())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},e.prototype.canStretch=function(t){if(this.stretch=FontData_js_1$j.NOSTRETCH,this.node.isEmbellished){var e=this.core();e&&e.node!==this.node&&e.canStretch(t)&&(this.stretch=e.stretch)}return 0!==this.stretch.dir},e.prototype.getAlignShift=function(){var t,e=(t=this.node.attributes).getList.apply(t,__spreadArray$f([],__read$w(MmlNode_js_1$c.indentAttributes),!1)),r=e.indentalign,n=e.indentshift,o=e.indentalignfirst,i=e.indentshiftfirst;return"indentalign"!==o&&(r=o),"auto"===r&&(r=this.jax.options.displayAlign),"indentshift"!==i&&(n=i),"auto"===n&&(n=this.jax.options.displayIndent,"right"!==r||n.match(/^\s*0[a-z]*\s*$/)||(n=("-"+n.trim()).replace(/^--/,""))),[r,this.length2em(n,this.metrics.containerWidth)]},e.prototype.getAlignX=function(t,e,r){return"right"===r?t-(e.w+e.R)*e.rscale:"left"===r?e.L*e.rscale:(t-e.w*e.rscale)/2},e.prototype.getAlignY=function(t,e,r,n,o){return"top"===o?t-r:"bottom"===o?n-e:"center"===o?(t-r-(e-n))/2:0},e.prototype.getWrapWidth=function(t){return this.childNodes[t].getBBox().w},e.prototype.getChildAlign=function(t){return"left"},e.prototype.percent=function(t){return LENGTHS$1.percent(t)},e.prototype.em=function(t){return LENGTHS$1.em(t)},e.prototype.px=function(t,e){return void 0===e&&(e=-LENGTHS$1.BIGDIMEN),LENGTHS$1.px(t,e,this.metrics.em)},e.prototype.length2em=function(t,e,r){return void 0===e&&(e=1),void 0===r&&(r=null),null===r&&(r=this.bbox.scale),LENGTHS$1.length2em(t,e,r,this.jax.pxPerEm)},e.prototype.unicodeChars=function(t,e){void 0===e&&(e=this.variant);var r=(0,string_js_1$6.unicodeChars)(t),n=this.font.getVariant(e);if(n&&n.chars){var o=n.chars;r=r.map((function(t){return((o[t]||[])[3]||{}).smp||t}))}return r},e.prototype.remapChars=function(t){return t},e.prototype.mmlText=function(t){return this.node.factory.create("text").setText(t)},e.prototype.mmlNode=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r=[]),this.node.factory.create(t,e,r)},e.prototype.createMo=function(t){var e=this.node.factory,r=e.create("text").setText(t),n=e.create("mo",{stretchy:!0},[r]);n.inheritAttributesFrom(this.node);var o=this.wrap(n);return o.parent=this,o},e.prototype.getVariantChar=function(t,e){var r=this.font.getChar(t,e)||[0,0,0,{unknown:!0}];return 3===r.length&&(r[3]={}),r},e.kind="unknown",e.styles={},e.removeStyles=["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","font"],e.skipAttributes={fontfamily:!0,fontsize:!0,fontweight:!0,fontstyle:!0,color:!0,background:!0,class:!0,href:!0,style:!0,xmlns:!0},e.BOLDVARIANTS={bold:{normal:"bold",italic:"bold-italic",fraktur:"bold-fraktur",script:"bold-script","sans-serif":"bold-sans-serif","sans-serif-italic":"sans-serif-bold-italic"},normal:{bold:"normal","bold-italic":"italic","bold-fraktur":"fraktur","bold-script":"script","bold-sans-serif":"sans-serif","sans-serif-bold-italic":"sans-serif-italic"}},e.ITALICVARIANTS={italic:{normal:"italic",bold:"bold-italic","sans-serif":"sans-serif-italic","bold-sans-serif":"sans-serif-bold-italic"},normal:{italic:"normal","bold-italic":"bold","sans-serif-italic":"sans-serif","sans-serif-bold-italic":"bold-sans-serif"}},e}(Wrapper_js_1$n.AbstractWrapper);Wrapper$1.CommonWrapper=CommonWrapper,function(t){var e,r=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.CHTMLWrapper=t.SPACE=t.FONTSIZE=void 0;var l=i(lengths),c=Wrapper$1,u=BBox$1;t.FONTSIZE={"70.7%":"s","70%":"s","50%":"ss","60%":"Tn","85%":"sm","120%":"lg","144%":"Lg","173%":"LG","207%":"hg","249%":"HG"},t.SPACE=((e={})[l.em(2/18)]="1",e[l.em(3/18)]="2",e[l.em(4/18)]="3",e[l.em(5/18)]="4",e[l.em(6/18)]="5",e);var d=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.chtml=null,t}return r(n,e),n.prototype.toCHTML=function(t){var e,r,n=this.standardCHTMLnode(t);try{for(var o=a(this.childNodes),i=o.next();!i.done;i=o.next()){i.value.toCHTML(n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},n.prototype.standardCHTMLnode=function(t){this.markUsed();var e=this.createCHTMLnode(t);return this.handleStyles(),this.handleVariant(),this.handleScale(),this.handleColor(),this.handleSpace(),this.handleAttributes(),this.handlePWidth(),e},n.prototype.markUsed=function(){this.jax.wrapperUsage.add(this.kind)},n.prototype.createCHTMLnode=function(t){var e=this.node.attributes.get("href");return e&&(t=this.adaptor.append(t,this.html("a",{href:e}))),this.chtml=this.adaptor.append(t,this.html("mjx-"+this.node.kind)),this.chtml},n.prototype.handleStyles=function(){if(this.styles){var t=this.styles.cssText;if(t){this.adaptor.setAttribute(this.chtml,"style",t);var e=this.styles.get("font-family");e&&this.adaptor.setStyle(this.chtml,"font-family","MJXZERO, "+e)}}},n.prototype.handleVariant=function(){this.node.isToken&&"-explicitFont"!==this.variant&&this.adaptor.setAttribute(this.chtml,"class",(this.font.getVariant(this.variant)||this.font.getVariant("normal")).classes)},n.prototype.handleScale=function(){this.setScale(this.chtml,this.bbox.rscale)},n.prototype.setScale=function(e,r){var n=Math.abs(r-1)<.001?1:r;if(e&&1!==n){var o=this.percent(n);t.FONTSIZE[o]?this.adaptor.setAttribute(e,"size",t.FONTSIZE[o]):this.adaptor.setStyle(e,"fontSize",o)}return e},n.prototype.handleSpace=function(){var e,r;try{for(var n=a([[this.bbox.L,"space","marginLeft"],[this.bbox.R,"rspace","marginRight"]]),o=n.next();!o.done;o=n.next()){var i=o.value,l=s(i,3),c=l[0],u=l[1],d=l[2];if(c){var p=this.em(c);t.SPACE[p]?this.adaptor.setAttribute(this.chtml,u,t.SPACE[p]):this.adaptor.setStyle(this.chtml,d,p)}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},n.prototype.handleColor=function(){var t=this.node.attributes,e=t.getExplicit("mathcolor"),r=t.getExplicit("color"),n=t.getExplicit("mathbackground"),o=t.getExplicit("background");(e||r)&&this.adaptor.setStyle(this.chtml,"color",e||r),(n||o)&&this.adaptor.setStyle(this.chtml,"backgroundColor",n||o)},n.prototype.handleAttributes=function(){var t,e,r,o,i=this.node.attributes,s=i.getAllDefaults(),l=n.skipAttributes;try{for(var c=a(i.getExplicitNames()),u=c.next();!u.done;u=c.next()){var d=u.value;!1!==l[d]&&(d in s||l[d]||this.adaptor.hasAttribute(this.chtml,d))||this.adaptor.setAttribute(this.chtml,d,i.getExplicit(d))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}if(i.get("class")){var p=i.get("class").trim().split(/ +/);try{for(var m=a(p),h=m.next();!h.done;h=m.next()){var f=h.value;this.adaptor.addClass(this.chtml,f)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}},n.prototype.handlePWidth=function(){this.bbox.pwidth&&(this.bbox.pwidth===u.BBox.fullWidth?this.adaptor.setAttribute(this.chtml,"width","full"):this.adaptor.setStyle(this.chtml,"width",this.bbox.pwidth))},n.prototype.setIndent=function(t,e,r){var n=this.adaptor;if("center"===e||"left"===e){var o=this.getBBox().L;n.setStyle(t,"margin-left",this.em(r+o))}if("center"===e||"right"===e){var i=this.getBBox().R;n.setStyle(t,"margin-right",this.em(-r+i))}},n.prototype.drawBBox=function(){var t=this.getBBox(),e=t.w,r=t.h,n=t.d,o=t.R,i=this.html("mjx-box",{style:{opacity:.25,"margin-left":this.em(-e-o)}},[this.html("mjx-box",{style:{height:this.em(r),width:this.em(e),"background-color":"red"}}),this.html("mjx-box",{style:{height:this.em(n),width:this.em(e),"margin-left":this.em(-e),"vertical-align":this.em(-n),"background-color":"green"}})]),a=this.chtml||this.parent.chtml,s=this.adaptor.getAttribute(a,"size");s&&this.adaptor.setAttribute(i,"size",s);var l=this.adaptor.getStyle(a,"fontSize");l&&this.adaptor.setStyle(i,"fontSize",l),this.adaptor.append(this.adaptor.parent(a),i),this.adaptor.setStyle(a,"backgroundColor","#FFEE00")},n.prototype.html=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r=[]),this.jax.html(t,e,r)},n.prototype.text=function(t){return this.jax.text(t)},n.prototype.char=function(t){return this.font.charSelector(t).substr(1)},n.kind="unknown",n.autoStyle=!0,n}(c.CommonWrapper);t.CHTMLWrapper=d}(Wrapper$2),getDefaultExportFromCjs(Wrapper$2);var math$1={},math={},__extends$18=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMathMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$18(e,t),e.prototype.getWrapWidth=function(t){return this.parent?this.getBBox().w:this.metrics.containerWidth/this.jax.pxPerEm},e}(t)}Object.defineProperty(math,"__esModule",{value:!0}),math.CommonMathMixin=void 0,math.CommonMathMixin=CommonMathMixin;var __extends$17=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$v=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(math$1,"__esModule",{value:!0}),math$1.CHTMLmath=void 0;var Wrapper_js_1$m=Wrapper$2,math_js_1$1=math,math_js_2=math$2,BBox_js_1$4=BBox$1,CHTMLmath=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$17(e,t),e.prototype.toCHTML=function(e){t.prototype.toCHTML.call(this,e);var r=this.chtml,n=this.adaptor;"block"===this.node.attributes.get("display")?(n.setAttribute(r,"display","true"),n.setAttribute(e,"display","true"),this.handleDisplay(e)):this.handleInline(e),n.addClass(r,"MJX-TEX")},e.prototype.handleDisplay=function(t){var e=this.adaptor,r=__read$v(this.getAlignShift(),2),n=r[0],o=r[1];if("center"!==n&&e.setAttribute(t,"justify",n),this.bbox.pwidth===BBox_js_1$4.BBox.fullWidth){if(e.setAttribute(t,"width","full"),this.jax.table){var i=this.jax.table.getOuterBBox(),a=i.L,s=i.w,l=i.R;"right"===n?l=Math.max(l||-o,-o):"left"===n?a=Math.max(a||o,o):"center"===n&&(s+=2*Math.abs(o));var c=this.em(Math.max(0,a+s+l));e.setStyle(t,"min-width",c),e.setStyle(this.jax.table.chtml,"min-width",c)}}else this.setIndent(this.chtml,n,o)},e.prototype.handleInline=function(t){var e=this.adaptor,r=e.getStyle(this.chtml,"margin-right");r&&(e.setStyle(this.chtml,"margin-right",""),e.setStyle(t,"margin-right",r),e.setStyle(t,"width","0"))},e.prototype.setChildPWidths=function(e,r,n){return void 0===r&&(r=null),void 0===n&&(n=!0),!!this.parent&&t.prototype.setChildPWidths.call(this,e,r,n)},e.kind=math_js_2.MmlMath.prototype.kind,e.styles={"mjx-math":{"line-height":0,"text-align":"left","text-indent":0,"font-style":"normal","font-weight":"normal","font-size":"100%","font-size-adjust":"none","letter-spacing":"normal","border-collapse":"collapse","word-wrap":"normal","word-spacing":"normal","white-space":"nowrap",direction:"ltr",padding:"1px 0"},'mjx-container[jax="CHTML"][display="true"]':{display:"block","text-align":"center",margin:"1em 0"},'mjx-container[jax="CHTML"][display="true"][width="full"]':{display:"flex"},'mjx-container[jax="CHTML"][display="true"] mjx-math':{padding:0},'mjx-container[jax="CHTML"][justify="left"]':{"text-align":"left"},'mjx-container[jax="CHTML"][justify="right"]':{"text-align":"right"}},e}((0,math_js_1$1.CommonMathMixin)(Wrapper_js_1$m.CHTMLWrapper));math$1.CHTMLmath=CHTMLmath;var mi$1={},mi={},__extends$16=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMiMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$16(e,t),e.prototype.computeBBox=function(e,r){t.prototype.computeBBox.call(this,e),this.copySkewIC(e)},e}(t)}Object.defineProperty(mi,"__esModule",{value:!0}),mi.CommonMiMixin=void 0,mi.CommonMiMixin=CommonMiMixin;var __extends$15=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mi$1,"__esModule",{value:!0}),mi$1.CHTMLmi=void 0;var Wrapper_js_1$l=Wrapper$2,mi_js_1$1=mi,mi_js_2=mi$2,CHTMLmi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$15(e,t),e.kind=mi_js_2.MmlMi.prototype.kind,e}((0,mi_js_1$1.CommonMiMixin)(Wrapper_js_1$l.CHTMLWrapper));mi$1.CHTMLmi=CHTMLmi;var mo$1={},mo={},__extends$14=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$6=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$6=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$6.apply(this,arguments)},__read$u=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$e=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$p=commonjsGlobal&&commonjsGlobal.__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.")},_a$8;Object.defineProperty(mo,"__esModule",{value:!0}),mo.CommonMoMixin=mo.DirectionVH=void 0;var BBox_js_1$3=BBox$1,string_js_1$5=string,FontData_js_1$i=FontData$2;function CommonMoMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$e([],__read$u(e),!1))||this;return n.size=null,n.isAccent=n.node.isAccent,n}return __extends$14(e,t),e.prototype.computeBBox=function(t,e){if(this.protoBBox(t),this.node.attributes.get("symmetric")&&2!==this.stretch.dir){var r=this.getCenterOffset(t);t.h+=r,t.d-=r}this.node.getProperty("mathaccent")&&(0===this.stretch.dir||this.size>=0)&&(t.w=0)},e.prototype.protoBBox=function(e){var r=0!==this.stretch.dir;r&&null===this.size&&this.getStretchedVariant([0]),r&&this.size<0||(t.prototype.computeBBox.call(this,e),this.copySkewIC(e))},e.prototype.getAccentOffset=function(){var t=BBox_js_1$3.BBox.empty();return this.protoBBox(t),-t.w/2},e.prototype.getCenterOffset=function(e){return void 0===e&&(e=null),e||(e=BBox_js_1$3.BBox.empty(),t.prototype.computeBBox.call(this,e)),(e.h+e.d)/2+this.font.params.axis_height-e.h},e.prototype.getVariant=function(){this.node.attributes.get("largeop")?this.variant=this.node.attributes.get("displaystyle")?"-largeop":"-smallop":this.node.attributes.getExplicit("mathvariant")||!1!==this.node.getProperty("pseudoscript")?t.prototype.getVariant.call(this):this.variant="-tex-variant"},e.prototype.canStretch=function(t){if(0!==this.stretch.dir)return this.stretch.dir===t;if(!this.node.attributes.get("stretchy"))return!1;var e=this.getText();if(1!==Array.from(e).length)return!1;var r=this.font.getDelimiter(e.codePointAt(0));return this.stretch=r&&r.dir===t?r:FontData_js_1$i.NOSTRETCH,0!==this.stretch.dir},e.prototype.getStretchedVariant=function(t,e){var r,n;if(void 0===e&&(e=!1),0!==this.stretch.dir){var o=this.getWH(t),i=this.getSize("minsize",0),a=this.getSize("maxsize",1/0),s=this.node.getProperty("mathaccent");o=Math.max(i,Math.min(a,o));var l=this.font.params.delimiterfactor/1e3,c=this.font.params.delimitershortfall,u=i||e?o:s?Math.min(o/l,o+c):Math.max(o*l,o-c),d=this.stretch,p=d.c||this.getText().codePointAt(0),m=0;if(d.sizes)try{for(var h=__values$p(d.sizes),f=h.next();!f.done;f=h.next()){if(f.value>=u)return s&&m&&m--,this.variant=this.font.getSizeVariant(p,m),this.size=m,void(d.schar&&d.schar[m]&&(this.stretch=__assign$6(__assign$6({},this.stretch),{c:d.schar[m]})));m++}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}d.stretch?(this.size=-1,this.invalidateBBox(),this.getStretchBBox(t,this.checkExtendedHeight(o,d),d)):(this.variant=this.font.getSizeVariant(p,m-1),this.size=m-1)}},e.prototype.getSize=function(t,e){var r=this.node.attributes;return r.isSet(t)&&(e=this.length2em(r.get(t),1,1)),e},e.prototype.getWH=function(t){if(0===t.length)return 0;if(1===t.length)return t[0];var e=__read$u(t,2),r=e[0],n=e[1],o=this.font.params.axis_height;return this.node.attributes.get("symmetric")?2*Math.max(r-o,n+o):r+n},e.prototype.getStretchBBox=function(t,e,r){var n;r.hasOwnProperty("min")&&r.min>e&&(e=r.min);var o=__read$u(r.HDW,3),i=o[0],a=o[1],s=o[2];1===this.stretch.dir?(i=(n=__read$u(this.getBaseline(t,e,r),2))[0],a=n[1]):s=e,this.bbox.h=i,this.bbox.d=a,this.bbox.w=s},e.prototype.getBaseline=function(t,e,r){var n=2===t.length&&t[0]+t[1]===e,o=this.node.attributes.get("symmetric"),i=__read$u(n?t:[e,0],2),a=i[0],s=i[1],l=__read$u([a+s,0],2),c=l[0],u=l[1];if(o){var d=this.font.params.axis_height;n&&(c=2*Math.max(a-d,s+d)),u=c/2-d}else if(n)u=s;else{var p=__read$u(r.HDW||[.75,.25],2),m=p[0],h=p[1];u=h*(c/(m+h))}return[c-u,u]},e.prototype.checkExtendedHeight=function(t,e){if(e.fullExt){var r=__read$u(e.fullExt,2),n=r[0],o=r[1];t=o+Math.ceil(Math.max(0,t-o)/n)*n}return t},e.prototype.remapChars=function(t){var e=this.node.getProperty("primes");if(e)return(0,string_js_1$5.unicodeChars)(e);if(1===t.length){var r=this.node.coreParent().parent,n=this.isAccent&&!r.isKind("mrow")?"accent":"mo",o=this.font.getRemappedChar(n,t[0]);o&&(t=this.unicodeChars(o,this.variant))}return t},e}(t)}mo.DirectionVH=(_a$8={},_a$8[1]="v",_a$8[2]="h",_a$8),mo.CommonMoMixin=CommonMoMixin;var __extends$13=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$o=commonjsGlobal&&commonjsGlobal.__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(mo$1,"__esModule",{value:!0}),mo$1.CHTMLmo=void 0;var Wrapper_js_1$k=Wrapper$2,mo_js_1$1=mo,mo_js_2=mo$2,CHTMLmo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$13(e,t),e.prototype.toCHTML=function(t){var e,r,n=this.node.attributes,o=n.get("symmetric")&&2!==this.stretch.dir,i=0!==this.stretch.dir;i&&null===this.size&&this.getStretchedVariant([]);var a=this.standardCHTMLnode(t);if(i&&this.size<0)this.stretchHTML(a);else{if(o||n.get("largeop")){var s=this.em(this.getCenterOffset());"0"!==s&&this.adaptor.setStyle(a,"verticalAlign",s)}this.node.getProperty("mathaccent")&&(this.adaptor.setStyle(a,"width","0"),this.adaptor.setStyle(a,"margin-left",this.em(this.getAccentOffset())));try{for(var l=__values$o(this.childNodes),c=l.next();!c.done;c=l.next()){c.value.toCHTML(a)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}}},e.prototype.stretchHTML=function(t){var e=this.getText().codePointAt(0);this.font.delimUsage.add(e),this.childNodes[0].markUsed();var r=this.stretch,n=r.stretch,o=[];n[0]&&o.push(this.html("mjx-beg",{},[this.html("mjx-c")])),o.push(this.html("mjx-ext",{},[this.html("mjx-c")])),4===n.length&&o.push(this.html("mjx-mid",{},[this.html("mjx-c")]),this.html("mjx-ext",{},[this.html("mjx-c")])),n[2]&&o.push(this.html("mjx-end",{},[this.html("mjx-c")]));var i={},a=this.bbox,s=a.h,l=a.d,c=a.w;1===r.dir?(o.push(this.html("mjx-mark")),i.height=this.em(s+l),i.verticalAlign=this.em(-l)):i.width=this.em(c);var u=mo_js_1$1.DirectionVH[r.dir],d={class:this.char(r.c||e),style:i},p=this.html("mjx-stretchy-"+u,d,o);this.adaptor.append(t,p)},e.kind=mo_js_2.MmlMo.prototype.kind,e.styles={"mjx-stretchy-h":{display:"inline-table",width:"100%"},"mjx-stretchy-h > *":{display:"table-cell",width:0},"mjx-stretchy-h > * > mjx-c":{display:"inline-block",transform:"scalex(1.0000001)"},"mjx-stretchy-h > * > mjx-c::before":{display:"inline-block",width:"initial"},"mjx-stretchy-h > mjx-ext":{"/* IE */ overflow":"hidden","/* others */ overflow":"clip visible",width:"100%"},"mjx-stretchy-h > mjx-ext > mjx-c::before":{transform:"scalex(500)"},"mjx-stretchy-h > mjx-ext > mjx-c":{width:0},"mjx-stretchy-h > mjx-beg > mjx-c":{"margin-right":"-.1em"},"mjx-stretchy-h > mjx-end > mjx-c":{"margin-left":"-.1em"},"mjx-stretchy-v":{display:"inline-block"},"mjx-stretchy-v > *":{display:"block"},"mjx-stretchy-v > mjx-beg":{height:0},"mjx-stretchy-v > mjx-end > mjx-c":{display:"block"},"mjx-stretchy-v > * > mjx-c":{transform:"scaley(1.0000001)","transform-origin":"left center",overflow:"hidden"},"mjx-stretchy-v > mjx-ext":{display:"block",height:"100%","box-sizing":"border-box",border:"0px solid transparent","/* IE */ overflow":"hidden","/* others */ overflow":"visible clip"},"mjx-stretchy-v > mjx-ext > mjx-c::before":{width:"initial","box-sizing":"border-box"},"mjx-stretchy-v > mjx-ext > mjx-c":{transform:"scaleY(500) translateY(.075em)",overflow:"visible"},"mjx-mark":{display:"inline-block",height:"0px"}},e}((0,mo_js_1$1.CommonMoMixin)(Wrapper_js_1$k.CHTMLWrapper));mo$1.CHTMLmo=CHTMLmo;var mn$1={},mn={},__extends$12=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMnMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$12(e,t),e.prototype.remapChars=function(t){if(t.length){var e=this.font.getRemappedChar("mn",t[0]);if(e){var r=this.unicodeChars(e,this.variant);1===r.length?t[0]=r[0]:t=r.concat(t.slice(1))}}return t},e}(t)}Object.defineProperty(mn,"__esModule",{value:!0}),mn.CommonMnMixin=void 0,mn.CommonMnMixin=CommonMnMixin;var __extends$11=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mn$1,"__esModule",{value:!0}),mn$1.CHTMLmn=void 0;var Wrapper_js_1$j=Wrapper$2,mn_js_1$1=mn,mn_js_2=mn$2,CHTMLmn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$11(e,t),e.kind=mn_js_2.MmlMn.prototype.kind,e}((0,mn_js_1$1.CommonMnMixin)(Wrapper_js_1$j.CHTMLWrapper));mn$1.CHTMLmn=CHTMLmn;var ms$1={},ms={},__extends$10=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$t=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$d=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};function CommonMsMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$d([],__read$t(e),!1))||this,o=n.node.attributes,i=o.getList("lquote","rquote");return"monospace"!==n.variant&&(o.isSet("lquote")||'"'!==i.lquote||(i.lquote="“"),o.isSet("rquote")||'"'!==i.rquote||(i.rquote="”")),n.childNodes.unshift(n.createText(i.lquote)),n.childNodes.push(n.createText(i.rquote)),n}return __extends$10(e,t),e.prototype.createText=function(t){var e=this.wrap(this.mmlText(t));return e.parent=this,e},e}(t)}Object.defineProperty(ms,"__esModule",{value:!0}),ms.CommonMsMixin=void 0,ms.CommonMsMixin=CommonMsMixin;var __extends$$=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ms$1,"__esModule",{value:!0}),ms$1.CHTMLms=void 0;var Wrapper_js_1$i=Wrapper$2,ms_js_1$1=ms,ms_js_2=ms$2,CHTMLms=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$$(e,t),e.kind=ms_js_2.MmlMs.prototype.kind,e}((0,ms_js_1$1.CommonMsMixin)(Wrapper_js_1$i.CHTMLWrapper));ms$1.CHTMLms=CHTMLms;var mtext$1={},mtext={},__extends$_=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMtextMixin(t){var e;return e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$_(e,t),e.prototype.getVariant=function(){var e=this.jax.options,r=this.jax.math.outputData,n=(!!r.merrorFamily||!!e.merrorFont)&&this.node.Parent.isKind("merror");if(r.mtextFamily||e.mtextFont||n){var o=this.node.attributes.get("mathvariant"),i=this.constructor.INHERITFONTS[o]||this.jax.font.getCssFont(o),a=i[0]||(n?r.merrorFamily||e.merrorFont:r.mtextFamily||e.mtextFont);this.variant=this.explicitVariant(a,i[2]?"bold":"",i[1]?"italic":"")}else t.prototype.getVariant.call(this)},e}(t),e.INHERITFONTS={normal:["",!1,!1],bold:["",!1,!0],italic:["",!0,!1],"bold-italic":["",!0,!0]},e}Object.defineProperty(mtext,"__esModule",{value:!0}),mtext.CommonMtextMixin=void 0,mtext.CommonMtextMixin=CommonMtextMixin;var __extends$Z=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mtext$1,"__esModule",{value:!0}),mtext$1.CHTMLmtext=void 0;var Wrapper_js_1$h=Wrapper$2,mtext_js_1$1=mtext,mtext_js_2=mtext$2,CHTMLmtext=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$Z(e,t),e.kind=mtext_js_2.MmlMtext.prototype.kind,e}((0,mtext_js_1$1.CommonMtextMixin)(Wrapper_js_1$h.CHTMLWrapper));mtext$1.CHTMLmtext=CHTMLmtext;var mspace$1={},mspace={},__extends$Y=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMspaceMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$Y(e,t),e.prototype.computeBBox=function(t,e){var r=this.node.attributes;t.w=this.length2em(r.get("width"),0),t.h=this.length2em(r.get("height"),0),t.d=this.length2em(r.get("depth"),0)},e.prototype.handleVariant=function(){},e}(t)}Object.defineProperty(mspace,"__esModule",{value:!0}),mspace.CommonMspaceMixin=void 0,mspace.CommonMspaceMixin=CommonMspaceMixin;var __extends$X=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mspace$1,"__esModule",{value:!0});var CHTMLmspace_1=mspace$1.CHTMLmspace=void 0,Wrapper_js_1$g=Wrapper$2,mspace_js_1$1=mspace,mspace_js_2=mspace$2,CHTMLmspace=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$X(e,t),e.prototype.toCHTML=function(t){var e=this.standardCHTMLnode(t),r=this.getBBox(),n=r.w,o=r.h,i=r.d;n<0&&(this.adaptor.setStyle(e,"marginRight",this.em(n)),n=0),n&&this.adaptor.setStyle(e,"width",this.em(n)),(o=Math.max(0,o+i))&&this.adaptor.setStyle(e,"height",this.em(Math.max(0,o))),i&&this.adaptor.setStyle(e,"verticalAlign",this.em(-i))},e.kind=mspace_js_2.MmlMspace.prototype.kind,e}((0,mspace_js_1$1.CommonMspaceMixin)(Wrapper_js_1$g.CHTMLWrapper));CHTMLmspace_1=mspace$1.CHTMLmspace=CHTMLmspace;var mpadded$1={},mpadded={},__extends$W=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$s=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};function CommonMpaddedMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$W(e,t),e.prototype.getDimens=function(){var t=this.node.attributes.getList("width","height","depth","lspace","voffset"),e=this.childNodes[0].getBBox(),r=e.w,n=e.h,o=e.d,i=r,a=n,s=o,l=0,c=0,u=0;""!==t.width&&(r=this.dimen(t.width,e,"w",0)),""!==t.height&&(n=this.dimen(t.height,e,"h",0)),""!==t.depth&&(o=this.dimen(t.depth,e,"d",0)),""!==t.voffset&&(c=this.dimen(t.voffset,e)),""!==t.lspace&&(l=this.dimen(t.lspace,e));var d=this.node.attributes.get("data-align");return d&&(u=this.getAlignX(r,e,d)),[a,s,i,n-a,o-s,r-i,l,c,u]},e.prototype.dimen=function(t,e,r,n){void 0===r&&(r=""),void 0===n&&(n=null);var o=(t=String(t)).match(/width|height|depth/),i=o?e[o[0].charAt(0)]:r?e[r]:0,a=this.length2em(t,i)||0;return t.match(/^[-+]/)&&r&&(a+=i),null!=n&&(a=Math.max(n,a)),a},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=__read$s(this.getDimens(),6),n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5];t.w=i+l,t.h=n+a,t.d=o+s,this.setChildPWidths(e,t.w)},e.prototype.getWrapWidth=function(t){return this.getBBox().w},e.prototype.getChildAlign=function(t){return this.node.attributes.get("data-align")||"left"},e}(t)}Object.defineProperty(mpadded,"__esModule",{value:!0}),mpadded.CommonMpaddedMixin=void 0,mpadded.CommonMpaddedMixin=CommonMpaddedMixin;var __extends$V=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$n=commonjsGlobal&&commonjsGlobal.__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(mpadded$1,"__esModule",{value:!0}),mpadded$1.CHTMLmpadded=void 0;var Wrapper_js_1$f=Wrapper$2,mpadded_js_1$1=mpadded,mpadded_js_2=mpadded$2,CHTMLmpadded=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$V(e,t),e.prototype.toCHTML=function(t){var e,r,n=this.standardCHTMLnode(t),o=[],i={},a=__read$r(this.getDimens(),9),s=a[2],l=a[3],c=a[4],u=a[5],d=a[6],p=a[7],m=a[8];if(u&&(i.width=this.em(s+u)),(l||c)&&(i.margin=this.em(l)+" 0 "+this.em(c)),d+m||p){i.position="relative";var h=this.html("mjx-rbox",{style:{left:this.em(d+m),top:this.em(-p),"max-width":i.width}});d+m&&this.childNodes[0].getBBox().pwidth&&(this.adaptor.setAttribute(h,"width","full"),this.adaptor.setStyle(h,"left",this.em(d))),o.push(h)}n=this.adaptor.append(n,this.html("mjx-block",{style:i},o));try{for(var f=__values$n(this.childNodes),_=f.next();!_.done;_=f.next()){_.value.toCHTML(o[0]||n)}}catch(t){e={error:t}}finally{try{_&&!_.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}},e.kind=mpadded_js_2.MmlMpadded.prototype.kind,e.styles={"mjx-mpadded":{display:"inline-block"},"mjx-rbox":{display:"inline-block",position:"relative"}},e}((0,mpadded_js_1$1.CommonMpaddedMixin)(Wrapper_js_1$f.CHTMLWrapper));mpadded$1.CHTMLmpadded=CHTMLmpadded;var menclose$1={},menclose={},Notation$3={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonArrow=t.CommonDiagonalArrow=t.CommonDiagonalStrike=t.CommonBorder2=t.CommonBorder=t.arrowBBox=t.diagonalArrowDef=t.arrowDef=t.arrowBBoxW=t.arrowBBoxHD=t.arrowHead=t.fullBorder=t.fullPadding=t.fullBBox=t.sideNames=t.sideIndex=t.SOLID=t.PADDING=t.THICKNESS=t.ARROWY=t.ARROWDX=t.ARROWX=void 0,t.ARROWX=4,t.ARROWDX=1,t.ARROWY=2,t.THICKNESS=.067,t.PADDING=.2,t.SOLID=t.THICKNESS+"em solid",t.sideIndex={top:0,right:1,bottom:2,left:3},t.sideNames=Object.keys(t.sideIndex),t.fullBBox=function(t){return new Array(4).fill(t.thickness+t.padding)},t.fullPadding=function(t){return new Array(4).fill(t.padding)},t.fullBorder=function(t){return new Array(4).fill(t.thickness)};t.arrowHead=function(t){return Math.max(t.padding,t.thickness*(t.arrowhead.x+t.arrowhead.dx+1))};t.arrowBBoxHD=function(t,e){if(t.childNodes[0]){var r=t.childNodes[0].getBBox(),n=r.h,o=r.d;e[0]=e[2]=Math.max(0,t.thickness*t.arrowhead.y-(n+o)/2)}return e};t.arrowBBoxW=function(t,e){if(t.childNodes[0]){var r=t.childNodes[0].getBBox().w;e[1]=e[3]=Math.max(0,t.thickness*t.arrowhead.y-r/2)}return e},t.arrowDef={up:[-Math.PI/2,!1,!0,"verticalstrike"],down:[Math.PI/2,!1,!0,"verticakstrike"],right:[0,!1,!1,"horizontalstrike"],left:[Math.PI,!1,!1,"horizontalstrike"],updown:[Math.PI/2,!0,!0,"verticalstrike uparrow downarrow"],leftright:[0,!0,!1,"horizontalstrike leftarrow rightarrow"]},t.diagonalArrowDef={updiagonal:[-1,0,!1,"updiagonalstrike northeastarrow"],northeast:[-1,0,!1,"updiagonalstrike updiagonalarrow"],southeast:[1,0,!1,"downdiagonalstrike"],northwest:[1,Math.PI,!1,"downdiagonalstrike"],southwest:[-1,Math.PI,!1,"updiagonalstrike"],northeastsouthwest:[-1,0,!0,"updiagonalstrike northeastarrow updiagonalarrow southwestarrow"],northwestsoutheast:[1,0,!0,"downdiagonalstrike northwestarrow southeastarrow"]},t.arrowBBox={up:function(e){return(0,t.arrowBBoxW)(e,[(0,t.arrowHead)(e),0,e.padding,0])},down:function(e){return(0,t.arrowBBoxW)(e,[e.padding,0,(0,t.arrowHead)(e),0])},right:function(e){return(0,t.arrowBBoxHD)(e,[0,(0,t.arrowHead)(e),0,e.padding])},left:function(e){return(0,t.arrowBBoxHD)(e,[0,e.padding,0,(0,t.arrowHead)(e)])},updown:function(e){return(0,t.arrowBBoxW)(e,[(0,t.arrowHead)(e),0,(0,t.arrowHead)(e),0])},leftright:function(e){return(0,t.arrowBBoxHD)(e,[0,(0,t.arrowHead)(e),0,(0,t.arrowHead)(e)])}};t.CommonBorder=function(e){return function(r){var n=t.sideIndex[r];return[r,{renderer:e,bbox:function(t){var e=[0,0,0,0];return e[n]=t.thickness+t.padding,e},border:function(t){var e=[0,0,0,0];return e[n]=t.thickness,e}}]}};t.CommonBorder2=function(e){return function(r,n,o){var i=t.sideIndex[n],a=t.sideIndex[o];return[r,{renderer:e,bbox:function(t){var e=t.thickness+t.padding,r=[0,0,0,0];return r[i]=r[a]=e,r},border:function(t){var e=[0,0,0,0];return e[i]=e[a]=t.thickness,e},remove:n+" "+o}]}};t.CommonDiagonalStrike=function(e){return function(r){var n="mjx-"+r.charAt(0)+"strike";return[r+"diagonalstrike",{renderer:e(n),bbox:t.fullBBox}]}};t.CommonDiagonalArrow=function(r){return function(n){var o=e(t.diagonalArrowDef[n],4),i=o[0],a=o[1],s=o[2];return[n+"arrow",{renderer:function(t,n){var o=e(t.arrowAW(),2),l=o[0],c=o[1],u=t.arrow(c,i*(l-a),s);r(t,u)},bbox:function(t){var r=t.arrowData(),n=r.a,o=r.x,i=r.y,a=e([t.arrowhead.x,t.arrowhead.y,t.arrowhead.dx],3),s=a[0],l=a[1],c=a[2],u=e(t.getArgMod(s+c,l),2),d=u[0],p=u[1],m=i+(d>n?t.thickness*p*Math.sin(d-n):0),h=o+(d>Math.PI/2-n?t.thickness*p*Math.sin(d+n-Math.PI/2):0);return[m,h,m,h]},remove:o[3]}]}};t.CommonArrow=function(r){return function(n){var o=e(t.arrowDef[n],4),i=o[0],a=o[1],s=o[2],l=o[3];return[n+"arrow",{renderer:function(t,n){var o=t.getBBox(),l=o.w,c=o.h,u=o.d,d=e(s?[c+u,"X"]:[l,"Y"],2),p=d[0],m=d[1],h=t.getOffset(m),f=t.arrow(p,i,a,m,h);r(t,f)},bbox:t.arrowBBox[n],remove:l}]}}}(Notation$3),getDefaultExportFromCjs(Notation$3);var __extends$U=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__createBinding$8=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$8=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$8=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$8(e,t,r);return __setModuleDefault$8(e,t),e},__read$q=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$c=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$m=commonjsGlobal&&commonjsGlobal.__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(menclose,"__esModule",{value:!0}),menclose.CommonMencloseMixin=void 0;var Notation$2=__importStar$8(Notation$3),string_js_1$4=string;function CommonMencloseMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$c([],__read$q(e),!1))||this;return n.notations={},n.renderChild=null,n.msqrt=null,n.padding=Notation$2.PADDING,n.thickness=Notation$2.THICKNESS,n.arrowhead={x:Notation$2.ARROWX,y:Notation$2.ARROWY,dx:Notation$2.ARROWDX},n.TRBL=[0,0,0,0],n.getParameters(),n.getNotations(),n.removeRedundantNotations(),n.initializeNotations(),n.TRBL=n.getBBoxExtenders(),n}return __extends$U(e,t),e.prototype.getParameters=function(){var t=this.node.attributes,e=t.get("data-padding");void 0!==e&&(this.padding=this.length2em(e,Notation$2.PADDING));var r=t.get("data-thickness");void 0!==r&&(this.thickness=this.length2em(r,Notation$2.THICKNESS));var n=t.get("data-arrowhead");if(void 0!==n){var o=__read$q((0,string_js_1$4.split)(n),3),i=o[0],a=o[1],s=o[2];this.arrowhead={x:i?parseFloat(i):Notation$2.ARROWX,y:a?parseFloat(a):Notation$2.ARROWY,dx:s?parseFloat(s):Notation$2.ARROWDX}}},e.prototype.getNotations=function(){var t,e,r=this.constructor.notations;try{for(var n=__values$m((0,string_js_1$4.split)(this.node.attributes.get("notation"))),o=n.next();!o.done;o=n.next()){var i=o.value,a=r.get(i);a&&(this.notations[i]=a,a.renderChild&&(this.renderChild=a.renderer))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.removeRedundantNotations=function(){var t,e,r,n;try{for(var o=__values$m(Object.keys(this.notations)),i=o.next();!i.done;i=o.next()){var a=i.value;if(this.notations[a]){var s=this.notations[a].remove||"";try{for(var l=(r=void 0,__values$m(s.split(/ /))),c=l.next();!c.done;c=l.next()){var u=c.value;delete this.notations[u]}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.initializeNotations=function(){var t,e;try{for(var r=__values$m(Object.keys(this.notations)),n=r.next();!n.done;n=r.next()){var o=n.value,i=this.notations[o].init;i&&i(this)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=__read$q(this.TRBL,4),n=r[0],o=r[1],i=r[2],a=r[3],s=this.childNodes[0].getBBox();t.combine(s,a,0),t.h+=n,t.d+=i,t.w+=o,this.setChildPWidths(e)},e.prototype.getBBoxExtenders=function(){var t,e,r=[0,0,0,0];try{for(var n=__values$m(Object.keys(this.notations)),o=n.next();!o.done;o=n.next()){var i=o.value;this.maximizeEntries(r,this.notations[i].bbox(this))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},e.prototype.getPadding=function(){var t,e,r=this,n=[0,0,0,0];try{for(var o=__values$m(Object.keys(this.notations)),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.notations[a].border;s&&this.maximizeEntries(n,s(this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return[0,1,2,3].map((function(t){return r.TRBL[t]-n[t]}))},e.prototype.maximizeEntries=function(t,e){for(var r=0;r<t.length;r++)t[r]<e[r]&&(t[r]=e[r])},e.prototype.getOffset=function(t){var e=__read$q(this.TRBL,4),r=e[0],n=e[1],o=e[2],i=e[3],a=("X"===t?n-i:o-r)/2;return Math.abs(a)>.001?a:0},e.prototype.getArgMod=function(t,e){return[Math.atan2(e,t),Math.sqrt(t*t+e*e)]},e.prototype.arrow=function(t,e,r,n,o){return null},e.prototype.arrowData=function(){var t=__read$q([this.padding,this.thickness],2),e=t[0],r=t[1]*(this.arrowhead.x+Math.max(1,this.arrowhead.dx)),n=this.childNodes[0].getBBox(),o=n.h,i=n.d,a=n.w,s=o+i,l=Math.sqrt(s*s+a*a),c=Math.max(e,r*a/l),u=Math.max(e,r*s/l),d=__read$q(this.getArgMod(a+2*c,s+2*u),2);return{a:d[0],W:d[1],x:c,y:u}},e.prototype.arrowAW=function(){var t=this.childNodes[0].getBBox(),e=t.h,r=t.d,n=t.w,o=__read$q(this.TRBL,4),i=o[0],a=o[1],s=o[2],l=o[3];return this.getArgMod(l+n+a,i+e+r+s)},e.prototype.createMsqrt=function(t){var e=this.node.factory.create("msqrt");e.inheritAttributesFrom(this.node),e.childNodes[0]=t.node;var r=this.wrap(e);return r.parent=this,r},e.prototype.sqrtTRBL=function(){var t=this.msqrt.getBBox(),e=this.msqrt.childNodes[0].getBBox();return[t.h-e.h,0,t.d-e.d,t.w-e.w]},e}(t)}menclose.CommonMencloseMixin=CommonMencloseMixin;var Notation$1={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),r=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o in t)"default"!==o&&Object.prototype.hasOwnProperty.call(t,o)&&e(n,t,o);return r(n,t),n},o=commonjsGlobal&&commonjsGlobal.__exportStar||function(t,r){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||e(r,t,n)},i=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.DiagonalArrow=t.DiagonalStrike=t.Border2=t.Border=t.RenderElement=void 0;var a=n(Notation$3);o(Notation$3,t);t.RenderElement=function(t,e){return void 0===e&&(e=""),function(r,n){var o=r.adjustBorder(r.html("mjx-"+t));if(e){var i=r.getOffset(e);if(r.thickness!==a.THICKNESS||i){var s="translate".concat(e,"(").concat(r.em(r.thickness/2-i),")");r.adaptor.setStyle(o,"transform",s)}}r.adaptor.append(r.chtml,o)}};t.Border=function(t){return a.CommonBorder((function(e,r){e.adaptor.setStyle(r,"border-"+t,e.em(e.thickness)+" solid")}))(t)};t.Border2=function(t,e,r){return a.CommonBorder2((function(t,n){var o=t.em(t.thickness)+" solid";t.adaptor.setStyle(n,"border-"+e,o),t.adaptor.setStyle(n,"border-"+r,o)}))(t,e,r)};t.DiagonalStrike=function(t,e){return a.CommonDiagonalStrike((function(t){return function(r,n){var o=r.getBBox(),a=o.w,s=o.h,l=o.d,c=i(r.getArgMod(a,s+l),2),u=c[0],d=c[1],p=e*r.thickness/2,m=r.adjustBorder(r.html(t,{style:{width:r.em(d),transform:"rotate("+r.fixed(-e*u)+"rad) translateY("+p+"em)"}}));r.adaptor.append(r.chtml,m)}}))(t)};t.DiagonalArrow=function(t){return a.CommonDiagonalArrow((function(t,e){t.adaptor.append(t.chtml,e)}))(t)};t.Arrow=function(t){return a.CommonArrow((function(t,e){t.adaptor.append(t.chtml,e)}))(t)}}(Notation$1),getDefaultExportFromCjs(Notation$1);var __extends$T=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__createBinding$7=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$7=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$7=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$7(e,t,r);return __setModuleDefault$7(e,t),e},__values$l=commonjsGlobal&&commonjsGlobal.__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.")},__read$p=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(menclose$1,"__esModule",{value:!0}),menclose$1.CHTMLmenclose=void 0;var Wrapper_js_1$e=Wrapper$2,menclose_js_1$1=menclose,Notation=__importStar$7(Notation$1),menclose_js_2=menclose$2,lengths_js_1$2=lengths;function Angle(t,e){return Math.atan2(t,e).toFixed(3).replace(/\.?0+$/,"")}var ANGLE=Angle(Notation.ARROWDX,Notation.ARROWY),CHTMLmenclose=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$T(e,t),e.prototype.toCHTML=function(t){var e,r,n,o,i=this.adaptor,a=this.standardCHTMLnode(t),s=i.append(a,this.html("mjx-box"));this.renderChild?this.renderChild(this,s):this.childNodes[0].toCHTML(s);try{for(var l=__values$l(Object.keys(this.notations)),c=l.next();!c.done;c=l.next()){var u=c.value,d=this.notations[u];!d.renderChild&&d.renderer(this,s)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}var p=this.getPadding();try{for(var m=__values$l(Notation.sideNames),h=m.next();!h.done;h=m.next()){var f=h.value,_=Notation.sideIndex[f];p[_]>0&&i.setStyle(s,"padding-"+f,this.em(p[_]))}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}},e.prototype.arrow=function(t,e,r,n,o){void 0===n&&(n=""),void 0===o&&(o=0);var i=this.getBBox().w,a={width:this.em(t)};i!==t&&(a.left=this.em((i-t)/2)),e&&(a.transform="rotate("+this.fixed(e)+"rad)");var s=this.html("mjx-arrow",{style:a},[this.html("mjx-aline"),this.html("mjx-rthead"),this.html("mjx-rbhead")]);return r&&(this.adaptor.append(s,this.html("mjx-lthead")),this.adaptor.append(s,this.html("mjx-lbhead")),this.adaptor.setAttribute(s,"double","true")),this.adjustArrow(s,r),this.moveArrow(s,n,o),s},e.prototype.adjustArrow=function(t,e){var r=this,n=this.thickness,o=this.arrowhead;if(o.x!==Notation.ARROWX||o.y!==Notation.ARROWY||o.dx!==Notation.ARROWDX||n!==Notation.THICKNESS){var i=__read$p([n*o.x,n*o.y].map((function(t){return r.em(t)})),2),a=i[0],s=i[1],l=Angle(o.dx,o.y),c=__read$p(this.adaptor.childNodes(t),5),u=c[0],d=c[1],p=c[2],m=c[3],h=c[4];this.adjustHead(d,[s,"0","1px",a],l),this.adjustHead(p,["1px","0",s,a],"-"+l),this.adjustHead(m,[s,a,"1px","0"],"-"+l),this.adjustHead(h,["1px",a,s,"0"],l),this.adjustLine(u,n,o.x,e)}},e.prototype.adjustHead=function(t,e,r){t&&(this.adaptor.setStyle(t,"border-width",e.join(" ")),this.adaptor.setStyle(t,"transform","skewX("+r+"rad)"))},e.prototype.adjustLine=function(t,e,r,n){this.adaptor.setStyle(t,"borderTop",this.em(e)+" solid"),this.adaptor.setStyle(t,"top",this.em(-e/2)),this.adaptor.setStyle(t,"right",this.em(e*(r-1))),n&&this.adaptor.setStyle(t,"left",this.em(e*(r-1)))},e.prototype.moveArrow=function(t,e,r){if(r){var n=this.adaptor.getStyle(t,"transform");this.adaptor.setStyle(t,"transform","translate".concat(e,"(").concat(this.em(-r),")").concat(n?" "+n:""))}},e.prototype.adjustBorder=function(t){return this.thickness!==Notation.THICKNESS&&this.adaptor.setStyle(t,"borderWidth",this.em(this.thickness)),t},e.prototype.adjustThickness=function(t){return this.thickness!==Notation.THICKNESS&&this.adaptor.setStyle(t,"strokeWidth",this.fixed(this.thickness)),t},e.prototype.fixed=function(t,e){return void 0===e&&(e=3),Math.abs(t)<6e-4?"0":t.toFixed(e).replace(/\.?0+$/,"")},e.prototype.em=function(e){return t.prototype.em.call(this,e)},e.kind=menclose_js_2.MmlMenclose.prototype.kind,e.styles={"mjx-menclose":{position:"relative"},"mjx-menclose > mjx-dstrike":{display:"inline-block",left:0,top:0,position:"absolute","border-top":Notation.SOLID,"transform-origin":"top left"},"mjx-menclose > mjx-ustrike":{display:"inline-block",left:0,bottom:0,position:"absolute","border-top":Notation.SOLID,"transform-origin":"bottom left"},"mjx-menclose > mjx-hstrike":{"border-top":Notation.SOLID,position:"absolute",left:0,right:0,bottom:"50%",transform:"translateY("+(0,lengths_js_1$2.em)(Notation.THICKNESS/2)+")"},"mjx-menclose > mjx-vstrike":{"border-left":Notation.SOLID,position:"absolute",top:0,bottom:0,right:"50%",transform:"translateX("+(0,lengths_js_1$2.em)(Notation.THICKNESS/2)+")"},"mjx-menclose > mjx-rbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:Notation.SOLID,"border-radius":(0,lengths_js_1$2.em)(Notation.THICKNESS+Notation.PADDING)},"mjx-menclose > mjx-cbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:Notation.SOLID,"border-radius":"50%"},"mjx-menclose > mjx-arrow":{position:"absolute",left:0,bottom:"50%",height:0,width:0},"mjx-menclose > mjx-arrow > *":{display:"block",position:"absolute","transform-origin":"bottom","border-left":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWX)+" solid","border-right":0,"box-sizing":"border-box"},"mjx-menclose > mjx-arrow > mjx-aline":{left:0,top:(0,lengths_js_1$2.em)(-Notation.THICKNESS/2),right:(0,lengths_js_1$2.em)(Notation.THICKNESS*(Notation.ARROWX-1)),height:0,"border-top":(0,lengths_js_1$2.em)(Notation.THICKNESS)+" solid","border-left":0},"mjx-menclose > mjx-arrow[double] > mjx-aline":{left:(0,lengths_js_1$2.em)(Notation.THICKNESS*(Notation.ARROWX-1)),height:0},"mjx-menclose > mjx-arrow > mjx-rthead":{transform:"skewX("+ANGLE+"rad)",right:0,bottom:"-1px","border-bottom":"1px solid transparent","border-top":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWY)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-rbhead":{transform:"skewX(-"+ANGLE+"rad)","transform-origin":"top",right:0,top:"-1px","border-top":"1px solid transparent","border-bottom":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWY)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lthead":{transform:"skewX(-"+ANGLE+"rad)",left:0,bottom:"-1px","border-left":0,"border-right":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWX)+" solid","border-bottom":"1px solid transparent","border-top":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWY)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lbhead":{transform:"skewX("+ANGLE+"rad)","transform-origin":"top",left:0,top:"-1px","border-left":0,"border-right":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWX)+" solid","border-top":"1px solid transparent","border-bottom":(0,lengths_js_1$2.em)(Notation.THICKNESS*Notation.ARROWY)+" solid transparent"},"mjx-menclose > dbox":{position:"absolute",top:0,bottom:0,left:(0,lengths_js_1$2.em)(-1.5*Notation.PADDING),width:(0,lengths_js_1$2.em)(3*Notation.PADDING),border:(0,lengths_js_1$2.em)(Notation.THICKNESS)+" solid","border-radius":"50%","clip-path":"inset(0 0 0 "+(0,lengths_js_1$2.em)(1.5*Notation.PADDING)+")","box-sizing":"border-box"}},e.notations=new Map([Notation.Border("top"),Notation.Border("right"),Notation.Border("bottom"),Notation.Border("left"),Notation.Border2("actuarial","top","right"),Notation.Border2("madruwb","bottom","right"),Notation.DiagonalStrike("up",1),Notation.DiagonalStrike("down",-1),["horizontalstrike",{renderer:Notation.RenderElement("hstrike","Y"),bbox:function(t){return[0,t.padding,0,t.padding]}}],["verticalstrike",{renderer:Notation.RenderElement("vstrike","X"),bbox:function(t){return[t.padding,0,t.padding,0]}}],["box",{renderer:function(t,e){t.adaptor.setStyle(e,"border",t.em(t.thickness)+" solid")},bbox:Notation.fullBBox,border:Notation.fullBorder,remove:"left right top bottom"}],["roundedbox",{renderer:Notation.RenderElement("rbox"),bbox:Notation.fullBBox}],["circle",{renderer:Notation.RenderElement("cbox"),bbox:Notation.fullBBox}],["phasorangle",{renderer:function(t,e){var r=t.getBBox(),n=r.h,o=r.d,i=__read$p(t.getArgMod(1.75*t.padding,n+o),2),a=i[0],s=i[1],l=t.thickness*Math.sin(a)*.9;t.adaptor.setStyle(e,"border-bottom",t.em(t.thickness)+" solid");var c=t.adjustBorder(t.html("mjx-ustrike",{style:{width:t.em(s),transform:"translateX("+t.em(l)+") rotate("+t.fixed(-a)+"rad)"}}));t.adaptor.append(t.chtml,c)},bbox:function(t){var e=t.padding/2,r=t.thickness;return[2*e,e,e+r,3*e+r]},border:function(t){return[0,0,t.thickness,0]},remove:"bottom"}],Notation.Arrow("up"),Notation.Arrow("down"),Notation.Arrow("left"),Notation.Arrow("right"),Notation.Arrow("updown"),Notation.Arrow("leftright"),Notation.DiagonalArrow("updiagonal"),Notation.DiagonalArrow("northeast"),Notation.DiagonalArrow("southeast"),Notation.DiagonalArrow("northwest"),Notation.DiagonalArrow("southwest"),Notation.DiagonalArrow("northeastsouthwest"),Notation.DiagonalArrow("northwestsoutheast"),["longdiv",{renderer:function(t,e){var r=t.adaptor;r.setStyle(e,"border-top",t.em(t.thickness)+" solid");var n=r.append(t.chtml,t.html("dbox")),o=t.thickness,i=t.padding;o!==Notation.THICKNESS&&r.setStyle(n,"border-width",t.em(o)),i!==Notation.PADDING&&(r.setStyle(n,"left",t.em(-1.5*i)),r.setStyle(n,"width",t.em(3*i)),r.setStyle(n,"clip-path","inset(0 0 0 "+t.em(1.5*i)+")"))},bbox:function(t){var e=t.padding,r=t.thickness;return[e+r,e,e,2*e+r/2]}}],["radical",{renderer:function(t,e){t.msqrt.toCHTML(e);var r=t.sqrtTRBL();t.adaptor.setStyle(t.msqrt.chtml,"margin",r.map((function(e){return t.em(-e)})).join(" "))},init:function(t){t.msqrt=t.createMsqrt(t.childNodes[0])},bbox:function(t){return t.sqrtTRBL()},renderChild:!0}]]),e}((0,menclose_js_1$1.CommonMencloseMixin)(Wrapper_js_1$e.CHTMLWrapper));menclose$1.CHTMLmenclose=CHTMLmenclose;var mrow$1={},mrow={},__extends$S=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$o=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$b=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$k=commonjsGlobal&&commonjsGlobal.__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(mrow,"__esModule",{value:!0}),mrow.CommonInferredMrowMixin=mrow.CommonMrowMixin=void 0;var BBox_js_1$2=BBox$1;function CommonMrowMixin(t){return function(t){function e(){for(var e,r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=t.apply(this,__spreadArray$b([],__read$o(n),!1))||this;i.stretchChildren();try{for(var a=__values$k(i.childNodes),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.bbox.pwidth){i.bbox.pwidth=BBox_js_1$2.BBox.fullWidth;break}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return i}return __extends$S(e,t),Object.defineProperty(e.prototype,"fixesPWidth",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.stretchChildren=function(){var t,e,r,n,o,i,a=[];try{for(var s=__values$k(this.childNodes),l=s.next();!l.done;l=s.next()){(S=l.value).canStretch(1)&&a.push(S)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}var c=a.length,u=this.childNodes.length;if(c&&u>1){var d=0,p=0,m=c>1&&c===u;try{for(var h=__values$k(this.childNodes),f=h.next();!f.done;f=h.next()){var _=0===(S=f.value).stretch.dir;if(m||_){var g=S.getOuterBBox(_),y=g.h,b=g.d,v=g.rscale;(y*=v)>d&&(d=y),(b*=v)>p&&(p=b)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}try{for(var x=__values$k(a),M=x.next();!M.done;M=x.next()){var S;(S=M.value).coreMO().getStretchedVariant([d,p])}}catch(t){o={error:t}}finally{try{M&&!M.done&&(i=x.return)&&i.call(x)}finally{if(o)throw o.error}}}},e}(t)}function CommonInferredMrowMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$S(e,t),e.prototype.getScale=function(){this.bbox.scale=this.parent.bbox.scale,this.bbox.rscale=1},e}(t)}mrow.CommonMrowMixin=CommonMrowMixin,mrow.CommonInferredMrowMixin=CommonInferredMrowMixin;var __extends$R=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$j=commonjsGlobal&&commonjsGlobal.__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(mrow$1,"__esModule",{value:!0}),mrow$1.CHTMLinferredMrow=mrow$1.CHTMLmrow=void 0;var Wrapper_js_1$d=Wrapper$2,mrow_js_1$1=mrow,mrow_js_2=mrow,mrow_js_3=mrow$2,CHTMLmrow=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$R(e,t),e.prototype.toCHTML=function(t){var e,r,n=this.node.isInferred?this.chtml=t:this.standardCHTMLnode(t),o=!1;try{for(var i=__values$j(this.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;s.toCHTML(n),s.bbox.w<0&&(o=!0)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}if(o){var l=this.getBBox().w;l&&(this.adaptor.setStyle(n,"width",this.em(Math.max(0,l))),l<0&&this.adaptor.setStyle(n,"marginRight",this.em(l)))}},e.kind=mrow_js_3.MmlMrow.prototype.kind,e}((0,mrow_js_1$1.CommonMrowMixin)(Wrapper_js_1$d.CHTMLWrapper));mrow$1.CHTMLmrow=CHTMLmrow;var CHTMLinferredMrow=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$R(e,t),e.kind=mrow_js_3.MmlInferredMrow.prototype.kind,e}((0,mrow_js_2.CommonInferredMrowMixin)(CHTMLmrow));mrow$1.CHTMLinferredMrow=CHTMLinferredMrow;var mfenced$1={},mfenced={},__extends$Q=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$n=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$a=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$i=commonjsGlobal&&commonjsGlobal.__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.")};function CommonMfencedMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$a([],__read$n(e),!1))||this;return n.mrow=null,n.createMrow(),n.addMrowChildren(),n}return __extends$Q(e,t),e.prototype.createMrow=function(){var t=this.node.factory.create("inferredMrow");t.inheritAttributesFrom(this.node),this.mrow=this.wrap(t),this.mrow.parent=this},e.prototype.addMrowChildren=function(){var t,e,r=this.node,n=this.mrow;this.addMo(r.open),this.childNodes.length&&n.childNodes.push(this.childNodes[0]);var o=0;try{for(var i=__values$i(this.childNodes.slice(1)),a=i.next();!a.done;a=i.next()){var s=a.value;this.addMo(r.separators[o++]),n.childNodes.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.addMo(r.close),n.stretchChildren()},e.prototype.addMo=function(t){if(t){var e=this.wrap(t);this.mrow.childNodes.push(e),e.parent=this.mrow}},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1),t.updateFrom(this.mrow.getOuterBBox()),this.setChildPWidths(e)},e}(t)}Object.defineProperty(mfenced,"__esModule",{value:!0}),mfenced.CommonMfencedMixin=void 0,mfenced.CommonMfencedMixin=CommonMfencedMixin;var __extends$P=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mfenced$1,"__esModule",{value:!0}),mfenced$1.CHTMLmfenced=void 0;var Wrapper_js_1$c=Wrapper$2,mfenced_js_1$1=mfenced,mfenced_js_2=mfenced$2,CHTMLmfenced=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$P(e,t),e.prototype.toCHTML=function(t){var e=this.standardCHTMLnode(t);this.mrow.toCHTML(e)},e.kind=mfenced_js_2.MmlMfenced.prototype.kind,e}((0,mfenced_js_1$1.CommonMfencedMixin)(Wrapper_js_1$c.CHTMLWrapper));mfenced$1.CHTMLmfenced=CHTMLmfenced;var mfrac$1={},mfrac={},__extends$O=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$m=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$9=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};function CommonMfracMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$9([],__read$m(e),!1))||this;if(n.bevel=null,n.pad=n.node.getProperty("withDelims")?0:n.font.params.nulldelimiterspace,n.node.attributes.get("bevelled")){var o=n.getBevelData(n.isDisplay()).H,i=n.bevel=n.createMo("/");i.node.attributes.set("symmetric",!0),i.canStretch(1),i.getStretchedVariant([o],!0)}return n}return __extends$O(e,t),e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1),t.empty();var r=this.node.attributes.getList("linethickness","bevelled"),n=r.linethickness,o=r.bevelled,i=this.isDisplay(),a=null;if(o)this.getBevelledBBox(t,i);else{var s=this.length2em(String(n),.06);a=-2*this.pad,0===s?this.getAtopBBox(t,i):(this.getFractionBBox(t,i,s),a-=.2),a+=t.w}t.clean(),this.setChildPWidths(e,a)},e.prototype.getFractionBBox=function(t,e,r){var n=this.childNodes[0].getOuterBBox(),o=this.childNodes[1].getOuterBBox(),i=this.font.params.axis_height,a=this.getTUV(e,r),s=a.T,l=a.u,c=a.v;t.combine(n,0,i+s+Math.max(n.d*n.rscale,l)),t.combine(o,0,i-s-Math.max(o.h*o.rscale,c)),t.w+=2*this.pad+.2},e.prototype.getTUV=function(t,e){var r=this.font.params,n=r.axis_height,o=(t?3.5:1.5)*e;return{T:(t?3.5:1.5)*e,u:(t?r.num1:r.num2)-n-o,v:(t?r.denom1:r.denom2)+n-o}},e.prototype.getAtopBBox=function(t,e){var r=this.getUVQ(e),n=r.u,o=r.v,i=r.nbox,a=r.dbox;t.combine(i,0,n),t.combine(a,0,-o),t.w+=2*this.pad},e.prototype.getUVQ=function(t){var e=this.childNodes[0].getOuterBBox(),r=this.childNodes[1].getOuterBBox(),n=this.font.params,o=__read$m(t?[n.num1,n.denom1]:[n.num3,n.denom2],2),i=o[0],a=o[1],s=(t?7:3)*n.rule_thickness,l=i-e.d*e.scale-(r.h*r.scale-a);return l<s&&(i+=(s-l)/2,a+=(s-l)/2,l=s),{u:i,v:a,q:l,nbox:e,dbox:r}},e.prototype.getBevelledBBox=function(t,e){var r=this.getBevelData(e),n=r.u,o=r.v,i=r.delta,a=r.nbox,s=r.dbox,l=this.bevel.getOuterBBox();t.combine(a,0,n),t.combine(l,t.w-i/2,0),t.combine(s,t.w-i/2,o)},e.prototype.getBevelData=function(t){var e=this.childNodes[0].getOuterBBox(),r=this.childNodes[1].getOuterBBox(),n=t?.4:.15,o=Math.max(e.scale*(e.h+e.d),r.scale*(r.h+r.d))+2*n,i=this.font.params.axis_height;return{H:o,delta:n,u:e.scale*(e.d-e.h)/2+i+n,v:r.scale*(r.d-r.h)/2+i-n,nbox:e,dbox:r}},e.prototype.canStretch=function(t){return!1},e.prototype.isDisplay=function(){var t=this.node.attributes.getList("displaystyle","scriptlevel"),e=t.displaystyle,r=t.scriptlevel;return e&&0===r},e.prototype.getWrapWidth=function(t){var e=this.node.attributes;return e.get("bevelled")?this.childNodes[t].getOuterBBox().w:this.getBBox().w-(this.length2em(e.get("linethickness"))?.2:0)-2*this.pad},e.prototype.getChildAlign=function(t){var e=this.node.attributes;return e.get("bevelled")?"left":e.get(["numalign","denomalign"][t])},e}(t)}Object.defineProperty(mfrac,"__esModule",{value:!0}),mfrac.CommonMfracMixin=void 0,mfrac.CommonMfracMixin=CommonMfracMixin;var __extends$N=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$5=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$5=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$5.apply(this,arguments)};Object.defineProperty(mfrac$1,"__esModule",{value:!0}),mfrac$1.CHTMLmfrac=void 0;var Wrapper_js_1$b=Wrapper$2,mfrac_js_1$1=mfrac,mfrac_js_2=mfrac$2,CHTMLmfrac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$N(e,t),e.prototype.toCHTML=function(t){this.standardCHTMLnode(t);var e=this.node.attributes.getList("linethickness","bevelled"),r=e.linethickness,n=e.bevelled,o=this.isDisplay();if(n)this.makeBevelled(o);else{var i=this.length2em(String(r),.06);0===i?this.makeAtop(o):this.makeFraction(o,i)}},e.prototype.makeFraction=function(t,e){var r,n,o=this.node.attributes.getList("numalign","denomalign"),i=o.numalign,a=o.denomalign,s=t?{type:"d"}:{},l=this.node.getProperty("withDelims")?__assign$5(__assign$5({},s),{delims:"true"}):__assign$5({},s),c="center"!==i?{align:i}:{},u="center"!==a?{align:a}:{},d=__assign$5({},s),p=__assign$5({},s),m=this.font.params;if(.06!==e){var h=m.axis_height,f=this.em(e),_=this.getTUV(t,e),g=_.T,y=_.u,b=_.v,v=(t?this.em(3*e):f)+" -.1em";s.style={height:f,"border-top":f+" solid",margin:v};var x=this.em(Math.max(0,y));p.style={height:x,"vertical-align":"-"+x},d.style={height:this.em(Math.max(0,b))},l.style={"vertical-align":this.em(h-g)}}this.adaptor.append(this.chtml,this.html("mjx-frac",l,[r=this.html("mjx-num",c,[this.html("mjx-nstrut",p)]),this.html("mjx-dbox",{},[this.html("mjx-dtable",{},[this.html("mjx-line",s),this.html("mjx-row",{},[n=this.html("mjx-den",u,[this.html("mjx-dstrut",d)])])])])])),this.childNodes[0].toCHTML(r),this.childNodes[1].toCHTML(n)},e.prototype.makeAtop=function(t){var e,r,n=this.node.attributes.getList("numalign","denomalign"),o=n.numalign,i=n.denomalign,a=t?{type:"d",atop:!0}:{atop:!0},s=this.node.getProperty("withDelims")?__assign$5(__assign$5({},a),{delims:!0}):__assign$5({},a),l="center"!==o?{align:o}:{},c="center"!==i?{align:i}:{},u=this.getUVQ(t),d=u.v,p=u.q;l.style={"padding-bottom":this.em(p)},s.style={"vertical-align":this.em(-d)},this.adaptor.append(this.chtml,this.html("mjx-frac",s,[e=this.html("mjx-num",l),r=this.html("mjx-den",c)])),this.childNodes[0].toCHTML(e),this.childNodes[1].toCHTML(r)},e.prototype.makeBevelled=function(t){var e=this.adaptor;e.setAttribute(this.chtml,"bevelled","ture");var r=e.append(this.chtml,this.html("mjx-num"));this.childNodes[0].toCHTML(r),this.bevel.toCHTML(this.chtml);var n=e.append(this.chtml,this.html("mjx-den"));this.childNodes[1].toCHTML(n);var o=this.getBevelData(t),i=o.u,a=o.v,s=o.delta,l=o.nbox,c=o.dbox;i&&e.setStyle(r,"verticalAlign",this.em(i/l.scale)),a&&e.setStyle(n,"verticalAlign",this.em(a/c.scale));var u=this.em(-s/2);e.setStyle(this.bevel.chtml,"marginLeft",u),e.setStyle(this.bevel.chtml,"marginRight",u)},e.kind=mfrac_js_2.MmlMfrac.prototype.kind,e.styles={"mjx-frac":{display:"inline-block","vertical-align":"0.17em",padding:"0 .22em"},'mjx-frac[type="d"]':{"vertical-align":".04em"},"mjx-frac[delims]":{padding:"0 .1em"},"mjx-frac[atop]":{padding:"0 .12em"},"mjx-frac[atop][delims]":{padding:"0"},"mjx-dtable":{display:"inline-table",width:"100%"},"mjx-dtable > *":{"font-size":"2000%"},"mjx-dbox":{display:"block","font-size":"5%"},"mjx-num":{display:"block","text-align":"center"},"mjx-den":{display:"block","text-align":"center"},"mjx-mfrac[bevelled] > mjx-num":{display:"inline-block"},"mjx-mfrac[bevelled] > mjx-den":{display:"inline-block"},'mjx-den[align="right"], mjx-num[align="right"]':{"text-align":"right"},'mjx-den[align="left"], mjx-num[align="left"]':{"text-align":"left"},"mjx-nstrut":{display:"inline-block",height:".054em",width:0,"vertical-align":"-.054em"},'mjx-nstrut[type="d"]':{height:".217em","vertical-align":"-.217em"},"mjx-dstrut":{display:"inline-block",height:".505em",width:0},'mjx-dstrut[type="d"]':{height:".726em"},"mjx-line":{display:"block","box-sizing":"border-box","min-height":"1px",height:".06em","border-top":".06em solid",margin:".06em -.1em",overflow:"hidden"},'mjx-line[type="d"]':{margin:".18em -.1em"}},e}((0,mfrac_js_1$1.CommonMfracMixin)(Wrapper_js_1$b.CHTMLWrapper));mfrac$1.CHTMLmfrac=CHTMLmfrac;var msqrt$1={},msqrt={},__extends$M=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$l=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$8=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(msqrt,"__esModule",{value:!0}),msqrt.CommonMsqrtMixin=void 0;var BBox_js_1$1=BBox$1;function CommonMsqrtMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$8([],__read$l(e),!1))||this,o=n.createMo("√");o.canStretch(1);var i=n.childNodes[n.base].getOuterBBox(),a=i.h,s=i.d,l=n.font.params.rule_thickness,c=n.node.attributes.get("displaystyle")?n.font.params.x_height:l;return n.surdH=a+s+2*l+c/4,o.getStretchedVariant([n.surdH-s,s],!0),n}return __extends$M(e,t),Object.defineProperty(e.prototype,"base",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"surd",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.createMo=function(e){var r=t.prototype.createMo.call(this,e);return this.childNodes.push(r),r},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=this.childNodes[this.surd].getBBox(),n=new BBox_js_1$1.BBox(this.childNodes[this.base].getOuterBBox()),o=this.getPQ(r)[1],i=this.font.params.rule_thickness,a=n.h+o+i,s=__read$l(this.getRootDimens(r,a),1)[0];t.h=a+i,this.combineRootBBox(t,r,a),t.combine(r,s,a-r.h),t.combine(n,s+r.w,0),t.clean(),this.setChildPWidths(e)},e.prototype.combineRootBBox=function(t,e,r){},e.prototype.getPQ=function(t){var e=this.font.params.rule_thickness,r=this.node.attributes.get("displaystyle")?this.font.params.x_height:e;return[r,t.h+t.d>this.surdH?(t.h+t.d-(this.surdH-2*e-r/2))/2:e+r/4]},e.prototype.getRootDimens=function(t,e){return[0,0,0,0]},e}(t)}msqrt.CommonMsqrtMixin=CommonMsqrtMixin;var __extends$L=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$k=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(msqrt$1,"__esModule",{value:!0}),msqrt$1.CHTMLmsqrt=void 0;var Wrapper_js_1$a=Wrapper$2,msqrt_js_1$2=msqrt,msqrt_js_2=msqrt$2,CHTMLmsqrt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$L(e,t),e.prototype.toCHTML=function(t){var e,r,n,o,i=this.childNodes[this.surd],a=this.childNodes[this.base],s=i.getBBox(),l=a.getOuterBBox(),c=__read$k(this.getPQ(s),2)[1],u=this.font.params.rule_thickness,d=l.h+c+u,p=this.standardCHTMLnode(t);null!=this.root&&(n=this.adaptor.append(p,this.html("mjx-root")),o=this.childNodes[this.root]);var m=this.adaptor.append(p,this.html("mjx-sqrt",{},[e=this.html("mjx-surd"),r=this.html("mjx-box",{style:{paddingTop:this.em(c)}})]));this.addRoot(n,o,s,d),i.toCHTML(e),a.toCHTML(r),i.size<0&&this.adaptor.addClass(m,"mjx-tall")},e.prototype.addRoot=function(t,e,r,n){},e.kind=msqrt_js_2.MmlMsqrt.prototype.kind,e.styles={"mjx-root":{display:"inline-block","white-space":"nowrap"},"mjx-surd":{display:"inline-block","vertical-align":"top"},"mjx-sqrt":{display:"inline-block","padding-top":".07em"},"mjx-sqrt > mjx-box":{"border-top":".07em solid"},"mjx-sqrt.mjx-tall > mjx-box":{"padding-left":".3em","margin-left":"-.3em"}},e}((0,msqrt_js_1$2.CommonMsqrtMixin)(Wrapper_js_1$a.CHTMLWrapper));msqrt$1.CHTMLmsqrt=CHTMLmsqrt;var mroot$1={},mroot={},__extends$K=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMrootMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$K(e,t),Object.defineProperty(e.prototype,"surd",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return 1},enumerable:!1,configurable:!0}),e.prototype.combineRootBBox=function(t,e,r){var n=this.childNodes[this.root].getOuterBBox(),o=this.getRootDimens(e,r)[1];t.combine(n,0,o)},e.prototype.getRootDimens=function(t,e){var r=this.childNodes[this.surd],n=this.childNodes[this.root].getOuterBBox(),o=(r.size<0?.5:.6)*t.w,i=n.w,a=n.rscale,s=Math.max(i,o/a),l=Math.max(0,s-i);return[s*a-o,this.rootHeight(n,t,r.size,e),l]},e.prototype.rootHeight=function(t,e,r,n){var o=e.h+e.d;return(r<0?1.9:.55*o)-(o-n)+Math.max(0,t.d*t.rscale)},e}(t)}Object.defineProperty(mroot,"__esModule",{value:!0}),mroot.CommonMrootMixin=void 0,mroot.CommonMrootMixin=CommonMrootMixin;var __extends$J=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$j=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(mroot$1,"__esModule",{value:!0}),mroot$1.CHTMLmroot=void 0;var msqrt_js_1$1=msqrt$1,mroot_js_1$1=mroot,mroot_js_2=mroot$2,CHTMLmroot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$J(e,t),e.prototype.addRoot=function(t,e,r,n){e.toCHTML(t);var o=__read$j(this.getRootDimens(r,n),3),i=o[0],a=o[1],s=o[2];this.adaptor.setStyle(t,"verticalAlign",this.em(a)),this.adaptor.setStyle(t,"width",this.em(i)),s&&this.adaptor.setStyle(this.adaptor.firstChild(t),"paddingLeft",this.em(s))},e.kind=mroot_js_2.MmlMroot.prototype.kind,e}((0,mroot_js_1$1.CommonMrootMixin)(msqrt_js_1$1.CHTMLmsqrt));mroot$1.CHTMLmroot=CHTMLmroot;var msubsup$1={},scriptbase$1={},scriptbase={},__extends$I=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$i=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$7=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$h=commonjsGlobal&&commonjsGlobal.__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(scriptbase,"__esModule",{value:!0}),scriptbase.CommonScriptbaseMixin=void 0;var MmlNode_js_1$b=MmlNode;function CommonScriptbaseMixin(t){var e;return e=function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$7([],__read$i(e),!1))||this;n.baseScale=1,n.baseIc=0,n.baseRemoveIc=!1,n.baseIsChar=!1,n.baseHasAccentOver=null,n.baseHasAccentUnder=null,n.isLineAbove=!1,n.isLineBelow=!1,n.isMathAccent=!1;var o=n.baseCore=n.getBaseCore();return o?(n.setBaseAccentsFor(o),n.baseScale=n.getBaseScale(),n.baseIc=n.getBaseIc(),n.baseIsChar=n.isCharBase(),n.isMathAccent=n.baseIsChar&&n.scriptChild&&!!n.scriptChild.coreMO().node.getProperty("mathaccent"),n.checkLineAccents(),n.baseRemoveIc=!n.isLineAbove&&!n.isLineBelow&&(!n.constructor.useIC||n.isMathAccent),n):n}return __extends$I(e,t),Object.defineProperty(e.prototype,"baseChild",{get:function(){return this.childNodes[this.node.base]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scriptChild",{get:function(){return this.childNodes[1]},enumerable:!1,configurable:!0}),e.prototype.getBaseCore=function(){for(var t=this.getSemanticBase()||this.childNodes[0];t&&(1===t.childNodes.length&&(t.node.isKind("mrow")||t.node.isKind("TeXAtom")&&t.node.texClass!==MmlNode_js_1$b.TEXCLASS.VCENTER||t.node.isKind("mstyle")||t.node.isKind("mpadded")||t.node.isKind("mphantom")||t.node.isKind("semantics"))||t.node.isKind("munderover")&&t.isMathAccent);)this.setBaseAccentsFor(t),t=t.childNodes[0];return t||(this.baseHasAccentOver=this.baseHasAccentUnder=!1),t||this.childNodes[0]},e.prototype.setBaseAccentsFor=function(t){t.node.isKind("munderover")&&(null===this.baseHasAccentOver&&(this.baseHasAccentOver=!!t.node.attributes.get("accent")),null===this.baseHasAccentUnder&&(this.baseHasAccentUnder=!!t.node.attributes.get("accentunder")))},e.prototype.getSemanticBase=function(){var t=this.node.attributes.getExplicit("data-semantic-fencepointer");return this.getBaseFence(this.baseChild,t)},e.prototype.getBaseFence=function(t,e){var r,n;if(!t||!t.node.attributes||!e)return null;if(t.node.attributes.getExplicit("data-semantic-id")===e)return t;try{for(var o=__values$h(t.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.getBaseFence(a,e);if(s)return s}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null},e.prototype.getBaseScale=function(){for(var t=this.baseCore,e=1;t&&t!==this;){e*=t.getOuterBBox().rscale,t=t.parent}return e},e.prototype.getBaseIc=function(){return this.baseCore.getOuterBBox().ic*this.baseScale},e.prototype.getAdjustedIc=function(){var t=this.baseCore.getOuterBBox();return(t.ic?1.05*t.ic+.05:0)*this.baseScale},e.prototype.isCharBase=function(){var t=this.baseCore;return(t.node.isKind("mo")&&null===t.size||t.node.isKind("mi")||t.node.isKind("mn"))&&1===t.bbox.rscale&&1===Array.from(t.getText()).length},e.prototype.checkLineAccents=function(){if(this.node.isKind("munderover"))if(this.node.isKind("mover"))this.isLineAbove=this.isLineAccent(this.scriptChild);else if(this.node.isKind("munder"))this.isLineBelow=this.isLineAccent(this.scriptChild);else{this.isLineAbove=this.isLineAccent(this.overChild),this.isLineBelow=this.isLineAccent(this.underChild)}},e.prototype.isLineAccent=function(t){var e=t.coreMO().node;return e.isToken&&"―"===e.getText()},e.prototype.getBaseWidth=function(){var t=this.baseChild.getOuterBBox();return t.w*t.rscale-(this.baseRemoveIc?this.baseIc:0)+this.font.params.extra_ic},e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=this.getBaseWidth(),n=__read$i(this.getOffset(),2),o=n[0],i=n[1];t.append(this.baseChild.getOuterBBox()),t.combine(this.scriptChild.getOuterBBox(),r+o,i),t.w+=this.font.params.scriptspace,t.clean(),this.setChildPWidths(e)},e.prototype.getOffset=function(){return[0,0]},e.prototype.baseCharZero=function(t){var e=!!this.baseCore.node.attributes.get("largeop"),r=this.baseScale;return this.baseIsChar&&!e&&1===r?0:t},e.prototype.getV=function(){var t=this.baseCore.getOuterBBox(),e=this.scriptChild.getOuterBBox(),r=this.font.params,n=this.length2em(this.node.attributes.get("subscriptshift"),r.sub1);return Math.max(this.baseCharZero(t.d*this.baseScale+r.sub_drop*e.rscale),n,e.h*e.rscale-.8*r.x_height)},e.prototype.getU=function(){var t=this.baseCore.getOuterBBox(),e=this.scriptChild.getOuterBBox(),r=this.font.params,n=this.node.attributes.getList("displaystyle","superscriptshift"),o=this.node.getProperty("texprimestyle")?r.sup3:n.displaystyle?r.sup1:r.sup2,i=this.length2em(n.superscriptshift,o);return Math.max(this.baseCharZero(t.h*this.baseScale-r.sup_drop*e.rscale),i,e.d*e.rscale+1/4*r.x_height)},e.prototype.hasMovableLimits=function(){var t=this.node.attributes.get("displaystyle"),e=this.baseChild.coreMO().node;return!t&&!!e.attributes.get("movablelimits")},e.prototype.getOverKU=function(t,e){var r=this.node.attributes.get("accent"),n=this.font.params,o=e.d*e.rscale,i=n.rule_thickness*n.separation_factor,a=this.baseHasAccentOver?i:0,s=this.isLineAbove?3*n.rule_thickness:i,l=(r?s:Math.max(n.big_op_spacing1,n.big_op_spacing3-Math.max(0,o)))-a;return[l,t.h*t.rscale+l+o]},e.prototype.getUnderKV=function(t,e){var r=this.node.attributes.get("accentunder"),n=this.font.params,o=e.h*e.rscale,i=n.rule_thickness*n.separation_factor,a=this.baseHasAccentUnder?i:0,s=this.isLineBelow?3*n.rule_thickness:i,l=(r?s:Math.max(n.big_op_spacing2,n.big_op_spacing4-o))-a;return[l,-(t.d*t.rscale+l+o)]},e.prototype.getDeltaW=function(t,e){var r,n,o,i;void 0===e&&(e=[0,0,0]);var a=this.node.attributes.get("align"),s=t.map((function(t){return t.w*t.rscale}));s[0]-=this.baseRemoveIc&&!this.baseCore.node.attributes.get("largeop")?this.baseIc:0;var l=Math.max.apply(Math,__spreadArray$7([],__read$i(s),!1)),c=[],u=0;try{for(var d=__values$h(s.keys()),p=d.next();!p.done;p=d.next()){var m=p.value;c[m]=("center"===a?(l-s[m])/2:"right"===a?l-s[m]:0)+e[m],c[m]<u&&(u=-c[m])}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(u)try{for(var h=__values$h(c.keys()),f=h.next();!f.done;f=h.next()){m=f.value;c[m]+=u}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}return[1,2].map((function(e){return c[e]+=t[e]?t[e].dx*t[0].scale:0})),c},e.prototype.getDelta=function(t){void 0===t&&(t=!1);var e=this.node.attributes.get("accent"),r=this.baseCore.getOuterBBox(),n=r.sk,o=r.ic;return((e&&!t?n:0)+this.font.skewIcFactor*o)*this.baseScale},e.prototype.stretchChildren=function(){var t,e,r,n,o,i,a=[];try{for(var s=__values$h(this.childNodes),l=s.next();!l.done;l=s.next()){(x=l.value).canStretch(2)&&a.push(x)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}var c=a.length,u=this.childNodes.length;if(c&&u>1){var d=0,p=c>1&&c===u;try{for(var m=__values$h(this.childNodes),h=m.next();!h.done;h=m.next()){var f=0===(x=h.value).stretch.dir;if(p||f){var _=x.getOuterBBox(f),g=_.w,y=_.rscale;g*y>d&&(d=g*y)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}try{for(var b=__values$h(a),v=b.next();!v.done;v=b.next()){var x;(x=v.value).coreMO().getStretchedVariant([d/x.bbox.rscale])}}catch(t){o={error:t}}finally{try{v&&!v.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}},e}(t),e.useIC=!0,e}scriptbase.CommonScriptbaseMixin=CommonScriptbaseMixin;var __extends$H=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$h=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$g=commonjsGlobal&&commonjsGlobal.__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(scriptbase$1,"__esModule",{value:!0}),scriptbase$1.CHTMLscriptbase=void 0;var Wrapper_js_1$9=Wrapper$2,scriptbase_js_1$1=scriptbase,CHTMLscriptbase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$H(e,t),e.prototype.toCHTML=function(t){this.chtml=this.standardCHTMLnode(t);var e=__read$h(this.getOffset(),2),r=e[0],n=e[1],o=r-(this.baseRemoveIc?this.baseIc:0),i={"vertical-align":this.em(n)};o&&(i["margin-left"]=this.em(o)),this.baseChild.toCHTML(this.chtml),this.scriptChild.toCHTML(this.adaptor.append(this.chtml,this.html("mjx-script",{style:i})))},e.prototype.setDeltaW=function(t,e){for(var r=0;r<e.length;r++)e[r]&&this.adaptor.setStyle(t[r],"paddingLeft",this.em(e[r]))},e.prototype.adjustOverDepth=function(t,e){e.d>=0||this.adaptor.setStyle(t,"marginBottom",this.em(e.d*e.rscale))},e.prototype.adjustUnderDepth=function(t,e){var r,n;if(!(e.d>=0)){var o=this.adaptor,i=this.em(e.d),a=this.html("mjx-box",{style:{"margin-bottom":i,"vertical-align":i}});try{for(var s=__values$g(o.childNodes(o.firstChild(t))),l=s.next();!l.done;l=s.next()){var c=l.value;o.append(a,c)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}o.append(o.firstChild(t),a)}},e.prototype.adjustBaseHeight=function(t,e){if(this.node.attributes.get("accent")){var r=this.font.params.x_height*e.scale;e.h<r&&(this.adaptor.setStyle(t,"paddingTop",this.em(r-e.h)),e.h=r)}},e.kind="scriptbase",e}((0,scriptbase_js_1$1.CommonScriptbaseMixin)(Wrapper_js_1$9.CHTMLWrapper));scriptbase$1.CHTMLscriptbase=CHTMLscriptbase;var msubsup={},__extends$G=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$g=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};function CommonMsubMixin(t){var e;return e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$G(e,t),Object.defineProperty(e.prototype,"scriptChild",{get:function(){return this.childNodes[this.node.sub]},enumerable:!1,configurable:!0}),e.prototype.getOffset=function(){return[0,-this.getV()]},e}(t),e.useIC=!1,e}function CommonMsupMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$G(e,t),Object.defineProperty(e.prototype,"scriptChild",{get:function(){return this.childNodes[this.node.sup]},enumerable:!1,configurable:!0}),e.prototype.getOffset=function(){return[this.getAdjustedIc()-(this.baseRemoveIc?0:this.baseIc),this.getU()]},e}(t)}function CommonMsubsupMixin(t){var e;return e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.UVQ=null,e}return __extends$G(e,t),Object.defineProperty(e.prototype,"subChild",{get:function(){return this.childNodes[this.node.sub]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supChild",{get:function(){return this.childNodes[this.node.sup]},enumerable:!1,configurable:!0}),e.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var r=this.baseChild.getOuterBBox(),n=__read$g([this.subChild.getOuterBBox(),this.supChild.getOuterBBox()],2),o=n[0],i=n[1];t.empty(),t.append(r);var a=this.getBaseWidth(),s=this.getAdjustedIc(),l=__read$g(this.getUVQ(),2),c=l[0],u=l[1];t.combine(o,a,u),t.combine(i,a+s,c),t.w+=this.font.params.scriptspace,t.clean(),this.setChildPWidths(e)},e.prototype.getUVQ=function(t,e){void 0===t&&(t=this.subChild.getOuterBBox()),void 0===e&&(e=this.supChild.getOuterBBox());var r=this.baseCore.getOuterBBox();if(this.UVQ)return this.UVQ;var n=this.font.params,o=3*n.rule_thickness,i=this.length2em(this.node.attributes.get("subscriptshift"),n.sub2),a=this.baseCharZero(r.d*this.baseScale+n.sub_drop*t.rscale),s=__read$g([this.getU(),Math.max(a,i)],2),l=s[0],c=s[1],u=l-e.d*e.rscale-(t.h*t.rscale-c);if(u<o){c+=o-u;var d=.8*n.x_height-(l-e.d*e.rscale);d>0&&(l+=d,c-=d)}return l=Math.max(this.length2em(this.node.attributes.get("superscriptshift"),l),l),c=Math.max(this.length2em(this.node.attributes.get("subscriptshift"),c),c),u=l-e.d*e.rscale-(t.h*t.rscale-c),this.UVQ=[l,-c,u],this.UVQ},e}(t),e.useIC=!1,e}Object.defineProperty(msubsup,"__esModule",{value:!0}),msubsup.CommonMsubsupMixin=msubsup.CommonMsupMixin=msubsup.CommonMsubMixin=void 0,msubsup.CommonMsubMixin=CommonMsubMixin,msubsup.CommonMsupMixin=CommonMsupMixin,msubsup.CommonMsubsupMixin=CommonMsubsupMixin;var __extends$F=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$f=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(msubsup$1,"__esModule",{value:!0}),msubsup$1.CHTMLmsubsup=msubsup$1.CHTMLmsup=msubsup$1.CHTMLmsub=void 0;var scriptbase_js_1=scriptbase$1,msubsup_js_1$3=msubsup,msubsup_js_2=msubsup,msubsup_js_3=msubsup,msubsup_js_4=msubsup$2,CHTMLmsub=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$F(e,t),e.kind=msubsup_js_4.MmlMsub.prototype.kind,e}((0,msubsup_js_1$3.CommonMsubMixin)(scriptbase_js_1.CHTMLscriptbase));msubsup$1.CHTMLmsub=CHTMLmsub;var CHTMLmsup=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$F(e,t),e.kind=msubsup_js_4.MmlMsup.prototype.kind,e}((0,msubsup_js_2.CommonMsupMixin)(scriptbase_js_1.CHTMLscriptbase));msubsup$1.CHTMLmsup=CHTMLmsup;var CHTMLmsubsup=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$F(e,t),e.prototype.toCHTML=function(t){var e=this.adaptor,r=this.standardCHTMLnode(t),n=__read$f([this.baseChild,this.supChild,this.subChild],3),o=n[0],i=n[1],a=n[2],s=__read$f(this.getUVQ(),3),l=s[1],c=s[2],u={"vertical-align":this.em(l)};o.toCHTML(r);var d=e.append(r,this.html("mjx-script",{style:u}));i.toCHTML(d),e.append(d,this.html("mjx-spacer",{style:{"margin-top":this.em(c)}})),a.toCHTML(d);var p=this.getAdjustedIc();p&&e.setStyle(i.chtml,"marginLeft",this.em(p/i.bbox.rscale)),this.baseRemoveIc&&e.setStyle(d,"marginLeft",this.em(-this.baseIc))},e.kind=msubsup_js_4.MmlMsubsup.prototype.kind,e.styles={"mjx-script":{display:"inline-block","padding-right":".05em","padding-left":".033em"},"mjx-script > mjx-spacer":{display:"block"}},e}((0,msubsup_js_3.CommonMsubsupMixin)(scriptbase_js_1.CHTMLscriptbase));msubsup$1.CHTMLmsubsup=CHTMLmsubsup;var munderover$1={},munderover={},__extends$E=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$e=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$6=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};function CommonMunderMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$6([],__read$e(e),!1))||this;return n.stretchChildren(),n}return __extends$E(e,t),Object.defineProperty(e.prototype,"scriptChild",{get:function(){return this.childNodes[this.node.under]},enumerable:!1,configurable:!0}),e.prototype.computeBBox=function(e,r){if(void 0===r&&(r=!1),this.hasMovableLimits())t.prototype.computeBBox.call(this,e,r);else{e.empty();var n=this.baseChild.getOuterBBox(),o=this.scriptChild.getOuterBBox(),i=this.getUnderKV(n,o)[1],a=this.isLineBelow?0:this.getDelta(!0),s=__read$e(this.getDeltaW([n,o],[0,-a]),2),l=s[0],c=s[1];e.combine(n,l,0),e.combine(o,c,i),e.d+=this.font.params.big_op_spacing5,e.clean(),this.setChildPWidths(r)}},e}(t)}function CommonMoverMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$6([],__read$e(e),!1))||this;return n.stretchChildren(),n}return __extends$E(e,t),Object.defineProperty(e.prototype,"scriptChild",{get:function(){return this.childNodes[this.node.over]},enumerable:!1,configurable:!0}),e.prototype.computeBBox=function(e){if(this.hasMovableLimits())t.prototype.computeBBox.call(this,e);else{e.empty();var r=this.baseChild.getOuterBBox(),n=this.scriptChild.getOuterBBox();this.node.attributes.get("accent")&&(r.h=Math.max(r.h,this.font.params.x_height*r.scale));var o=this.getOverKU(r,n)[1],i=this.isLineAbove?0:this.getDelta(),a=__read$e(this.getDeltaW([r,n],[0,i]),2),s=a[0],l=a[1];e.combine(r,s,0),e.combine(n,l,o),e.h+=this.font.params.big_op_spacing5,e.clean()}},e}(t)}function CommonMunderoverMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$6([],__read$e(e),!1))||this;return n.stretchChildren(),n}return __extends$E(e,t),Object.defineProperty(e.prototype,"underChild",{get:function(){return this.childNodes[this.node.under]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overChild",{get:function(){return this.childNodes[this.node.over]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subChild",{get:function(){return this.underChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supChild",{get:function(){return this.overChild},enumerable:!1,configurable:!0}),e.prototype.computeBBox=function(e){if(this.hasMovableLimits())t.prototype.computeBBox.call(this,e);else{e.empty();var r=this.overChild.getOuterBBox(),n=this.baseChild.getOuterBBox(),o=this.underChild.getOuterBBox();this.node.attributes.get("accent")&&(n.h=Math.max(n.h,this.font.params.x_height*n.scale));var i=this.getOverKU(n,r)[1],a=this.getUnderKV(n,o)[1],s=this.getDelta(),l=__read$e(this.getDeltaW([n,o,r],[0,this.isLineBelow?0:-s,this.isLineAbove?0:s]),3),c=l[0],u=l[1],d=l[2];e.combine(n,c,0),e.combine(r,d,i),e.combine(o,u,a);var p=this.font.params.big_op_spacing5;e.h+=p,e.d+=p,e.clean()}},e}(t)}Object.defineProperty(munderover,"__esModule",{value:!0}),munderover.CommonMunderoverMixin=munderover.CommonMoverMixin=munderover.CommonMunderMixin=void 0,munderover.CommonMunderMixin=CommonMunderMixin,munderover.CommonMoverMixin=CommonMoverMixin,munderover.CommonMunderoverMixin=CommonMunderoverMixin;var __extends$D=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(munderover$1,"__esModule",{value:!0}),munderover$1.CHTMLmunderover=munderover$1.CHTMLmover=munderover$1.CHTMLmunder=void 0;var msubsup_js_1$2=msubsup$1,munderover_js_1$1=munderover,munderover_js_2=munderover,munderover_js_3=munderover,munderover_js_4=munderover$2,CHTMLmunder=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$D(e,t),e.prototype.toCHTML=function(e){if(this.hasMovableLimits())return t.prototype.toCHTML.call(this,e),void this.adaptor.setAttribute(this.chtml,"limits","false");this.chtml=this.standardCHTMLnode(e);var r=this.adaptor.append(this.adaptor.append(this.chtml,this.html("mjx-row")),this.html("mjx-base")),n=this.adaptor.append(this.adaptor.append(this.chtml,this.html("mjx-row")),this.html("mjx-under"));this.baseChild.toCHTML(r),this.scriptChild.toCHTML(n);var o=this.baseChild.getOuterBBox(),i=this.scriptChild.getOuterBBox(),a=this.getUnderKV(o,i)[0],s=this.isLineBelow?0:this.getDelta(!0);this.adaptor.setStyle(n,"paddingTop",this.em(a)),this.setDeltaW([r,n],this.getDeltaW([o,i],[0,-s])),this.adjustUnderDepth(n,i)},e.kind=munderover_js_4.MmlMunder.prototype.kind,e.styles={"mjx-over":{"text-align":"left"},'mjx-munder:not([limits="false"])':{display:"inline-table"},"mjx-munder > mjx-row":{"text-align":"left"},"mjx-under":{"padding-bottom":".1em"}},e}((0,munderover_js_1$1.CommonMunderMixin)(msubsup_js_1$2.CHTMLmsub));munderover$1.CHTMLmunder=CHTMLmunder;var CHTMLmover=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$D(e,t),e.prototype.toCHTML=function(e){if(this.hasMovableLimits())return t.prototype.toCHTML.call(this,e),void this.adaptor.setAttribute(this.chtml,"limits","false");this.chtml=this.standardCHTMLnode(e);var r=this.adaptor.append(this.chtml,this.html("mjx-over")),n=this.adaptor.append(this.chtml,this.html("mjx-base"));this.scriptChild.toCHTML(r),this.baseChild.toCHTML(n);var o=this.scriptChild.getOuterBBox(),i=this.baseChild.getOuterBBox();this.adjustBaseHeight(n,i);var a=this.getOverKU(i,o)[0],s=this.isLineAbove?0:this.getDelta();this.adaptor.setStyle(r,"paddingBottom",this.em(a)),this.setDeltaW([n,r],this.getDeltaW([i,o],[0,s])),this.adjustOverDepth(r,o)},e.kind=munderover_js_4.MmlMover.prototype.kind,e.styles={'mjx-mover:not([limits="false"])':{"padding-top":".1em"},'mjx-mover:not([limits="false"]) > *':{display:"block","text-align":"left"}},e}((0,munderover_js_2.CommonMoverMixin)(msubsup_js_1$2.CHTMLmsup));munderover$1.CHTMLmover=CHTMLmover;var CHTMLmunderover=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$D(e,t),e.prototype.toCHTML=function(e){if(this.hasMovableLimits())return t.prototype.toCHTML.call(this,e),void this.adaptor.setAttribute(this.chtml,"limits","false");this.chtml=this.standardCHTMLnode(e);var r=this.adaptor.append(this.chtml,this.html("mjx-over")),n=this.adaptor.append(this.adaptor.append(this.chtml,this.html("mjx-box")),this.html("mjx-munder")),o=this.adaptor.append(this.adaptor.append(n,this.html("mjx-row")),this.html("mjx-base")),i=this.adaptor.append(this.adaptor.append(n,this.html("mjx-row")),this.html("mjx-under"));this.overChild.toCHTML(r),this.baseChild.toCHTML(o),this.underChild.toCHTML(i);var a=this.overChild.getOuterBBox(),s=this.baseChild.getOuterBBox(),l=this.underChild.getOuterBBox();this.adjustBaseHeight(o,s);var c=this.getOverKU(s,a)[0],u=this.getUnderKV(s,l)[0],d=this.getDelta();this.adaptor.setStyle(r,"paddingBottom",this.em(c)),this.adaptor.setStyle(i,"paddingTop",this.em(u)),this.setDeltaW([o,i,r],this.getDeltaW([s,l,a],[0,this.isLineBelow?0:-d,this.isLineAbove?0:d])),this.adjustOverDepth(r,a),this.adjustUnderDepth(i,l)},e.prototype.markUsed=function(){t.prototype.markUsed.call(this),this.jax.wrapperUsage.add(msubsup_js_1$2.CHTMLmsubsup.kind)},e.kind=munderover_js_4.MmlMunderover.prototype.kind,e.styles={'mjx-munderover:not([limits="false"])':{"padding-top":".1em"},'mjx-munderover:not([limits="false"]) > *':{display:"block"}},e}((0,munderover_js_3.CommonMunderoverMixin)(msubsup_js_1$2.CHTMLmsubsup));munderover$1.CHTMLmunderover=CHTMLmunderover;var mmultiscripts$1={},mmultiscripts={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},o=commonjsGlobal&&commonjsGlobal.__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(t,"__esModule",{value:!0}),t.CommonMmultiscriptsMixin=t.ScriptNames=t.NextScript=void 0;var i=BBox$1;t.NextScript={base:"subList",subList:"supList",supList:"subList",psubList:"psupList",psupList:"psubList"},t.ScriptNames=["sup","sup","psup","psub"],t.CommonMmultiscriptsMixin=function(a){return function(a){function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=a.apply(this,n([],r(t),!1))||this;return o.scriptData=null,o.firstPrescript=0,o.getScriptData(),o}return e(s,a),s.prototype.combinePrePost=function(t,e){var r=new i.BBox(t);return r.combine(e,0,0),r},s.prototype.computeBBox=function(t,e){void 0===e&&(e=!1);var n=this.font.params.scriptspace,o=this.scriptData,i=this.combinePrePost(o.sub,o.psub),a=this.combinePrePost(o.sup,o.psup),s=r(this.getUVQ(i,a),2),l=s[0],c=s[1];if(t.empty(),o.numPrescripts&&(t.combine(o.psup,n,l),t.combine(o.psub,n,c)),t.append(o.base),o.numScripts){var u=t.w;t.combine(o.sup,u,l),t.combine(o.sub,u,c),t.w+=n}t.clean(),this.setChildPWidths(e)},s.prototype.getScriptData=function(){var t=this.scriptData={base:null,sub:i.BBox.empty(),sup:i.BBox.empty(),psub:i.BBox.empty(),psup:i.BBox.empty(),numPrescripts:0,numScripts:0},e=this.getScriptBBoxLists();this.combineBBoxLists(t.sub,t.sup,e.subList,e.supList),this.combineBBoxLists(t.psub,t.psup,e.psubList,e.psupList),t.base=e.base[0],t.numPrescripts=e.psubList.length,t.numScripts=e.subList.length},s.prototype.getScriptBBoxLists=function(){var e,r,n={base:[],subList:[],supList:[],psubList:[],psupList:[]},i="base";try{for(var a=o(this.childNodes),s=a.next();!s.done;s=a.next()){var l=s.value;l.node.isKind("mprescripts")?i="psubList":(n[i].push(l.getOuterBBox()),i=t.NextScript[i])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return this.firstPrescript=n.subList.length+n.supList.length+2,this.padLists(n.subList,n.supList),this.padLists(n.psubList,n.psupList),n},s.prototype.padLists=function(t,e){t.length>e.length&&e.push(i.BBox.empty())},s.prototype.combineBBoxLists=function(t,e,n,o){for(var i=0;i<n.length;i++){var a=r(this.getScaledWHD(n[i]),3),s=a[0],l=a[1],c=a[2],u=r(this.getScaledWHD(o[i]),3),d=u[0],p=u[1],m=u[2],h=Math.max(s,d);t.w+=h,e.w+=h,l>t.h&&(t.h=l),c>t.d&&(t.d=c),p>e.h&&(e.h=p),m>e.d&&(e.d=m)}},s.prototype.getScaledWHD=function(t){var e=t.w,r=t.h,n=t.d,o=t.rscale;return[e*o,r*o,n*o]},s.prototype.getUVQ=function(t,e){var n;if(!this.UVQ){var o=r([0,0,0],3),i=o[0],s=o[1],l=o[2];0===t.h&&0===t.d?i=this.getU():0===e.h&&0===e.d?i=-this.getV():(i=(n=r(a.prototype.getUVQ.call(this,t,e),3))[0],s=n[1],l=n[2]),this.UVQ=[i,s,l]}return this.UVQ},s}(a)}}(mmultiscripts),getDefaultExportFromCjs(mmultiscripts);var __extends$C=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$d=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(mmultiscripts$1,"__esModule",{value:!0}),mmultiscripts$1.CHTMLmmultiscripts=void 0;var msubsup_js_1$1=msubsup$1,mmultiscripts_js_1$1=mmultiscripts,mmultiscripts_js_2=mmultiscripts$2,string_js_1$3=string,CHTMLmmultiscripts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$C(e,t),e.prototype.toCHTML=function(t){var e=this.standardCHTMLnode(t),r=this.scriptData,n=this.node.getProperty("scriptalign")||"right left",o=__read$d((0,string_js_1$3.split)(n+" "+n),2),i=o[0],a=o[1],s=this.combinePrePost(r.sub,r.psub),l=this.combinePrePost(r.sup,r.psup),c=__read$d(this.getUVQ(s,l),2),u=c[0],d=c[1];if(r.numPrescripts){var p=this.addScripts(u,-d,!0,r.psub,r.psup,this.firstPrescript,r.numPrescripts);"right"!==i&&this.adaptor.setAttribute(p,"script-align",i)}if(this.childNodes[0].toCHTML(e),r.numScripts){p=this.addScripts(u,-d,!1,r.sub,r.sup,1,r.numScripts);"left"!==a&&this.adaptor.setAttribute(p,"script-align",a)}},e.prototype.addScripts=function(t,e,r,n,o,i,a){for(var s=this.adaptor,l=t-o.d+(e-n.h),c=t<0&&0===e?n.h+t:t,u=l>0?{style:{height:this.em(l)}}:{},d=c?{style:{"vertical-align":this.em(c)}}:{},p=this.html("mjx-row"),m=this.html("mjx-row",u),h=this.html("mjx-row"),f="mjx-"+(r?"pre":"")+"scripts",_=i+2*a;i<_;)this.childNodes[i++].toCHTML(s.append(h,this.html("mjx-cell"))),this.childNodes[i++].toCHTML(s.append(p,this.html("mjx-cell")));return s.append(this.chtml,this.html(f,d,[p,m,h]))},e.kind=mmultiscripts_js_2.MmlMmultiscripts.prototype.kind,e.styles={"mjx-prescripts":{display:"inline-table","padding-left":".05em"},"mjx-scripts":{display:"inline-table","padding-right":".05em"},"mjx-prescripts > mjx-row > mjx-cell":{"text-align":"right"},'[script-align="left"] > mjx-row > mjx-cell':{"text-align":"left"},'[script-align="center"] > mjx-row > mjx-cell':{"text-align":"center"},'[script-align="right"] > mjx-row > mjx-cell':{"text-align":"right"}},e}((0,mmultiscripts_js_1$1.CommonMmultiscriptsMixin)(msubsup_js_1$1.CHTMLmsubsup));mmultiscripts$1.CHTMLmmultiscripts=CHTMLmmultiscripts;var mtable$1={},mtable={},numeric={};function sum(t){return t.reduce((function(t,e){return t+e}),0)}function max(t){return t.reduce((function(t,e){return Math.max(t,e)}),0)}Object.defineProperty(numeric,"__esModule",{value:!0}),numeric.max=numeric.sum=void 0,numeric.sum=sum,numeric.max=max;var __extends$B=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$c=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$5=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__values$f=commonjsGlobal&&commonjsGlobal.__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(mtable,"__esModule",{value:!0}),mtable.CommonMtableMixin=void 0;var BBox_js_1=BBox$1,string_js_1$2=string,numeric_js_1=numeric;function CommonMtableMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$5([],__read$c(e),!1))||this;n.numCols=0,n.numRows=0,n.data=null,n.pwidthCells=[],n.pWidth=0,n.numCols=(0,numeric_js_1.max)(n.tableRows.map((function(t){return t.numCells}))),n.numRows=n.childNodes.length,n.hasLabels=n.childNodes.reduce((function(t,e){return t||e.node.isKind("mlabeledtr")}),!1),n.findContainer(),n.isTop=!n.container||n.container.node.isKind("math")&&!n.container.parent,n.isTop&&(n.jax.table=n),n.getPercentageWidth();var o=n.node.attributes;return n.frame="none"!==o.get("frame"),n.fLine=n.frame&&o.get("frame")?.07:0,n.fSpace=n.frame?n.convertLengths(n.getAttributeArray("framespacing")):[0,0],n.cSpace=n.convertLengths(n.getColumnAttributes("columnspacing")),n.rSpace=n.convertLengths(n.getRowAttributes("rowspacing")),n.cLines=n.getColumnAttributes("columnlines").map((function(t){return"none"===t?0:.07})),n.rLines=n.getRowAttributes("rowlines").map((function(t){return"none"===t?0:.07})),n.cWidths=n.getColumnWidths(),n.stretchRows(),n.stretchColumns(),n}return __extends$B(e,t),Object.defineProperty(e.prototype,"tableRows",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),e.prototype.findContainer=function(){for(var t=this,e=t.parent;e&&(e.node.notParent||e.node.isKind("mrow"));)t=e,e=e.parent;this.container=e,this.containerI=t.node.childPosition()},e.prototype.getPercentageWidth=function(){if(this.hasLabels)this.bbox.pwidth=BBox_js_1.BBox.fullWidth;else{var t=this.node.attributes.get("width");(0,string_js_1$2.isPercent)(t)&&(this.bbox.pwidth=t)}},e.prototype.stretchRows=function(){for(var t=this.node.attributes.get("equalrows"),e=t?this.getEqualRowHeight():0,r=t?this.getTableData():{H:[0],D:[0]},n=r.H,o=r.D,i=this.tableRows,a=0;a<this.numRows;a++){var s=t?[(e+n[a]-o[a])/2,(e-n[a]+o[a])/2]:null;i[a].stretchChildren(s)}},e.prototype.stretchColumns=function(){for(var t=0;t<this.numCols;t++){var e="number"==typeof this.cWidths[t]?this.cWidths[t]:null;this.stretchColumn(t,e)}},e.prototype.stretchColumn=function(t,e){var r,n,o,i,a,s,l=[];try{for(var c=__values$f(this.tableRows),u=c.next();!u.done;u=c.next()){if(_=u.value.getChild(t))0===(x=_.childNodes[0]).stretch.dir&&x.canStretch(2)&&l.push(x)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}var d=l.length,p=this.childNodes.length;if(d&&p>1){if(null===e){e=0;var m=d>1&&d===p;try{for(var h=__values$f(this.tableRows),f=h.next();!f.done;f=h.next()){var _;if(_=f.value.getChild(t)){var g=0===(x=_.childNodes[0]).stretch.dir;if(m||g){var y=x.getBBox(g).w;y>e&&(e=y)}}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}try{for(var b=__values$f(l),v=b.next();!v.done;v=b.next()){var x;(x=v.value).coreMO().getStretchedVariant([e])}}catch(t){a={error:t}}finally{try{v&&!v.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}},e.prototype.getTableData=function(){if(this.data)return this.data;for(var t=new Array(this.numRows).fill(0),e=new Array(this.numRows).fill(0),r=new Array(this.numCols).fill(0),n=new Array(this.numRows),o=new Array(this.numRows),i=[0],a=this.tableRows,s=0;s<a.length;s++){for(var l=0,c=a[s],u=c.node.attributes.get("rowalign"),d=0;d<c.numCells;d++){var p=c.getChild(d);l=this.updateHDW(p,d,s,u,t,e,r,l),this.recordPWidthCell(p,d)}n[s]=t[s],o[s]=e[s],c.labeled&&(l=this.updateHDW(c.childNodes[0],0,s,u,t,e,i,l)),this.extendHD(s,t,e,l),this.extendHD(s,n,o,l)}var m=i[0];return this.data={H:t,D:e,W:r,NH:n,ND:o,L:m},this.data},e.prototype.updateHDW=function(t,e,r,n,o,i,a,s){var l=t.getBBox(),c=l.h,u=l.d,d=l.w,p=t.parent.bbox.rscale;1!==t.parent.bbox.rscale&&(c*=p,u*=p,d*=p),this.node.getProperty("useHeight")&&(c<.75&&(c=.75),u<.25&&(u=.25));var m=0;return"baseline"!==(n=t.node.attributes.get("rowalign")||n)&&"axis"!==n&&(m=c+u,c=u=0),c>o[r]&&(o[r]=c),u>i[r]&&(i[r]=u),m>s&&(s=m),a&&d>a[e]&&(a[e]=d),s},e.prototype.extendHD=function(t,e,r,n){var o=(n-(e[t]+r[t]))/2;o<1e-5||(e[t]+=o,r[t]+=o)},e.prototype.recordPWidthCell=function(t,e){t.childNodes[0]&&t.childNodes[0].getBBox().pwidth&&this.pwidthCells.push([t,e])},e.prototype.computeBBox=function(t,e){var r,n,o=this.getTableData(),i=o.H,a=o.D;if(this.node.attributes.get("equalrows")){var s=this.getEqualRowHeight();r=(0,numeric_js_1.sum)([].concat(this.rLines,this.rSpace))+s*this.numRows}else r=(0,numeric_js_1.sum)(i.concat(a,this.rLines,this.rSpace));r+=2*(this.fLine+this.fSpace[1]);var l=this.getComputedWidths();n=(0,numeric_js_1.sum)(l.concat(this.cLines,this.cSpace))+2*(this.fLine+this.fSpace[0]);var c=this.node.attributes.get("width");"auto"!==c&&(n=Math.max(this.length2em(c,0)+2*this.fLine,n));var u=__read$c(this.getBBoxHD(r),2),d=u[0],p=u[1];t.h=d,t.d=p,t.w=n;var m=__read$c(this.getBBoxLR(),2),h=m[0],f=m[1];t.L=h,t.R=f,(0,string_js_1$2.isPercent)(c)||this.setColumnPWidths()},e.prototype.setChildPWidths=function(t,e,r){var n=this.node.attributes.get("width");if(!(0,string_js_1$2.isPercent)(n))return!1;this.hasLabels||(this.bbox.pwidth="",this.container.bbox.pwidth="");var o=this.bbox,i=o.w,a=o.L,s=o.R,l=this.node.attributes.get("data-width-includes-label"),c=Math.max(i,this.length2em(n,Math.max(e,a+i+s)))-(l?a+s:0),u=this.node.attributes.get("equalcolumns")?Array(this.numCols).fill(this.percent(1/Math.max(1,this.numCols))):this.getColumnAttributes("columnwidth",0);this.cWidths=this.getColumnWidthsFixed(u,c);var d=this.getComputedWidths();return this.pWidth=(0,numeric_js_1.sum)(d.concat(this.cLines,this.cSpace))+2*(this.fLine+this.fSpace[0]),this.isTop&&(this.bbox.w=this.pWidth),this.setColumnPWidths(),this.pWidth!==i&&this.parent.invalidateBBox(),this.pWidth!==i},e.prototype.setColumnPWidths=function(){var t,e,r=this.cWidths;try{for(var n=__values$f(this.pwidthCells),o=n.next();!o.done;o=n.next()){var i=__read$c(o.value,2),a=i[0],s=i[1];a.setChildPWidths(!1,r[s])&&(a.invalidateBBox(),a.getBBox())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.getBBoxHD=function(t){var e=__read$c(this.getAlignmentRow(),2),r=e[0],n=e[1];if(null===n){var o=this.font.params.axis_height,i=t/2;return{top:[0,t],center:[i,i],bottom:[t,0],baseline:[i,i],axis:[i+o,i-o]}[r]||[i,i]}var a=this.getVerticalPosition(n,r);return[a,t-a]},e.prototype.getBBoxLR=function(){if(this.hasLabels){var t=this.node.attributes,e=t.get("side"),r=__read$c(this.getPadAlignShift(e),2),n=r[0],o=r[1],i=this.hasLabels&&!!t.get("data-width-includes-label");return i&&this.frame&&this.fSpace[0]&&(n-=this.fSpace[0]),"center"!==o||i?"left"===e?[n,0]:[0,n]:[n,n]}return[0,0]},e.prototype.getPadAlignShift=function(t){var e=this.getTableData().L+this.length2em(this.node.attributes.get("minlabelspacing")),r=__read$c(null==this.styles?["",""]:[this.styles.get("padding-left"),this.styles.get("padding-right")],2),n=r[0],o=r[1];(n||o)&&(e=Math.max(e,this.length2em(n||"0"),this.length2em(o||"0")));var i=__read$c(this.getAlignShift(),2),a=i[0],s=i[1];return a===t&&(s="left"===t?Math.max(e,s)-e:Math.min(-e,s)+e),[e,a,s]},e.prototype.getAlignShift=function(){return this.isTop?t.prototype.getAlignShift.call(this):[this.container.getChildAlign(this.containerI),0]},e.prototype.getWidth=function(){return this.pWidth||this.getBBox().w},e.prototype.getEqualRowHeight=function(){var t=this.getTableData(),e=t.H,r=t.D,n=Array.from(e.keys()).map((function(t){return e[t]+r[t]}));return Math.max.apply(Math,n)},e.prototype.getComputedWidths=function(){var t=this,e=this.getTableData().W,r=Array.from(e.keys()).map((function(r){return"number"==typeof t.cWidths[r]?t.cWidths[r]:e[r]}));return this.node.attributes.get("equalcolumns")&&(r=Array(r.length).fill((0,numeric_js_1.max)(r))),r},e.prototype.getColumnWidths=function(){var t=this.node.attributes.get("width");if(this.node.attributes.get("equalcolumns"))return this.getEqualColumns(t);var e=this.getColumnAttributes("columnwidth",0);return"auto"===t?this.getColumnWidthsAuto(e):(0,string_js_1$2.isPercent)(t)?this.getColumnWidthsPercent(e):this.getColumnWidthsFixed(e,this.length2em(t))},e.prototype.getEqualColumns=function(t){var e,r=Math.max(1,this.numCols);if("auto"===t){var n=this.getTableData().W;e=(0,numeric_js_1.max)(n)}else if((0,string_js_1$2.isPercent)(t))e=this.percent(1/r);else{var o=(0,numeric_js_1.sum)([].concat(this.cLines,this.cSpace))+2*this.fSpace[0];e=Math.max(0,this.length2em(t)-o)/r}return Array(this.numCols).fill(e)},e.prototype.getColumnWidthsAuto=function(t){var e=this;return t.map((function(t){return"auto"===t||"fit"===t?null:(0,string_js_1$2.isPercent)(t)?t:e.length2em(t)}))},e.prototype.getColumnWidthsPercent=function(t){var e=this,r=t.indexOf("fit")>=0,n=(r?this.getTableData():{W:null}).W;return Array.from(t.keys()).map((function(o){var i=t[o];return"fit"===i?null:"auto"===i?r?n[o]:null:(0,string_js_1$2.isPercent)(i)?i:e.length2em(i)}))},e.prototype.getColumnWidthsFixed=function(t,e){var r=this,n=Array.from(t.keys()),o=n.filter((function(e){return"fit"===t[e]})),i=n.filter((function(e){return"auto"===t[e]})),a=o.length||i.length,s=(a?this.getTableData():{W:null}).W,l=e-(0,numeric_js_1.sum)([].concat(this.cLines,this.cSpace))-2*this.fSpace[0],c=l;n.forEach((function(e){var n=t[e];c-="fit"===n||"auto"===n?s[e]:r.length2em(n,l)}));var u=a&&c>0?c/a:0;return n.map((function(e){var n=t[e];return"fit"===n?s[e]+u:"auto"===n?s[e]+(0===o.length?u:0):r.length2em(n,l)}))},e.prototype.getVerticalPosition=function(t,e){for(var r=this.node.attributes.get("equalrows"),n=this.getTableData(),o=n.H,i=n.D,a=r?this.getEqualRowHeight():0,s=this.getRowHalfSpacing(),l=this.fLine,c=0;c<t;c++)l+=s[c]+(r?a:o[c]+i[c])+s[c+1]+this.rLines[c];var u=__read$c(r?[(a+o[t]-i[t])/2,(a-o[t]+i[t])/2]:[o[t],i[t]],2),d=u[0],p=u[1];return l+={top:0,center:s[t]+(d+p)/2,bottom:s[t]+d+p+s[t+1],baseline:s[t]+d,axis:s[t]+d-.25}[e]||0},e.prototype.getEmHalfSpacing=function(t,e,r){void 0===r&&(r=1);var n=this.em(t*r),o=this.addEm(e,2/r);return o.unshift(n),o.push(n),o},e.prototype.getRowHalfSpacing=function(){var t=this.rSpace.map((function(t){return t/2}));return t.unshift(this.fSpace[1]),t.push(this.fSpace[1]),t},e.prototype.getColumnHalfSpacing=function(){var t=this.cSpace.map((function(t){return t/2}));return t.unshift(this.fSpace[0]),t.push(this.fSpace[0]),t},e.prototype.getAlignmentRow=function(){var t=__read$c((0,string_js_1$2.split)(this.node.attributes.get("align")),2),e=t[0],r=t[1];if(null==r)return[e,null];var n=parseInt(r);return n<0&&(n+=this.numRows+1),[e,n<1||n>this.numRows?null:n-1]},e.prototype.getColumnAttributes=function(t,e){void 0===e&&(e=1);var r=this.numCols-e,n=this.getAttributeArray(t);if(0===n.length)return null;for(;n.length<r;)n.push(n[n.length-1]);return n.length>r&&n.splice(r),n},e.prototype.getRowAttributes=function(t,e){void 0===e&&(e=1);var r=this.numRows-e,n=this.getAttributeArray(t);if(0===n.length)return null;for(;n.length<r;)n.push(n[n.length-1]);return n.length>r&&n.splice(r),n},e.prototype.getAttributeArray=function(t){var e=this.node.attributes.get(t);return e?(0,string_js_1$2.split)(e):[this.node.attributes.getDefault(t)]},e.prototype.addEm=function(t,e){var r=this;return void 0===e&&(e=1),t?t.map((function(t){return r.em(t/e)})):null},e.prototype.convertLengths=function(t){var e=this;return t?t.map((function(t){return e.length2em(t)})):null},e}(t)}mtable.CommonMtableMixin=CommonMtableMixin;var __extends$A=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$e=commonjsGlobal&&commonjsGlobal.__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.")},__read$b=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(mtable$1,"__esModule",{value:!0}),mtable$1.CHTMLmtable=void 0;var Wrapper_js_1$8=Wrapper$2,mtable_js_1$1=mtable,mtable_js_2=mtable$2,string_js_1$1=string,CHTMLmtable=function(t){function e(e,r,n){void 0===n&&(n=null);var o=t.call(this,e,r,n)||this;return o.itable=o.html("mjx-itable"),o.labels=o.html("mjx-itable"),o}return __extends$A(e,t),e.prototype.getAlignShift=function(){var e=t.prototype.getAlignShift.call(this);return this.isTop||(e[1]=0),e},e.prototype.toCHTML=function(t){var e,r,n=this.standardCHTMLnode(t);this.adaptor.append(n,this.html("mjx-table",{},[this.itable]));try{for(var o=__values$e(this.childNodes),i=o.next();!i.done;i=o.next()){i.value.toCHTML(this.itable)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.padRows(),this.handleColumnSpacing(),this.handleColumnLines(),this.handleColumnWidths(),this.handleRowSpacing(),this.handleRowLines(),this.handleRowHeights(),this.handleFrame(),this.handleWidth(),this.handleLabels(),this.handleAlign(),this.handleJustify(),this.shiftColor()},e.prototype.shiftColor=function(){var t=this.adaptor,e=t.getStyle(this.chtml,"backgroundColor");e&&(t.setStyle(this.chtml,"backgroundColor",""),t.setStyle(this.itable,"backgroundColor",e))},e.prototype.padRows=function(){var t,e,r=this.adaptor;try{for(var n=__values$e(r.childNodes(this.itable)),o=n.next();!o.done;o=n.next())for(var i=o.value;r.childNodes(i).length<this.numCols;)r.append(i,this.html("mjx-mtd",{extra:!0}))}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.handleColumnSpacing=function(){var t,e,r,n,o=this.childNodes[0]?1/this.childNodes[0].getBBox().rscale:1,i=this.getEmHalfSpacing(this.fSpace[0],this.cSpace,o),a=this.frame;try{for(var s=__values$e(this.tableRows),l=s.next();!l.done;l=s.next()){var c=l.value,u=0;try{for(var d=(r=void 0,__values$e(c.tableCells)),p=d.next();!p.done;p=d.next()){var m=p.value,h=i[u++],f=i[u],_=m?m.chtml:this.adaptor.childNodes(c.chtml)[u];(u>1&&"0.4em"!==h||a&&1===u)&&this.adaptor.setStyle(_,"paddingLeft",h),(u<this.numCols&&"0.4em"!==f||a&&u===this.numCols)&&this.adaptor.setStyle(_,"paddingRight",f)}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}},e.prototype.handleColumnLines=function(){var t,e,r,n;if("none"!==this.node.attributes.get("columnlines")){var o=this.getColumnAttributes("columnlines");try{for(var i=__values$e(this.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value,l=0;try{for(var c=(r=void 0,__values$e(this.adaptor.childNodes(s.chtml).slice(1))),u=c.next();!u.done;u=c.next()){var d=u.value,p=o[l++];"none"!==p&&this.adaptor.setStyle(d,"borderLeft",".07em "+p)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}},e.prototype.handleColumnWidths=function(){var t,e,r,n;try{for(var o=__values$e(this.childNodes),i=o.next();!i.done;i=o.next()){var a=i.value,s=0;try{for(var l=(r=void 0,__values$e(this.adaptor.childNodes(a.chtml))),c=l.next();!c.done;c=l.next()){var u=c.value,d=this.cWidths[s++];if(null!==d){var p="number"==typeof d?this.em(d):d;this.adaptor.setStyle(u,"width",p),this.adaptor.setStyle(u,"maxWidth",p),this.adaptor.setStyle(u,"minWidth",p)}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.handleRowSpacing=function(){var t,e,r,n,o=this.childNodes[0]?1/this.childNodes[0].getBBox().rscale:1,i=this.getEmHalfSpacing(this.fSpace[1],this.rSpace,o),a=this.frame,s=0;try{for(var l=__values$e(this.childNodes),c=l.next();!c.done;c=l.next()){var u=c.value,d=i[s++],p=i[s];try{for(var m=(r=void 0,__values$e(u.childNodes)),h=m.next();!h.done;h=m.next()){var f=h.value;(s>1&&"0.215em"!==d||a&&1===s)&&this.adaptor.setStyle(f.chtml,"paddingTop",d),(s<this.numRows&&"0.215em"!==p||a&&s===this.numRows)&&this.adaptor.setStyle(f.chtml,"paddingBottom",p)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}},e.prototype.handleRowLines=function(){var t,e,r,n;if("none"!==this.node.attributes.get("rowlines")){var o=this.getRowAttributes("rowlines"),i=0;try{for(var a=__values$e(this.childNodes.slice(1)),s=a.next();!s.done;s=a.next()){var l=s.value,c=o[i++];if("none"!==c)try{for(var u=(r=void 0,__values$e(this.adaptor.childNodes(l.chtml))),d=u.next();!d.done;d=u.next()){var p=d.value;this.adaptor.setStyle(p,"borderTop",".07em "+c)}}catch(t){r={error:t}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}},e.prototype.handleRowHeights=function(){this.node.attributes.get("equalrows")&&this.handleEqualRows()},e.prototype.handleEqualRows=function(){for(var t=this.getRowHalfSpacing(),e=this.getTableData(),r=e.H,n=e.D,o=e.NH,i=e.ND,a=this.getEqualRowHeight(),s=0;s<this.numRows;s++){var l=this.childNodes[s];this.setRowHeight(l,a+t[s]+t[s+1]+this.rLines[s]),a!==o[s]+i[s]&&this.setRowBaseline(l,a,(a-r[s]+n[s])/2)}},e.prototype.setRowHeight=function(t,e){this.adaptor.setStyle(t.chtml,"height",this.em(e))},e.prototype.setRowBaseline=function(t,e,r){var n,o,i=t.node.attributes.get("rowalign");try{for(var a=__values$e(t.childNodes),s=a.next();!s.done;s=a.next()){var l=s.value;if(this.setCellBaseline(l,i,e,r))break}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}},e.prototype.setCellBaseline=function(t,e,r,n){var o=t.node.attributes.get("rowalign");if("baseline"===o||"axis"===o){var i=this.adaptor,a=i.lastChild(t.chtml);i.setStyle(a,"height",this.em(r)),i.setStyle(a,"verticalAlign",this.em(-n));var s=t.parent;if(!(s.node.isKind("mlabeledtr")&&t===s.childNodes[0]||"baseline"!==e&&"axis"!==e))return!0}return!1},e.prototype.handleFrame=function(){this.frame&&this.fLine&&this.adaptor.setStyle(this.itable,"border",".07em "+this.node.attributes.get("frame"))},e.prototype.handleWidth=function(){var t=this.adaptor,e=this.getBBox(),r=e.w,n=e.L,o=e.R;t.setStyle(this.chtml,"minWidth",this.em(n+r+o));var i=this.node.attributes.get("width");if((0,string_js_1$1.isPercent)(i))t.setStyle(this.chtml,"width",""),t.setAttribute(this.chtml,"width","full");else if(!this.hasLabels){if("auto"===i)return;i=this.em(this.length2em(i)+2*this.fLine)}var a=t.firstChild(this.chtml);if(t.setStyle(a,"width",i),t.setStyle(a,"minWidth",this.em(r)),n||o){t.setStyle(this.chtml,"margin","");var s=this.node.attributes.get("data-width-includes-label")?"padding":"margin";n===o?t.setStyle(a,s,"0 "+this.em(o)):t.setStyle(a,s,"0 "+this.em(o)+" 0 "+this.em(n))}t.setAttribute(this.itable,"width","full")},e.prototype.handleAlign=function(){var t=__read$b(this.getAlignmentRow(),2),e=t[0],r=t[1];if(null===r)"axis"!==e&&this.adaptor.setAttribute(this.chtml,"align",e);else{var n=this.getVerticalPosition(r,e);this.adaptor.setAttribute(this.chtml,"align","top"),this.adaptor.setStyle(this.chtml,"verticalAlign",this.em(n))}},e.prototype.handleJustify=function(){var t=this.getAlignShift()[0];"center"!==t&&this.adaptor.setAttribute(this.chtml,"justify",t)},e.prototype.handleLabels=function(){if(this.hasLabels){var t=this.labels,e=this.node.attributes,r=this.adaptor,n=e.get("side");r.setAttribute(this.chtml,"side",n),r.setAttribute(t,"align",n),r.setStyle(t,n,"0");var o=__read$b(this.addLabelPadding(n),2),i=o[0],a=o[1];if(a){var s=r.firstChild(this.chtml);this.setIndent(s,i,a)}this.updateRowHeights(),this.addLabelSpacing()}},e.prototype.addLabelPadding=function(t){var e=__read$b(this.getPadAlignShift(t),3),r=e[1],n=e[2],o={};if("right"===t&&!this.node.attributes.get("data-width-includes-label")){var i=this.node.attributes.get("width"),a=this.getBBox(),s=a.w,l=a.L,c=a.R;o.style={width:(0,string_js_1$1.isPercent)(i)?"calc("+i+" + "+this.em(l+c)+")":this.em(l+s+c)}}return this.adaptor.append(this.chtml,this.html("mjx-labels",o,[this.labels])),[r,n]},e.prototype.updateRowHeights=function(){for(var t=this.getTableData(),e=t.H,r=t.D,n=t.NH,o=t.ND,i=this.getRowHalfSpacing(),a=0;a<this.numRows;a++){var s=this.childNodes[a];this.setRowHeight(s,e[a]+r[a]+i[a]+i[a+1]+this.rLines[a]),e[a]!==n[a]||r[a]!==o[a]?this.setRowBaseline(s,e[a]+r[a],r[a]):s.node.isKind("mlabeledtr")&&this.setCellBaseline(s.childNodes[0],"",e[a]+r[a],r[a])}},e.prototype.addLabelSpacing=function(){for(var t=this.adaptor,e=this.node.attributes.get("equalrows"),r=this.getTableData(),n=r.H,o=r.D,i=e?this.getEqualRowHeight():0,a=this.getRowHalfSpacing(),s=this.fLine,l=t.firstChild(this.labels),c=0;c<this.numRows;c++){this.childNodes[c].node.isKind("mlabeledtr")?(s&&t.insert(this.html("mjx-mtr",{style:{height:this.em(s)}}),l),t.setStyle(l,"height",this.em((e?i:n[c]+o[c])+a[c]+a[c+1])),l=t.next(l),s=this.rLines[c]):s+=a[c]+(e?i:n[c]+o[c])+a[c+1]+this.rLines[c]}},e.kind=mtable_js_2.MmlMtable.prototype.kind,e.styles={"mjx-mtable":{"vertical-align":".25em","text-align":"center",position:"relative","box-sizing":"border-box","border-spacing":0,"border-collapse":"collapse"},'mjx-mstyle[size="s"] mjx-mtable':{"vertical-align":".354em"},"mjx-labels":{position:"absolute",left:0,top:0},"mjx-table":{display:"inline-block","vertical-align":"-.5ex","box-sizing":"border-box"},"mjx-table > mjx-itable":{"vertical-align":"middle","text-align":"left","box-sizing":"border-box"},"mjx-labels > mjx-itable":{position:"absolute",top:0},'mjx-mtable[justify="left"]':{"text-align":"left"},'mjx-mtable[justify="right"]':{"text-align":"right"},'mjx-mtable[justify="left"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="left"][side="right"]':{"padding-left":"0 ! important"},'mjx-mtable[justify="right"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="right"][side="right"]':{"padding-left":"0 ! important"},"mjx-mtable[align]":{"vertical-align":"baseline"},'mjx-mtable[align="top"] > mjx-table':{"vertical-align":"top"},'mjx-mtable[align="bottom"] > mjx-table':{"vertical-align":"bottom"},'mjx-mtable[side="right"] mjx-labels':{"min-width":"100%"}},e}((0,mtable_js_1$1.CommonMtableMixin)(Wrapper_js_1$8.CHTMLWrapper));mtable$1.CHTMLmtable=CHTMLmtable;var mtr$1={},mtr={},__extends$z=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$d=commonjsGlobal&&commonjsGlobal.__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.")};function CommonMtrMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$z(e,t),Object.defineProperty(e.prototype,"fixesPWidth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numCells",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labeled",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableCells",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),e.prototype.getChild=function(t){return this.childNodes[t]},e.prototype.getChildBBoxes=function(){return this.childNodes.map((function(t){return t.getBBox()}))},e.prototype.stretchChildren=function(t){var e,r,n,o,i,a;void 0===t&&(t=null);var s=[],l=this.labeled?this.childNodes.slice(1):this.childNodes;try{for(var c=__values$d(l),u=c.next();!u.done;u=c.next()){(E=u.value.childNodes[0]).canStretch(1)&&s.push(E)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}var d=s.length,p=this.childNodes.length;if(d&&p>1){if(null===t){var m=0,h=0,f=d>1&&d===p;try{for(var _=__values$d(l),g=_.next();!g.done;g=_.next()){var y=0===(E=g.value.childNodes[0]).stretch.dir;if(f||y){var b=E.getBBox(y),v=b.h,x=b.d;v>m&&(m=v),x>h&&(h=x)}}}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=_.return)&&o.call(_)}finally{if(n)throw n.error}}t=[m,h]}try{for(var M=__values$d(s),S=M.next();!S.done;S=M.next()){var E;(E=S.value).coreMO().getStretchedVariant(t)}}catch(t){i={error:t}}finally{try{S&&!S.done&&(a=M.return)&&a.call(M)}finally{if(i)throw i.error}}}},e}(t)}function CommonMlabeledtrMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$z(e,t),Object.defineProperty(e.prototype,"numCells",{get:function(){return Math.max(0,this.childNodes.length-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labeled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableCells",{get:function(){return this.childNodes.slice(1)},enumerable:!1,configurable:!0}),e.prototype.getChild=function(t){return this.childNodes[t+1]},e.prototype.getChildBBoxes=function(){return this.childNodes.slice(1).map((function(t){return t.getBBox()}))},e}(t)}Object.defineProperty(mtr,"__esModule",{value:!0}),mtr.CommonMlabeledtrMixin=mtr.CommonMtrMixin=void 0,mtr.CommonMtrMixin=CommonMtrMixin,mtr.CommonMlabeledtrMixin=CommonMlabeledtrMixin;var __extends$y=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mtr$1,"__esModule",{value:!0}),mtr$1.CHTMLmlabeledtr=mtr$1.CHTMLmtr=void 0;var Wrapper_js_1$7=Wrapper$2,mtr_js_1$1=mtr,mtr_js_2=mtr,mtr_js_3=mtr$2,CHTMLmtr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$y(e,t),e.prototype.toCHTML=function(e){t.prototype.toCHTML.call(this,e);var r=this.node.attributes.get("rowalign");"baseline"!==r&&this.adaptor.setAttribute(this.chtml,"rowalign",r)},e.kind=mtr_js_3.MmlMtr.prototype.kind,e.styles={"mjx-mtr":{display:"table-row"},'mjx-mtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},e}((0,mtr_js_1$1.CommonMtrMixin)(Wrapper_js_1$7.CHTMLWrapper));mtr$1.CHTMLmtr=CHTMLmtr;var CHTMLmlabeledtr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$y(e,t),e.prototype.toCHTML=function(e){t.prototype.toCHTML.call(this,e);var r=this.adaptor.firstChild(this.chtml);if(r){this.adaptor.remove(r);var n=this.node.attributes.get("rowalign"),o="baseline"!==n&&"axis"!==n?{rowalign:n}:{},i=this.html("mjx-mtr",o,[r]);this.adaptor.append(this.parent.labels,i)}},e.prototype.markUsed=function(){t.prototype.markUsed.call(this),this.jax.wrapperUsage.add(CHTMLmtr.kind)},e.kind=mtr_js_3.MmlMlabeledtr.prototype.kind,e.styles={"mjx-mlabeledtr":{display:"table-row"},'mjx-mlabeledtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mlabeledtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mlabeledtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mlabeledtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mlabeledtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},e}((0,mtr_js_2.CommonMlabeledtrMixin)(CHTMLmtr));mtr$1.CHTMLmlabeledtr=CHTMLmlabeledtr;var mtd$1={},mtd={},__extends$x=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonMtdMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$x(e,t),Object.defineProperty(e.prototype,"fixesPWidth",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.invalidateBBox=function(){this.bboxComputed=!1},e.prototype.getWrapWidth=function(t){var e=this.parent.parent,r=this.parent,n=this.node.childPosition()-(r.labeled?1:0);return"number"==typeof e.cWidths[n]?e.cWidths[n]:e.getTableData().W[n]},e.prototype.getChildAlign=function(t){return this.node.attributes.get("columnalign")},e}(t)}Object.defineProperty(mtd,"__esModule",{value:!0}),mtd.CommonMtdMixin=void 0,mtd.CommonMtdMixin=CommonMtdMixin;var __extends$w=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mtd$1,"__esModule",{value:!0}),mtd$1.CHTMLmtd=void 0;var Wrapper_js_1$6=Wrapper$2,mtd_js_1$1=mtd,mtd_js_2=mtd$2,CHTMLmtd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$w(e,t),e.prototype.toCHTML=function(e){t.prototype.toCHTML.call(this,e);var r=this.node.attributes.get("rowalign"),n=this.node.attributes.get("columnalign");r!==this.parent.node.attributes.get("rowalign")&&this.adaptor.setAttribute(this.chtml,"rowalign",r),"center"===n||"mlabeledtr"===this.parent.kind&&this===this.parent.childNodes[0]&&n===this.parent.parent.node.attributes.get("side")||this.adaptor.setStyle(this.chtml,"textAlign",n),this.parent.parent.node.getProperty("useHeight")&&this.adaptor.append(this.chtml,this.html("mjx-tstrut"))},e.kind=mtd_js_2.MmlMtd.prototype.kind,e.styles={"mjx-mtd":{display:"table-cell","text-align":"center",padding:".215em .4em"},"mjx-mtd:first-child":{"padding-left":0},"mjx-mtd:last-child":{"padding-right":0},"mjx-mtable > * > mjx-itable > *:first-child > mjx-mtd":{"padding-top":0},"mjx-mtable > * > mjx-itable > *:last-child > mjx-mtd":{"padding-bottom":0},"mjx-tstrut":{display:"inline-block",height:"1em","vertical-align":"-.25em"},'mjx-labels[align="left"] > mjx-mtr > mjx-mtd':{"text-align":"left"},'mjx-labels[align="right"] > mjx-mtr > mjx-mtd':{"text-align":"right"},"mjx-mtd[extra]":{padding:0},'mjx-mtd[rowalign="top"]':{"vertical-align":"top"},'mjx-mtd[rowalign="center"]':{"vertical-align":"middle"},'mjx-mtd[rowalign="bottom"]':{"vertical-align":"bottom"},'mjx-mtd[rowalign="baseline"]':{"vertical-align":"baseline"},'mjx-mtd[rowalign="axis"]':{"vertical-align":".25em"}},e}((0,mtd_js_1$1.CommonMtdMixin)(Wrapper_js_1$6.CHTMLWrapper));mtd$1.CHTMLmtd=CHTMLmtd;var maction$1={},maction={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonMactionMixin=t.TooltipData=void 0;var o=string;t.TooltipData={dx:".2em",dy:".1em",postDelay:600,clearDelay:100,hoverTimer:new Map,clearTimer:new Map,stopTimers:function(t,e){e.clearTimer.has(t)&&(clearTimeout(e.clearTimer.get(t)),e.clearTimer.delete(t)),e.hoverTimer.has(t)&&(clearTimeout(e.hoverTimer.get(t)),e.hoverTimer.delete(t))}},t.CommonMactionMixin=function(i){return function(i){function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=i.apply(this,n([],r(t),!1))||this,a=o.constructor.actions,s=o.node.attributes.get("actiontype"),l=r(a.get(s)||[function(t,e){},{}],2),c=l[0],u=l[1];return o.action=c,o.data=u,o.getParameters(),o}return e(a,i),Object.defineProperty(a.prototype,"selected",{get:function(){var t=this.node.attributes.get("selection"),e=Math.max(1,Math.min(this.childNodes.length,t))-1;return this.childNodes[e]||this.wrap(this.node.selected)},enumerable:!1,configurable:!0}),a.prototype.getParameters=function(){var e=this.node.attributes.get("data-offsets"),n=r((0,o.split)(e||""),2),i=n[0],a=n[1];this.dx=this.length2em(i||t.TooltipData.dx),this.dy=this.length2em(a||t.TooltipData.dy)},a.prototype.computeBBox=function(t,e){void 0===e&&(e=!1),t.updateFrom(this.selected.getOuterBBox()),this.selected.setChildPWidths(e)},a}(i)}}(maction),getDefaultExportFromCjs(maction);var __extends$v=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(maction$1,"__esModule",{value:!0}),maction$1.CHTMLmaction=void 0;var Wrapper_js_1$5=Wrapper$2,maction_js_1$1=maction,maction_js_2=maction,maction_js_3=maction$2,CHTMLmaction=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$v(e,t),e.prototype.toCHTML=function(t){var e=this.standardCHTMLnode(t);this.selected.toCHTML(e),this.action(this,this.data)},e.prototype.setEventHandler=function(t,e){this.chtml.addEventListener(t,e)},e.kind=maction_js_3.MmlMaction.prototype.kind,e.styles={"mjx-maction":{position:"relative"},"mjx-maction > mjx-tool":{display:"none",position:"absolute",bottom:0,right:0,width:0,height:0,"z-index":500},"mjx-tool > mjx-tip":{display:"inline-block",padding:".2em",border:"1px solid #888","font-size":"70%","background-color":"#F8F8F8",color:"black","box-shadow":"2px 2px 5px #AAAAAA"},"mjx-maction[toggle]":{cursor:"pointer"},"mjx-status":{display:"block",position:"fixed",left:"1em",bottom:"1em","min-width":"25%",padding:".2em .4em",border:"1px solid #888","font-size":"90%","background-color":"#F8F8F8",color:"black"}},e.actions=new Map([["toggle",[function(t,e){t.adaptor.setAttribute(t.chtml,"toggle",t.node.attributes.get("selection"));var r=t.factory.jax.math,n=t.factory.jax.document,o=t.node;t.setEventHandler("click",(function(t){r.end.node||(r.start.node=r.end.node=r.typesetRoot,r.start.n=r.end.n=0),o.nextToggleSelection(),r.rerender(n),t.stopPropagation()}))},{}]],["tooltip",[function(t,e){var r=t.childNodes[1];if(r)if(r.node.isKind("mtext")){var n=r.node.getText();t.adaptor.setAttribute(t.chtml,"title",n)}else{var o=t.adaptor,i=o.append(t.chtml,t.html("mjx-tool",{style:{bottom:t.em(-t.dy),right:t.em(-t.dx)}},[t.html("mjx-tip")]));r.toCHTML(o.firstChild(i)),t.setEventHandler("mouseover",(function(r){e.stopTimers(t,e);var n=setTimeout((function(){return o.setStyle(i,"display","block")}),e.postDelay);e.hoverTimer.set(t,n),r.stopPropagation()})),t.setEventHandler("mouseout",(function(r){e.stopTimers(t,e);var n=setTimeout((function(){return o.setStyle(i,"display","")}),e.clearDelay);e.clearTimer.set(t,n),r.stopPropagation()}))}},maction_js_2.TooltipData]],["statusline",[function(t,e){var r=t.childNodes[1];if(r&&r.node.isKind("mtext")){var n=t.adaptor,o=r.node.getText();n.setAttribute(t.chtml,"statusline",o),t.setEventHandler("mouseover",(function(r){if(null===e.status){var i=n.body(n.document);e.status=n.append(i,t.html("mjx-status",{},[t.text(o)]))}r.stopPropagation()})),t.setEventHandler("mouseout",(function(t){e.status&&(n.remove(e.status),e.status=null),t.stopPropagation()}))}},{status:null}]]]),e}((0,maction_js_1$1.CommonMactionMixin)(Wrapper_js_1$5.CHTMLWrapper));maction$1.CHTMLmaction=CHTMLmaction;var mglyph$1={},mglyph={},__extends$u=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__read$a=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$4=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};function CommonMglyphMixin(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,__spreadArray$4([],__read$a(e),!1))||this;return n.getParameters(),n}return __extends$u(e,t),e.prototype.getParameters=function(){var t=this.node.attributes.getList("width","height","valign","src","index"),e=t.width,r=t.height,n=t.valign,o=t.src,i=t.index;if(o)this.width="auto"===e?1:this.length2em(e),this.height="auto"===r?1:this.length2em(r),this.valign=this.length2em(n||"0");else{var a=String.fromCodePoint(parseInt(i)),s=this.node.factory;this.charWrapper=this.wrap(s.create("text").setText(a)),this.charWrapper.parent=this}},e.prototype.computeBBox=function(t,e){this.charWrapper?t.updateFrom(this.charWrapper.getBBox()):(t.w=this.width,t.h=this.height+this.valign,t.d=-this.valign)},e}(t)}Object.defineProperty(mglyph,"__esModule",{value:!0}),mglyph.CommonMglyphMixin=void 0,mglyph.CommonMglyphMixin=CommonMglyphMixin;var __extends$t=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(mglyph$1,"__esModule",{value:!0}),mglyph$1.CHTMLmglyph=void 0;var Wrapper_js_1$4=Wrapper$2,mglyph_js_1$1=mglyph,mglyph_js_2=mglyph$2,CHTMLmglyph=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$t(e,t),e.prototype.toCHTML=function(t){var e=this.standardCHTMLnode(t);if(this.charWrapper)this.charWrapper.toCHTML(e);else{var r=this.node.attributes.getList("src","alt"),n=r.src,o=r.alt,i={width:this.em(this.width),height:this.em(this.height)};this.valign&&(i.verticalAlign=this.em(this.valign));var a=this.html("img",{src:n,style:i,alt:o,title:o});this.adaptor.append(e,a)}},e.kind=mglyph_js_2.MmlMglyph.prototype.kind,e.styles={"mjx-mglyph > img":{display:"inline-block",border:0,padding:0}},e}((0,mglyph_js_1$1.CommonMglyphMixin)(Wrapper_js_1$4.CHTMLWrapper));mglyph$1.CHTMLmglyph=CHTMLmglyph;var semantics$1={},semantics={},__extends$s=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function CommonSemanticsMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$s(e,t),e.prototype.computeBBox=function(t,e){if(this.childNodes.length){var r=this.childNodes[0].getBBox(),n=r.w,o=r.h,i=r.d;t.w=n,t.h=o,t.d=i}},e}(t)}Object.defineProperty(semantics,"__esModule",{value:!0}),semantics.CommonSemanticsMixin=void 0,semantics.CommonSemanticsMixin=CommonSemanticsMixin;var __extends$r=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(semantics$1,"__esModule",{value:!0}),semantics$1.CHTMLxml=semantics$1.CHTMLannotationXML=semantics$1.CHTMLannotation=semantics$1.CHTMLsemantics=void 0;var Wrapper_js_1$3=Wrapper$2,semantics_js_1$1=semantics,semantics_js_2=semantics$2,MmlNode_js_1$a=MmlNode,CHTMLsemantics=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$r(e,t),e.prototype.toCHTML=function(t){var e=this.standardCHTMLnode(t);this.childNodes.length&&this.childNodes[0].toCHTML(e)},e.kind=semantics_js_2.MmlSemantics.prototype.kind,e}((0,semantics_js_1$1.CommonSemanticsMixin)(Wrapper_js_1$3.CHTMLWrapper));semantics$1.CHTMLsemantics=CHTMLsemantics;var CHTMLannotation=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$r(e,t),e.prototype.toCHTML=function(e){t.prototype.toCHTML.call(this,e)},e.prototype.computeBBox=function(){return this.bbox},e.kind=semantics_js_2.MmlAnnotation.prototype.kind,e}(Wrapper_js_1$3.CHTMLWrapper);semantics$1.CHTMLannotation=CHTMLannotation;var CHTMLannotationXML=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$r(e,t),e.kind=semantics_js_2.MmlAnnotationXML.prototype.kind,e.styles={"mjx-annotation-xml":{"font-family":"initial","line-height":"normal"}},e}(Wrapper_js_1$3.CHTMLWrapper);semantics$1.CHTMLannotationXML=CHTMLannotationXML;var CHTMLxml=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$r(e,t),e.prototype.toCHTML=function(t){this.chtml=this.adaptor.append(t,this.adaptor.clone(this.node.getXML()))},e.prototype.computeBBox=function(t,e){var r=this.jax.measureXMLnode(this.node.getXML()),n=r.w,o=r.h,i=r.d;t.w=n,t.h=o,t.d=i},e.prototype.getStyles=function(){},e.prototype.getScale=function(){},e.prototype.getVariant=function(){},e.kind=MmlNode_js_1$a.XMLNode.prototype.kind,e.autoStyle=!1,e}(Wrapper_js_1$3.CHTMLWrapper);semantics$1.CHTMLxml=CHTMLxml;var TeXAtom$1={},TeXAtom={},__extends$q=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(TeXAtom,"__esModule",{value:!0}),TeXAtom.CommonTeXAtomMixin=void 0;var MmlNode_js_1$9=MmlNode;function CommonTeXAtomMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$q(e,t),e.prototype.computeBBox=function(e,r){if(void 0===r&&(r=!1),t.prototype.computeBBox.call(this,e,r),this.childNodes[0]&&this.childNodes[0].bbox.ic&&(e.ic=this.childNodes[0].bbox.ic),this.node.texClass===MmlNode_js_1$9.TEXCLASS.VCENTER){var n=e.h,o=(n+e.d)/2+this.font.params.axis_height-n;e.h+=o,e.d-=o}},e}(t)}TeXAtom.CommonTeXAtomMixin=CommonTeXAtomMixin;var __extends$p=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(TeXAtom$1,"__esModule",{value:!0}),TeXAtom$1.CHTMLTeXAtom=void 0;var Wrapper_js_1$2=Wrapper$2,TeXAtom_js_1$1=TeXAtom,TeXAtom_js_2=TeXAtom$3,MmlNode_js_1$8=MmlNode,CHTMLTeXAtom=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$p(e,t),e.prototype.toCHTML=function(e){if(t.prototype.toCHTML.call(this,e),this.adaptor.setAttribute(this.chtml,"texclass",MmlNode_js_1$8.TEXCLASSNAMES[this.node.texClass]),this.node.texClass===MmlNode_js_1$8.TEXCLASS.VCENTER){var r=this.childNodes[0].getBBox(),n=r.h,o=(n+r.d)/2+this.font.params.axis_height-n;this.adaptor.setStyle(this.chtml,"verticalAlign",this.em(o))}},e.kind=TeXAtom_js_2.TeXAtom.prototype.kind,e}((0,TeXAtom_js_1$1.CommonTeXAtomMixin)(Wrapper_js_1$2.CHTMLWrapper));TeXAtom$1.CHTMLTeXAtom=CHTMLTeXAtom;var TextNode$1={},TextNode={},__extends$o=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$c=commonjsGlobal&&commonjsGlobal.__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.")},__read$9=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};function CommonTextNodeMixin(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$o(e,t),e.prototype.computeBBox=function(t,e){var r,n,o=this.parent.variant,i=this.node.getText();if("-explicitFont"===o){var a=this.jax.getFontData(this.parent.styles),s=this.jax.measureText(i,o,a),l=s.w,c=s.h,u=s.d;t.h=c,t.d=u,t.w=l}else{var d=this.remappedText(i,o);t.empty();try{for(var p=__values$c(d),m=p.next();!m.done;m=p.next()){var h=m.value,f=__read$9(this.getVariantChar(o,h),4),_=(c=f[0],u=f[1],l=f[2],f[3]);if(_.unknown){var g=this.jax.measureText(String.fromCodePoint(h),o);l=g.w,c=g.h,u=g.d}t.w+=l,c>t.h&&(t.h=c),u>t.d&&(t.d=u),t.ic=_.ic||0,t.sk=_.sk||0,t.dx=_.dx||0}}catch(t){r={error:t}}finally{try{m&&!m.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}d.length>1&&(t.sk=0),t.clean()}},e.prototype.remappedText=function(t,e){var r=this.parent.stretch.c;return r?[r]:this.parent.remapChars(this.unicodeChars(t,e))},e.prototype.getStyles=function(){},e.prototype.getVariant=function(){},e.prototype.getScale=function(){},e.prototype.getSpace=function(){},e}(t)}Object.defineProperty(TextNode,"__esModule",{value:!0}),TextNode.CommonTextNodeMixin=void 0,TextNode.CommonTextNodeMixin=CommonTextNodeMixin;var __extends$n=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$b=commonjsGlobal&&commonjsGlobal.__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(TextNode$1,"__esModule",{value:!0}),TextNode$1.CHTMLTextNode=void 0;var MmlNode_js_1$7=MmlNode,Wrapper_js_1$1=Wrapper$2,TextNode_js_1$1=TextNode,CHTMLTextNode=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$n(e,t),e.prototype.toCHTML=function(t){var e,r;this.markUsed();var n=this.adaptor,o=this.parent.variant,i=this.node.getText();if(0!==i.length)if("-explicitFont"===o)n.append(t,this.jax.unknownText(i,o,this.getBBox().w));else{var a=this.remappedText(i,o);try{for(var s=__values$b(a),l=s.next();!l.done;l=s.next()){var c=l.value,u=this.getVariantChar(o,c)[3],d=u.f?" TEX-"+u.f:"",p=u.unknown?this.jax.unknownText(String.fromCodePoint(c),o):this.html("mjx-c",{class:this.char(c)+d});n.append(t,p),!u.unknown&&this.font.charUsage.add([o,c])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}},e.kind=MmlNode_js_1$7.TextNode.prototype.kind,e.autoStyle=!1,e.styles={"mjx-c":{display:"inline-block"},"mjx-utext":{display:"inline-block",padding:".75em 0 .2em 0"}},e}((0,TextNode_js_1$1.CommonTextNodeMixin)(Wrapper_js_1$1.CHTMLWrapper)),_a$7;TextNode$1.CHTMLTextNode=CHTMLTextNode,Object.defineProperty(Wrappers,"__esModule",{value:!0}),Wrappers.CHTMLWrappers=void 0;var Wrapper_js_1=Wrapper$2,math_js_1=math$1,mi_js_1=mi$1,mo_js_1=mo$1,mn_js_1=mn$1,ms_js_1=ms$1,mtext_js_1=mtext$1,mspace_js_1=mspace$1,mpadded_js_1=mpadded$1,menclose_js_1=menclose$1,mrow_js_1=mrow$1,mfenced_js_1=mfenced$1,mfrac_js_1=mfrac$1,msqrt_js_1=msqrt$1,mroot_js_1=mroot$1,msubsup_js_1=msubsup$1,munderover_js_1=munderover$1,mmultiscripts_js_1=mmultiscripts$1,mtable_js_1=mtable$1,mtr_js_1=mtr$1,mtd_js_1=mtd$1,maction_js_1=maction$1,mglyph_js_1=mglyph$1,semantics_js_1=semantics$1,TeXAtom_js_1=TeXAtom$1,TextNode_js_1=TextNode$1;Wrappers.CHTMLWrappers=(_a$7={},_a$7[math_js_1.CHTMLmath.kind]=math_js_1.CHTMLmath,_a$7[mrow_js_1.CHTMLmrow.kind]=mrow_js_1.CHTMLmrow,_a$7[mrow_js_1.CHTMLinferredMrow.kind]=mrow_js_1.CHTMLinferredMrow,_a$7[mi_js_1.CHTMLmi.kind]=mi_js_1.CHTMLmi,_a$7[mo_js_1.CHTMLmo.kind]=mo_js_1.CHTMLmo,_a$7[mn_js_1.CHTMLmn.kind]=mn_js_1.CHTMLmn,_a$7[ms_js_1.CHTMLms.kind]=ms_js_1.CHTMLms,_a$7[mtext_js_1.CHTMLmtext.kind]=mtext_js_1.CHTMLmtext,_a$7[mspace_js_1.CHTMLmspace.kind]=mspace_js_1.CHTMLmspace,_a$7[mpadded_js_1.CHTMLmpadded.kind]=mpadded_js_1.CHTMLmpadded,_a$7[menclose_js_1.CHTMLmenclose.kind]=menclose_js_1.CHTMLmenclose,_a$7[mfrac_js_1.CHTMLmfrac.kind]=mfrac_js_1.CHTMLmfrac,_a$7[msqrt_js_1.CHTMLmsqrt.kind]=msqrt_js_1.CHTMLmsqrt,_a$7[mroot_js_1.CHTMLmroot.kind]=mroot_js_1.CHTMLmroot,_a$7[msubsup_js_1.CHTMLmsub.kind]=msubsup_js_1.CHTMLmsub,_a$7[msubsup_js_1.CHTMLmsup.kind]=msubsup_js_1.CHTMLmsup,_a$7[msubsup_js_1.CHTMLmsubsup.kind]=msubsup_js_1.CHTMLmsubsup,_a$7[munderover_js_1.CHTMLmunder.kind]=munderover_js_1.CHTMLmunder,_a$7[munderover_js_1.CHTMLmover.kind]=munderover_js_1.CHTMLmover,_a$7[munderover_js_1.CHTMLmunderover.kind]=munderover_js_1.CHTMLmunderover,_a$7[mmultiscripts_js_1.CHTMLmmultiscripts.kind]=mmultiscripts_js_1.CHTMLmmultiscripts,_a$7[mfenced_js_1.CHTMLmfenced.kind]=mfenced_js_1.CHTMLmfenced,_a$7[mtable_js_1.CHTMLmtable.kind]=mtable_js_1.CHTMLmtable,_a$7[mtr_js_1.CHTMLmtr.kind]=mtr_js_1.CHTMLmtr,_a$7[mtr_js_1.CHTMLmlabeledtr.kind]=mtr_js_1.CHTMLmlabeledtr,_a$7[mtd_js_1.CHTMLmtd.kind]=mtd_js_1.CHTMLmtd,_a$7[maction_js_1.CHTMLmaction.kind]=maction_js_1.CHTMLmaction,_a$7[mglyph_js_1.CHTMLmglyph.kind]=mglyph_js_1.CHTMLmglyph,_a$7[semantics_js_1.CHTMLsemantics.kind]=semantics_js_1.CHTMLsemantics,_a$7[semantics_js_1.CHTMLannotation.kind]=semantics_js_1.CHTMLannotation,_a$7[semantics_js_1.CHTMLannotationXML.kind]=semantics_js_1.CHTMLannotationXML,_a$7[semantics_js_1.CHTMLxml.kind]=semantics_js_1.CHTMLxml,_a$7[TeXAtom_js_1.CHTMLTeXAtom.kind]=TeXAtom_js_1.CHTMLTeXAtom,_a$7[TextNode_js_1.CHTMLTextNode.kind]=TextNode_js_1.CHTMLTextNode,_a$7[Wrapper_js_1.CHTMLWrapper.kind]=Wrapper_js_1.CHTMLWrapper,_a$7);var __extends$m=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(WrapperFactory$2,"__esModule",{value:!0});var CHTMLWrapperFactory_1=WrapperFactory$2.CHTMLWrapperFactory=void 0,WrapperFactory_js_1$1=WrapperFactory$1,Wrappers_js_1=Wrappers,CHTMLWrapperFactory=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$m(e,t),e.defaultNodes=Wrappers_js_1.CHTMLWrappers,e}(WrapperFactory_js_1$1.CommonWrapperFactory);CHTMLWrapperFactory_1=WrapperFactory$2.CHTMLWrapperFactory=CHTMLWrapperFactory;var Usage$1={};Object.defineProperty(Usage$1,"__esModule",{value:!0}),Usage$1.Usage=void 0;var Usage=function(){function t(){this.used=new Set,this.needsUpdate=[]}return t.prototype.add=function(t){var e=JSON.stringify(t);this.used.has(e)||this.needsUpdate.push(t),this.used.add(e)},t.prototype.has=function(t){return this.used.has(JSON.stringify(t))},t.prototype.clear=function(){this.used.clear(),this.needsUpdate=[]},t.prototype.update=function(){var t=this.needsUpdate;return this.needsUpdate=[],t},t}();Usage$1.Usage=Usage;var tex$1={},FontData={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},n=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=commonjsGlobal&&commonjsGlobal.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},i=commonjsGlobal&&commonjsGlobal.__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.")},a=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(t,"__esModule",{value:!0}),t.AddCSS=t.CHTMLFontData=void 0;var s=FontData$2,l=Usage$1,c=lengths;o(FontData$2,t);var u=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.charUsage=new l.Usage,e.delimUsage=new l.Usage,e}return e(n,t),n.charOptions=function(e,r){return t.charOptions.call(this,e,r)},n.prototype.adaptiveCSS=function(t){this.options.adaptiveCSS=t},n.prototype.clearCache=function(){this.options.adaptiveCSS&&(this.charUsage.clear(),this.delimUsage.clear())},n.prototype.createVariant=function(e,r,n){void 0===r&&(r=null),void 0===n&&(n=null),t.prototype.createVariant.call(this,e,r,n);var o=this.constructor;this.variant[e].classes=o.defaultVariantClasses[e],this.variant[e].letter=o.defaultVariantLetters[e]},n.prototype.defineChars=function(e,r){var o,a;t.prototype.defineChars.call(this,e,r);var s=this.variant[e].letter;try{for(var l=i(Object.keys(r)),c=l.next();!c.done;c=l.next()){var u=c.value,d=n.charOptions(r,parseInt(u));void 0===d.f&&(d.f=s)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}},Object.defineProperty(n.prototype,"styles",{get:function(){var t=this.constructor,e=r({},t.defaultStyles);return this.addFontURLs(e,t.defaultFonts,this.options.fontURL),this.options.adaptiveCSS?this.updateStyles(e):this.allStyles(e),e},enumerable:!1,configurable:!0}),n.prototype.updateStyles=function(t){var e,r,n,o;try{for(var s=i(this.delimUsage.update()),l=s.next();!l.done;l=s.next()){var c=l.value;this.addDelimiterStyles(t,c,this.delimiters[c])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}try{for(var u=i(this.charUsage.update()),d=u.next();!d.done;d=u.next()){var p=a(d.value,2),m=p[0],h=(c=p[1],this.variant[m]);this.addCharStyles(t,h.letter,c,h.chars[c])}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return t},n.prototype.allStyles=function(t){var e,r,n,o,a,s;try{for(var l=i(Object.keys(this.delimiters)),c=l.next();!c.done;c=l.next()){var u=c.value,d=parseInt(u);this.addDelimiterStyles(t,d,this.delimiters[d])}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}try{for(var p=i(Object.keys(this.variant)),m=p.next();!m.done;m=p.next()){var h=m.value,f=this.variant[h],_=f.letter;try{for(var g=(a=void 0,i(Object.keys(f.chars))),y=g.next();!y.done;y=g.next()){u=y.value,d=parseInt(u);var b=f.chars[d];(b[3]||{}).smp||(b.length<4&&(b[3]={}),this.addCharStyles(t,_,d,b))}}catch(t){a={error:t}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}}}catch(t){n={error:t}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}},n.prototype.addFontURLs=function(t,e,n){var o,a;try{for(var s=i(Object.keys(e)),l=s.next();!l.done;l=s.next()){var c=l.value,u=r({},e[c]);u.src=u.src.replace(/%%URL%%/,n),t[c]=u}}catch(t){o={error:t}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}},n.prototype.addDelimiterStyles=function(t,e,r){var n=this.charSelector(e);r.c&&r.c!==e&&(t[".mjx-stretched mjx-c"+(n=this.charSelector(r.c))+"::before"]={content:this.charContent(r.c)}),r.stretch&&(1===r.dir?this.addDelimiterVStyles(t,n,r):this.addDelimiterHStyles(t,n,r))},n.prototype.addDelimiterVStyles=function(t,e,r){var n=r.HDW,o=a(r.stretch,4),i=o[0],s=o[1],l=o[2],c=o[3],u=this.addDelimiterVPart(t,e,"beg",i,n);this.addDelimiterVPart(t,e,"ext",s,n);var d=this.addDelimiterVPart(t,e,"end",l,n),p={};if(c){var m=this.addDelimiterVPart(t,e,"mid",c,n);p.height="50%",t["mjx-stretchy-v"+e+" > mjx-mid"]={"margin-top":this.em(-m/2),"margin-bottom":this.em(-m/2)}}u&&(p["border-top-width"]=this.em0(u-.03)),d&&(p["border-bottom-width"]=this.em0(d-.03),t["mjx-stretchy-v"+e+" > mjx-end"]={"margin-top":this.em(-d)}),Object.keys(p).length&&(t["mjx-stretchy-v"+e+" > mjx-ext"]=p)},n.prototype.addDelimiterVPart=function(t,e,r,n,o){if(!n)return 0;var i=this.getDelimiterData(n),a=(o[2]-i[2])/2,s={content:this.charContent(n)};return"ext"!==r?s.padding=this.padding(i,a):(s.width=this.em0(o[2]),a&&(s["padding-left"]=this.em0(a))),t["mjx-stretchy-v"+e+" mjx-"+r+" mjx-c::before"]=s,i[0]+i[1]},n.prototype.addDelimiterHStyles=function(t,e,r){var n=a(r.stretch,4),o=n[0],i=n[1],s=n[2],l=n[3],c=r.HDW;this.addDelimiterHPart(t,e,"beg",o,c),this.addDelimiterHPart(t,e,"ext",i,c),this.addDelimiterHPart(t,e,"end",s,c),l&&(this.addDelimiterHPart(t,e,"mid",l,c),t["mjx-stretchy-h"+e+" > mjx-ext"]={width:"50%"})},n.prototype.addDelimiterHPart=function(t,e,r,n,o){if(n){var i=this.getDelimiterData(n)[3],a={content:i&&i.c?'"'+i.c+'"':this.charContent(n)};a.padding=this.padding(o,0,-o[2]),t["mjx-stretchy-h"+e+" mjx-"+r+" mjx-c::before"]=a}},n.prototype.addCharStyles=function(t,e,r,n){var o=n[3],i=void 0!==o.f?o.f:e;t["mjx-c"+this.charSelector(r)+(i?".TEX-"+i:"")+"::before"]={padding:this.padding(n,0,o.ic||0),content:null!=o.c?'"'+o.c+'"':this.charContent(r)}},n.prototype.getDelimiterData=function(t){return this.getChar("-smallop",t)},n.prototype.em=function(t){return(0,c.em)(t)},n.prototype.em0=function(t){return(0,c.em)(Math.max(0,t))},n.prototype.padding=function(t,e,r){var n=a(t,3),o=n[0],i=n[1];return void 0===e&&(e=0),void 0===r&&(r=0),[o,n[2]+r,i,e].map(this.em0).join(" ")},n.prototype.charContent=function(t){return'"'+(t>=32&&t<=126&&34!==t&&39!==t&&92!==t?String.fromCharCode(t):"\\"+t.toString(16).toUpperCase())+'"'},n.prototype.charSelector=function(t){return".mjx-c"+t.toString(16).toUpperCase()},n.OPTIONS=r(r({},s.FontData.OPTIONS),{fontURL:"js/output/chtml/fonts/tex-woff-v2"}),n.JAX="CHTML",n.defaultVariantClasses={},n.defaultVariantLetters={},n.defaultStyles={"mjx-c::before":{display:"block",width:0}},n.defaultFonts={"@font-face /* 0 */":{"font-family":"MJXZERO",src:'url("%%URL%%/MathJax_Zero.woff") format("woff")'}},n}(s.FontData);t.CHTMLFontData=u,t.AddCSS=function(t,e){var r,n;try{for(var o=i(Object.keys(e)),a=o.next();!a.done;a=o.next()){var l=a.value,c=parseInt(l);Object.assign(s.FontData.charOptions(t,c),e[c])}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return t}}(FontData),getDefaultExportFromCjs(FontData);var tex={},__extends$l=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$4=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$4=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$4.apply(this,arguments)},__read$8=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$3=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};function CommonTeXFontMixin(t){var e;return e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$l(e,t),e.prototype.getDelimiterData=function(t){return this.getChar("-smallop",t)||this.getChar("-size4",t)},e}(t),e.NAME="TeX",e.defaultVariants=__spreadArray$3(__spreadArray$3([],__read$8(t.defaultVariants),!1),[["-smallop","normal"],["-largeop","normal"],["-size3","normal"],["-size4","normal"],["-tex-calligraphic","italic"],["-tex-bold-calligraphic","bold-italic"],["-tex-oldstyle","normal"],["-tex-bold-oldstyle","bold"],["-tex-mathit","italic"],["-tex-variant","normal"]],!1),e.defaultCssFonts=__assign$4(__assign$4({},t.defaultCssFonts),{"-smallop":["serif",!1,!1],"-largeop":["serif",!1,!1],"-size3":["serif",!1,!1],"-size4":["serif",!1,!1],"-tex-calligraphic":["cursive",!0,!1],"-tex-bold-calligraphic":["cursive",!0,!0],"-tex-oldstyle":["serif",!1,!1],"-tex-bold-oldstyle":["serif",!1,!0],"-tex-mathit":["serif",!0,!1]}),e.defaultSizeVariants=["normal","-smallop","-largeop","-size3","-size4","-tex-variant"],e.defaultStretchVariants=["-size4"],e}Object.defineProperty(tex,"__esModule",{value:!0}),tex.CommonTeXFontMixin=void 0,tex.CommonTeXFontMixin=CommonTeXFontMixin;var boldItalic$1={},boldItalic={};Object.defineProperty(boldItalic,"__esModule",{value:!0}),boldItalic.boldItalic=void 0,boldItalic.boldItalic={47:[.711,.21,.894],305:[.452,.008,.394,{sk:.0319}],567:[.451,.201,.439,{sk:.0958}],8260:[.711,.21,.894],8710:[.711,0,.958,{sk:.192}],10744:[.711,.21,.894]},Object.defineProperty(boldItalic$1,"__esModule",{value:!0}),boldItalic$1.boldItalic=void 0;var FontData_js_1$h=FontData,bold_italic_js_1$1=boldItalic;boldItalic$1.boldItalic=(0,FontData_js_1$h.AddCSS)(bold_italic_js_1$1.boldItalic,{305:{f:"B"},567:{f:"B"},8260:{c:"/"},8710:{c:"\\394"},10744:{c:"/"}});var bold$1={},bold={};Object.defineProperty(bold,"__esModule",{value:!0}),bold.bold=void 0,bold.bold={33:[.705,0,.35],34:[.694,-.329,.603],35:[.694,.193,.958],36:[.75,.056,.575],37:[.75,.056,.958],38:[.705,.011,.894],39:[.694,-.329,.319],40:[.75,.249,.447],41:[.75,.249,.447],42:[.75,-.306,.575],43:[.633,.131,.894],44:[.171,.194,.319],45:[.278,-.166,.383],46:[.171,0,.319],47:[.75,.25,.575],58:[.444,0,.319],59:[.444,.194,.319],60:[.587,.085,.894],61:[.393,-.109,.894],62:[.587,.085,.894],63:[.7,0,.543],64:[.699,.006,.894],91:[.75,.25,.319],92:[.75,.25,.575],93:[.75,.25,.319],94:[.694,-.52,.575],95:[-.01,.061,.575],96:[.706,-.503,.575],123:[.75,.25,.575],124:[.75,.249,.319],125:[.75,.25,.575],126:[.344,-.202,.575],168:[.695,-.535,.575],172:[.371,-.061,.767],175:[.607,-.54,.575],176:[.702,-.536,.575],177:[.728,.035,.894],180:[.706,-.503,.575],183:[.336,-.166,.319],215:[.53,.028,.894],247:[.597,.096,.894],305:[.442,0,.278,{sk:.0278}],567:[.442,.205,.306,{sk:.0833}],697:[.563,-.033,.344],710:[.694,-.52,.575],711:[.66,-.515,.575],713:[.607,-.54,.575],714:[.706,-.503,.575],715:[.706,-.503,.575],728:[.694,-.5,.575],729:[.695,-.525,.575],730:[.702,-.536,.575],732:[.694,-.552,.575],768:[.706,-.503,0],769:[.706,-.503,0],770:[.694,-.52,0],771:[.694,-.552,0],772:[.607,-.54,0],774:[.694,-.5,0],775:[.695,-.525,0],776:[.695,-.535,0],778:[.702,-.536,0],779:[.714,-.511,0],780:[.66,-.515,0],824:[.711,.21,0],8194:[0,0,.5],8195:[0,0,.999],8196:[0,0,.333],8197:[0,0,.25],8198:[0,0,.167],8201:[0,0,.167],8202:[0,0,.083],8211:[.3,-.249,.575],8212:[.3,-.249,1.15],8213:[.3,-.249,1.15],8214:[.75,.248,.575],8215:[-.01,.061,.575],8216:[.694,-.329,.319],8217:[.694,-.329,.319],8220:[.694,-.329,.603],8221:[.694,-.329,.603],8224:[.702,.211,.511],8225:[.702,.202,.511],8226:[.474,-.028,.575],8230:[.171,0,1.295],8242:[.563,-.033,.344],8243:[.563,0,.688],8244:[.563,0,1.032],8254:[.607,-.54,.575],8260:[.75,.25,.575],8279:[.563,0,1.376],8407:[.723,-.513,.575],8463:[.694,.008,.668,{sk:-.0319}],8467:[.702,.019,.474,{sk:.128}],8472:[.461,.21,.74],8501:[.694,0,.703],8592:[.518,.017,1.15],8593:[.694,.193,.575],8594:[.518,.017,1.15],8595:[.694,.194,.575],8596:[.518,.017,1.15],8597:[.767,.267,.575],8598:[.724,.194,1.15],8599:[.724,.193,1.15],8600:[.694,.224,1.15],8601:[.694,.224,1.15],8602:[.711,.21,1.15],8603:[.711,.21,1.15],8614:[.518,.017,1.15],8617:[.518,.017,1.282],8618:[.518,.017,1.282],8622:[.711,.21,1.15],8636:[.518,-.22,1.15],8637:[.281,.017,1.15],8640:[.518,-.22,1.15],8641:[.281,.017,1.15],8652:[.718,.017,1.15],8653:[.711,.21,1.15],8654:[.711,.21,1.15],8655:[.711,.21,1.15],8656:[.547,.046,1.15],8657:[.694,.193,.703],8658:[.547,.046,1.15],8659:[.694,.194,.703],8660:[.547,.046,1.15],8661:[.767,.267,.703],8704:[.694,.016,.639],8707:[.694,0,.639],8708:[.711,.21,.639],8709:[.767,.073,.575],8710:[.698,0,.958],8712:[.587,.086,.767],8713:[.711,.21,.767],8715:[.587,.086,.767],8716:[.711,.21,.767],8722:[.281,-.221,.894],8723:[.537,.227,.894],8725:[.75,.25,.575],8726:[.75,.25,.575],8727:[.472,-.028,.575],8728:[.474,-.028,.575],8729:[.474,-.028,.575],8730:[.82,.18,.958,{ic:.03}],8733:[.451,.008,.894],8734:[.452,.008,1.15],8736:[.714,0,.722],8739:[.75,.249,.319],8740:[.75,.249,.319],8741:[.75,.248,.575],8742:[.75,.248,.575],8743:[.604,.017,.767],8744:[.604,.016,.767],8745:[.603,.016,.767],8746:[.604,.016,.767],8747:[.711,.211,.569,{ic:.063}],8764:[.391,-.109,.894],8768:[.583,.082,.319],8769:[.711,.21,.894],8771:[.502,0,.894],8772:[.711,.21,.894],8773:[.638,.027,.894],8775:[.711,.21,.894],8776:[.524,-.032,.894],8777:[.711,.21,.894],8781:[.533,.032,.894],8784:[.721,-.109,.894],8800:[.711,.21,.894],8801:[.505,0,.894],8802:[.711,.21,.894],8804:[.697,.199,.894],8805:[.697,.199,.894],8810:[.617,.116,1.15],8811:[.618,.116,1.15],8813:[.711,.21,.894],8814:[.711,.21,.894],8815:[.711,.21,.894],8816:[.711,.21,.894],8817:[.711,.21,.894],8826:[.585,.086,.894],8827:[.586,.086,.894],8832:[.711,.21,.894],8833:[.711,.21,.894],8834:[.587,.085,.894],8835:[.587,.086,.894],8836:[.711,.21,.894],8837:[.711,.21,.894],8838:[.697,.199,.894],8839:[.697,.199,.894],8840:[.711,.21,.894],8841:[.711,.21,.894],8846:[.604,.016,.767],8849:[.697,.199,.894],8850:[.697,.199,.894],8851:[.604,0,.767],8852:[.604,0,.767],8853:[.632,.132,.894],8854:[.632,.132,.894],8855:[.632,.132,.894],8856:[.632,.132,.894],8857:[.632,.132,.894],8866:[.693,0,.703],8867:[.693,0,.703],8868:[.694,0,.894],8869:[.693,0,.894],8872:[.75,.249,.974],8876:[.711,.21,.703],8877:[.75,.249,.974],8900:[.523,.021,.575],8901:[.336,-.166,.319],8902:[.502,0,.575],8904:[.54,.039,1],8930:[.711,.21,.894],8931:[.711,.21,.894],8942:[.951,.029,.319],8943:[.336,-.166,1.295],8945:[.871,-.101,1.323],8968:[.75,.248,.511],8969:[.75,.248,.511],8970:[.749,.248,.511],8971:[.749,.248,.511],8994:[.405,-.108,1.15],8995:[.392,-.126,1.15],9001:[.75,.249,.447],9002:[.75,.249,.447],9651:[.711,0,1.022],9653:[.711,0,1.022],9657:[.54,.039,.575],9661:[.5,.21,1.022],9663:[.5,.21,1.022],9667:[.539,.038,.575],9711:[.711,.211,1.15],9824:[.719,.129,.894],9825:[.711,.024,.894],9826:[.719,.154,.894],9827:[.719,.129,.894],9837:[.75,.017,.447],9838:[.741,.223,.447],9839:[.724,.224,.447],10072:[.75,.249,.319],10216:[.75,.249,.447],10217:[.75,.249,.447],10229:[.518,.017,1.805],10230:[.518,.017,1.833],10231:[.518,.017,2.126],10232:[.547,.046,1.868],10233:[.547,.046,1.87],10234:[.547,.046,2.126],10236:[.518,.017,1.833],10744:[.711,.21,.894],10799:[.53,.028,.894],10815:[.686,0,.9],10927:[.696,.199,.894],10928:[.697,.199,.894],12296:[.75,.249,.447],12297:[.75,.249,.447]},Object.defineProperty(bold$1,"__esModule",{value:!0}),bold$1.bold=void 0;var FontData_js_1$g=FontData,bold_js_1$1=bold;bold$1.bold=(0,FontData_js_1$g.AddCSS)(bold_js_1$1.bold,{183:{c:"\\22C5"},305:{f:""},567:{f:""},697:{c:"\\2032"},8194:{c:""},8195:{c:""},8196:{c:""},8197:{c:""},8198:{c:""},8201:{c:""},8202:{c:""},8213:{c:"\\2014"},8214:{c:"\\2225"},8215:{c:"_"},8226:{c:"\\2219"},8243:{c:"\\2032\\2032"},8244:{c:"\\2032\\2032\\2032"},8254:{c:"\\2C9"},8260:{c:"/"},8279:{c:"\\2032\\2032\\2032\\2032"},8407:{c:"\\2192",f:"VB"},8602:{c:"\\2190\\338"},8603:{c:"\\2192\\338"},8622:{c:"\\2194\\338"},8653:{c:"\\21D0\\338"},8654:{c:"\\21D4\\338"},8655:{c:"\\21D2\\338"},8708:{c:"\\2203\\338"},8710:{c:"\\394"},8716:{c:"\\220B\\338"},8740:{c:"\\2223\\338"},8742:{c:"\\2225\\338"},8769:{c:"\\223C\\338"},8772:{c:"\\2243\\338"},8775:{c:"\\2245\\338"},8777:{c:"\\2248\\338"},8802:{c:"\\2261\\338"},8813:{c:"\\224D\\338"},8814:{c:"<\\338"},8815:{c:">\\338"},8816:{c:"\\2264\\338"},8817:{c:"\\2265\\338"},8832:{c:"\\227A\\338"},8833:{c:"\\227B\\338"},8836:{c:"\\2282\\338"},8837:{c:"\\2283\\338"},8840:{c:"\\2286\\338"},8841:{c:"\\2287\\338"},8876:{c:"\\22A2\\338"},8877:{c:"\\22A8\\338"},8930:{c:"\\2291\\338"},8931:{c:"\\2292\\338"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},9653:{c:"\\25B3"},9663:{c:"\\25BD"},10072:{c:"\\2223"},10744:{c:"/",f:"BI"},10799:{c:"\\D7"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}});var doubleStruck$1={},doubleStruck={};Object.defineProperty(doubleStruck,"__esModule",{value:!0}),doubleStruck.doubleStruck=void 0,doubleStruck.doubleStruck={},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.doubleStruck=void 0;var e=doubleStruck;Object.defineProperty(t,"doubleStruck",{enumerable:!0,get:function(){return e.doubleStruck}})}(doubleStruck$1),getDefaultExportFromCjs(doubleStruck$1);var frakturBold$1={},frakturBold={};Object.defineProperty(frakturBold,"__esModule",{value:!0}),frakturBold.frakturBold=void 0,frakturBold.frakturBold={33:[.689,.012,.349],34:[.695,-.432,.254],38:[.696,.016,.871],39:[.695,-.436,.25],40:[.737,.186,.459],41:[.735,.187,.459],42:[.692,-.449,.328],43:[.598,.082,.893],44:[.107,.191,.328],45:[.275,-.236,.893],46:[.102,.015,.328],47:[.721,.182,.593],48:[.501,.012,.593],49:[.489,0,.593],50:[.491,0,.593],51:[.487,.193,.593],52:[.495,.196,.593],53:[.481,.19,.593],54:[.704,.012,.593],55:[.479,.197,.593],56:[.714,.005,.593],57:[.487,.195,.593],58:[.457,.012,.255],59:[.458,.19,.255],61:[.343,-.168,.582],63:[.697,.014,.428],91:[.74,.13,.257],93:[.738,.132,.257],94:[.734,-.452,.59],8216:[.708,-.411,.254],8217:[.692,-.394,.254],8260:[.721,.182,.593],58113:[.63,.027,.587],58114:[.693,.212,.394,{ic:.014}],58115:[.681,.219,.387],58116:[.473,.212,.593],58117:[.684,.027,.393],58120:[.679,.22,.981],58121:[.717,.137,.727]},Object.defineProperty(frakturBold$1,"__esModule",{value:!0}),frakturBold$1.frakturBold=void 0;var FontData_js_1$f=FontData,fraktur_bold_js_1$1=frakturBold;frakturBold$1.frakturBold=(0,FontData_js_1$f.AddCSS)(fraktur_bold_js_1$1.frakturBold,{8260:{c:"/"}});var fraktur$1={},fraktur={};Object.defineProperty(fraktur,"__esModule",{value:!0}),fraktur.fraktur=void 0,fraktur.fraktur={33:[.689,.012,.296],34:[.695,-.432,.215],38:[.698,.011,.738],39:[.695,-.436,.212],40:[.737,.186,.389],41:[.735,.187,.389],42:[.692,-.449,.278],43:[.598,.082,.756],44:[.107,.191,.278],45:[.275,-.236,.756],46:[.102,.015,.278],47:[.721,.182,.502],48:[.492,.013,.502],49:[.468,0,.502],50:[.474,0,.502],51:[.473,.182,.502],52:[.476,.191,.502],53:[.458,.184,.502],54:[.7,.013,.502],55:[.468,.181,.502],56:[.705,.01,.502],57:[.469,.182,.502],58:[.457,.012,.216],59:[.458,.189,.216],61:[.368,-.132,.756],63:[.693,.011,.362],91:[.74,.13,.278],93:[.738,.131,.278],94:[.734,-.452,.5],8216:[.708,-.41,.215],8217:[.692,-.395,.215],8260:[.721,.182,.502],58112:[.683,.032,.497],58113:[.616,.03,.498],58114:[.68,.215,.333],58115:[.679,.224,.329],58116:[.471,.214,.503],58117:[.686,.02,.333],58118:[.577,.021,.334,{ic:.013}],58119:[.475,.022,.501,{ic:.013}]},Object.defineProperty(fraktur$1,"__esModule",{value:!0}),fraktur$1.fraktur=void 0;var FontData_js_1$e=FontData,fraktur_js_1$1=fraktur;fraktur$1.fraktur=(0,FontData_js_1$e.AddCSS)(fraktur_js_1$1.fraktur,{8260:{c:"/"}});var italic$1={},italic={};Object.defineProperty(italic,"__esModule",{value:!0}),italic.italic=void 0,italic.italic={33:[.716,0,.307,{ic:.073}],34:[.694,-.379,.514,{ic:.024}],35:[.694,.194,.818,{ic:.01}],37:[.75,.056,.818,{ic:.029}],38:[.716,.022,.767,{ic:.035}],39:[.694,-.379,.307,{ic:.07}],40:[.75,.25,.409,{ic:.108}],41:[.75,.25,.409],42:[.75,-.32,.511,{ic:.073}],43:[.557,.057,.767],44:[.121,.194,.307],45:[.251,-.18,.358],46:[.121,0,.307],47:[.716,.215,.778],48:[.665,.021,.511,{ic:.051}],49:[.666,0,.511],50:[.666,.022,.511,{ic:.04}],51:[.666,.022,.511,{ic:.051}],52:[.666,.194,.511],53:[.666,.022,.511,{ic:.056}],54:[.665,.022,.511,{ic:.054}],55:[.666,.022,.511,{ic:.123}],56:[.666,.021,.511,{ic:.042}],57:[.666,.022,.511,{ic:.042}],58:[.431,0,.307],59:[.431,.194,.307],61:[.367,-.133,.767],63:[.716,0,.511,{ic:.04}],64:[.705,.011,.767,{ic:.022}],91:[.75,.25,.307,{ic:.139}],93:[.75,.25,.307,{ic:.052}],94:[.694,-.527,.511,{ic:.017}],95:[-.025,.062,.511,{ic:.043}],126:[.318,-.208,.511,{ic:.06}],305:[.441,.01,.307,{ic:.033}],567:[.442,.204,.332],768:[.697,-.5,0],769:[.697,-.5,0,{ic:.039}],770:[.694,-.527,0,{ic:.017}],771:[.668,-.558,0,{ic:.06}],772:[.589,-.544,0,{ic:.054}],774:[.694,-.515,0,{ic:.062}],775:[.669,-.548,0],776:[.669,-.554,0,{ic:.045}],778:[.716,-.542,0],779:[.697,-.503,0,{ic:.065}],780:[.638,-.502,0,{ic:.029}],989:[.605,.085,.778],8211:[.285,-.248,.511,{ic:.043}],8212:[.285,-.248,1.022,{ic:.016}],8213:[.285,-.248,1.022,{ic:.016}],8215:[-.025,.062,.511,{ic:.043}],8216:[.694,-.379,.307,{ic:.055}],8217:[.694,-.379,.307,{ic:.07}],8220:[.694,-.379,.514,{ic:.092}],8221:[.694,-.379,.514,{ic:.024}],8260:[.716,.215,.778],8463:[.695,.013,.54,{ic:.022}],8710:[.716,0,.833,{sk:.167}],10744:[.716,.215,.778]},Object.defineProperty(italic$1,"__esModule",{value:!0}),italic$1.italic=void 0;var FontData_js_1$d=FontData,italic_js_1$1=italic;italic$1.italic=(0,FontData_js_1$d.AddCSS)(italic_js_1$1.italic,{47:{f:"I"},989:{c:"\\E008",f:"A"},8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/",f:"I"},8710:{c:"\\394",f:"I"},10744:{c:"/",f:"I"}});var largeop$1={},largeop={};Object.defineProperty(largeop,"__esModule",{value:!0}),largeop.largeop=void 0,largeop.largeop={40:[1.15,.649,.597],41:[1.15,.649,.597],47:[1.15,.649,.811],91:[1.15,.649,.472],92:[1.15,.649,.811],93:[1.15,.649,.472],123:[1.15,.649,.667],125:[1.15,.649,.667],710:[.772,-.565,1],732:[.75,-.611,1],770:[.772,-.565,0],771:[.75,-.611,0],8214:[.602,0,.778],8260:[1.15,.649,.811],8593:[.6,0,.667],8595:[.6,0,.667],8657:[.599,0,.778],8659:[.6,0,.778],8719:[.95,.45,1.278],8720:[.95,.45,1.278],8721:[.95,.45,1.444],8730:[1.15,.65,1,{ic:.02}],8739:[.627,.015,.333],8741:[.627,.015,.556],8747:[1.36,.862,.556,{ic:.388}],8748:[1.36,.862,1.084,{ic:.388}],8749:[1.36,.862,1.592,{ic:.388}],8750:[1.36,.862,.556,{ic:.388}],8896:[.95,.45,1.111],8897:[.95,.45,1.111],8898:[.949,.45,1.111],8899:[.95,.449,1.111],8968:[1.15,.649,.528],8969:[1.15,.649,.528],8970:[1.15,.649,.528],8971:[1.15,.649,.528],9001:[1.15,.649,.611],9002:[1.15,.649,.611],9168:[.602,0,.667],10072:[.627,.015,.333],10216:[1.15,.649,.611],10217:[1.15,.649,.611],10752:[.949,.449,1.511],10753:[.949,.449,1.511],10754:[.949,.449,1.511],10756:[.95,.449,1.111],10758:[.95,.45,1.111],10764:[1.36,.862,2.168,{ic:.388}],12296:[1.15,.649,.611],12297:[1.15,.649,.611]},Object.defineProperty(largeop$1,"__esModule",{value:!0}),largeop$1.largeop=void 0;var FontData_js_1$c=FontData,largeop_js_1$1=largeop;largeop$1.largeop=(0,FontData_js_1$c.AddCSS)(largeop_js_1$1.largeop,{8214:{f:"S1"},8260:{c:"/"},8593:{f:"S1"},8595:{f:"S1"},8657:{f:"S1"},8659:{f:"S1"},8739:{f:"S1"},8741:{f:"S1"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},9168:{f:"S1"},10072:{c:"\\2223",f:"S1"},10764:{c:"\\222C\\222C"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}});var monospace$1={},monospace={};Object.defineProperty(monospace,"__esModule",{value:!0}),monospace.monospace=void 0,monospace.monospace={32:[0,0,.525],33:[.622,0,.525],34:[.623,-.333,.525],35:[.611,0,.525],36:[.694,.082,.525],37:[.694,.083,.525],38:[.622,.011,.525],39:[.611,-.287,.525],40:[.694,.082,.525],41:[.694,.082,.525],42:[.52,-.09,.525],43:[.531,-.081,.525],44:[.14,.139,.525],45:[.341,-.271,.525],46:[.14,0,.525],47:[.694,.083,.525],58:[.431,0,.525],59:[.431,.139,.525],60:[.557,-.055,.525],61:[.417,-.195,.525],62:[.557,-.055,.525],63:[.617,0,.525],64:[.617,.006,.525],91:[.694,.082,.525],92:[.694,.083,.525],93:[.694,.082,.525],94:[.611,-.46,.525],95:[-.025,.095,.525],96:[.681,-.357,.525],123:[.694,.083,.525],124:[.694,.082,.525],125:[.694,.083,.525],126:[.611,-.466,.525],127:[.612,-.519,.525],160:[0,0,.525],305:[.431,0,.525],567:[.431,.228,.525],697:[.623,-.334,.525],768:[.611,-.485,0],769:[.611,-.485,0],770:[.611,-.46,0],771:[.611,-.466,0],772:[.577,-.5,0],774:[.611,-.504,0],776:[.612,-.519,0],778:[.619,-.499,0],780:[.577,-.449,0],913:[.623,0,.525],914:[.611,0,.525],915:[.611,0,.525],916:[.623,0,.525],917:[.611,0,.525],918:[.611,0,.525],919:[.611,0,.525],920:[.621,.01,.525],921:[.611,0,.525],922:[.611,0,.525],923:[.623,0,.525],924:[.611,0,.525],925:[.611,0,.525],926:[.611,0,.525],927:[.621,.01,.525],928:[.611,0,.525],929:[.611,0,.525],931:[.611,0,.525],932:[.611,0,.525],933:[.622,0,.525],934:[.611,0,.525],935:[.611,0,.525],936:[.611,0,.525],937:[.622,0,.525],8215:[-.025,.095,.525],8242:[.623,-.334,.525],8243:[.623,0,1.05],8244:[.623,0,1.575],8260:[.694,.083,.525],8279:[.623,0,2.1],8710:[.623,0,.525]},Object.defineProperty(monospace$1,"__esModule",{value:!0}),monospace$1.monospace=void 0;var FontData_js_1$b=FontData,monospace_js_1$1=monospace;monospace$1.monospace=(0,FontData_js_1$b.AddCSS)(monospace_js_1$1.monospace,{697:{c:"\\2032"},913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8215:{c:"_"},8243:{c:"\\2032\\2032"},8244:{c:"\\2032\\2032\\2032"},8260:{c:"/"},8279:{c:"\\2032\\2032\\2032\\2032"},8710:{c:"\\394"}});var normal$1={},normal={};Object.defineProperty(normal,"__esModule",{value:!0}),normal.normal=void 0,normal.normal={32:[0,0,.25],33:[.716,0,.278],34:[.694,-.379,.5],35:[.694,.194,.833],36:[.75,.056,.5],37:[.75,.056,.833],38:[.716,.022,.778],39:[.694,-.379,.278],40:[.75,.25,.389],41:[.75,.25,.389],42:[.75,-.32,.5],43:[.583,.082,.778],44:[.121,.194,.278],45:[.252,-.179,.333],46:[.12,0,.278],47:[.75,.25,.5],48:[.666,.022,.5],49:[.666,0,.5],50:[.666,0,.5],51:[.665,.022,.5],52:[.677,0,.5],53:[.666,.022,.5],54:[.666,.022,.5],55:[.676,.022,.5],56:[.666,.022,.5],57:[.666,.022,.5],58:[.43,0,.278],59:[.43,.194,.278],60:[.54,.04,.778],61:[.583,.082,.778],62:[.54,.04,.778],63:[.705,0,.472],64:[.705,.011,.778],65:[.716,0,.75],66:[.683,0,.708],67:[.705,.021,.722],68:[.683,0,.764],69:[.68,0,.681],70:[.68,0,.653],71:[.705,.022,.785],72:[.683,0,.75],73:[.683,0,.361],74:[.683,.022,.514],75:[.683,0,.778],76:[.683,0,.625],77:[.683,0,.917],78:[.683,0,.75],79:[.705,.022,.778],80:[.683,0,.681],81:[.705,.193,.778],82:[.683,.022,.736],83:[.705,.022,.556],84:[.677,0,.722],85:[.683,.022,.75],86:[.683,.022,.75],87:[.683,.022,1.028],88:[.683,0,.75],89:[.683,0,.75],90:[.683,0,.611],91:[.75,.25,.278],92:[.75,.25,.5],93:[.75,.25,.278],94:[.694,-.531,.5],95:[-.025,.062,.5],96:[.699,-.505,.5],97:[.448,.011,.5],98:[.694,.011,.556],99:[.448,.011,.444],100:[.694,.011,.556],101:[.448,.011,.444],102:[.705,0,.306,{ic:.066}],103:[.453,.206,.5],104:[.694,0,.556],105:[.669,0,.278],106:[.669,.205,.306],107:[.694,0,.528],108:[.694,0,.278],109:[.442,0,.833],110:[.442,0,.556],111:[.448,.01,.5],112:[.442,.194,.556],113:[.442,.194,.528],114:[.442,0,.392],115:[.448,.011,.394],116:[.615,.01,.389],117:[.442,.011,.556],118:[.431,.011,.528],119:[.431,.011,.722],120:[.431,0,.528],121:[.431,.204,.528],122:[.431,0,.444],123:[.75,.25,.5],124:[.75,.249,.278],125:[.75,.25,.5],126:[.318,-.215,.5],160:[0,0,.25],163:[.714,.011,.769],165:[.683,0,.75],168:[.669,-.554,.5],172:[.356,-.089,.667],174:[.709,.175,.947],175:[.59,-.544,.5],176:[.715,-.542,.5],177:[.666,0,.778],180:[.699,-.505,.5],183:[.31,-.19,.278],215:[.491,-.009,.778],240:[.749,.021,.556],247:[.537,.036,.778],305:[.442,0,.278,{sk:.0278}],567:[.442,.205,.306,{sk:.0833}],697:[.56,-.043,.275],710:[.694,-.531,.5],711:[.644,-.513,.5],713:[.59,-.544,.5],714:[.699,-.505,.5],715:[.699,-.505,.5],728:[.694,-.515,.5],729:[.669,-.549,.5],730:[.715,-.542,.5],732:[.668,-.565,.5],768:[.699,-.505,0],769:[.699,-.505,0],770:[.694,-.531,0],771:[.668,-.565,0],772:[.59,-.544,0],774:[.694,-.515,0],775:[.669,-.549,0],776:[.669,-.554,0],778:[.715,-.542,0],779:[.701,-.51,0],780:[.644,-.513,0],824:[.716,.215,0],913:[.716,0,.75],914:[.683,0,.708],915:[.68,0,.625],916:[.716,0,.833],917:[.68,0,.681],918:[.683,0,.611],919:[.683,0,.75],920:[.705,.022,.778],921:[.683,0,.361],922:[.683,0,.778],923:[.716,0,.694],924:[.683,0,.917],925:[.683,0,.75],926:[.677,0,.667],927:[.705,.022,.778],928:[.68,0,.75],929:[.683,0,.681],931:[.683,0,.722],932:[.677,0,.722],933:[.705,0,.778],934:[.683,0,.722],935:[.683,0,.75],936:[.683,0,.778],937:[.704,0,.722],8192:[0,0,.5],8193:[0,0,1],8194:[0,0,.5],8195:[0,0,1],8196:[0,0,.333],8197:[0,0,.25],8198:[0,0,.167],8201:[0,0,.167],8202:[0,0,.1],8203:[0,0,0],8204:[0,0,0],8211:[.285,-.248,.5],8212:[.285,-.248,1],8213:[.285,-.248,1],8214:[.75,.25,.5],8215:[-.025,.062,.5],8216:[.694,-.379,.278],8217:[.694,-.379,.278],8220:[.694,-.379,.5],8221:[.694,-.379,.5],8224:[.705,.216,.444],8225:[.705,.205,.444],8226:[.444,-.055,.5],8230:[.12,0,1.172],8242:[.56,-.043,.275],8243:[.56,0,.55],8244:[.56,0,.825],8245:[.56,-.043,.275],8246:[.56,0,.55],8247:[.56,0,.825],8254:[.59,-.544,.5],8260:[.75,.25,.5],8279:[.56,0,1.1],8288:[0,0,0],8289:[0,0,0],8290:[0,0,0],8291:[0,0,0],8292:[0,0,0],8407:[.714,-.516,.5],8450:[.702,.019,.722],8459:[.717,.036,.969,{ic:.272,sk:.333}],8460:[.666,.133,.72],8461:[.683,0,.778],8462:[.694,.011,.576,{sk:-.0278}],8463:[.695,.013,.54,{ic:.022}],8464:[.717,.017,.809,{ic:.137,sk:.333}],8465:[.686,.026,.554],8466:[.717,.017,.874,{ic:.161,sk:.306}],8467:[.705,.02,.417,{sk:.111}],8469:[.683,.02,.722],8472:[.453,.216,.636,{sk:.111}],8473:[.683,0,.611],8474:[.701,.181,.778],8475:[.717,.017,.85,{ic:.037,sk:.194}],8476:[.686,.026,.828],8477:[.683,0,.722],8484:[.683,0,.667],8486:[.704,0,.722],8487:[.684,.022,.722],8488:[.729,.139,.602],8492:[.708,.028,.908,{ic:.02,sk:.194}],8493:[.685,.024,.613],8496:[.707,.008,.562,{ic:.156,sk:.139}],8497:[.735,.036,.895,{ic:.095,sk:.222}],8498:[.695,0,.556],8499:[.721,.05,1.08,{ic:.136,sk:.444}],8501:[.694,0,.611],8502:[.763,.021,.667,{ic:.02}],8503:[.764,.043,.444],8504:[.764,.043,.667],8513:[.705,.023,.639],8592:[.511,.011,1],8593:[.694,.193,.5],8594:[.511,.011,1],8595:[.694,.194,.5],8596:[.511,.011,1],8597:[.772,.272,.5],8598:[.72,.195,1],8599:[.72,.195,1],8600:[.695,.22,1],8601:[.695,.22,1],8602:[.437,-.06,1],8603:[.437,-.06,1],8606:[.417,-.083,1],8608:[.417,-.083,1],8610:[.417,-.083,1.111],8611:[.417,-.083,1.111],8614:[.511,.011,1],8617:[.511,.011,1.126],8618:[.511,.011,1.126],8619:[.575,.041,1],8620:[.575,.041,1],8621:[.417,-.083,1.389],8622:[.437,-.06,1],8624:[.722,0,.5],8625:[.722,0,.5],8630:[.461,0,1],8631:[.46,0,1],8634:[.65,.083,.778],8635:[.65,.083,.778],8636:[.511,-.23,1],8637:[.27,.011,1],8638:[.694,.194,.417],8639:[.694,.194,.417],8640:[.511,-.23,1],8641:[.27,.011,1],8642:[.694,.194,.417],8643:[.694,.194,.417],8644:[.667,0,1],8646:[.667,0,1],8647:[.583,.083,1],8648:[.694,.193,.833],8649:[.583,.083,1],8650:[.694,.194,.833],8651:[.514,.014,1],8652:[.671,.011,1],8653:[.534,.035,1],8654:[.534,.037,1],8655:[.534,.035,1],8656:[.525,.024,1],8657:[.694,.194,.611],8658:[.525,.024,1],8659:[.694,.194,.611],8660:[.526,.025,1],8661:[.772,.272,.611],8666:[.611,.111,1],8667:[.611,.111,1],8669:[.417,-.083,1],8672:[.437,-.064,1.334],8674:[.437,-.064,1.334],8704:[.694,.022,.556],8705:[.846,.021,.5],8706:[.715,.022,.531,{ic:.035,sk:.0833}],8707:[.694,0,.556],8708:[.716,.215,.556],8709:[.772,.078,.5],8710:[.716,0,.833],8711:[.683,.033,.833],8712:[.54,.04,.667],8713:[.716,.215,.667],8715:[.54,.04,.667],8716:[.716,.215,.667],8717:[.44,0,.429,{ic:.027}],8719:[.75,.25,.944],8720:[.75,.25,.944],8721:[.75,.25,1.056],8722:[.583,.082,.778],8723:[.5,.166,.778],8724:[.766,.093,.778],8725:[.75,.25,.5],8726:[.75,.25,.5],8727:[.465,-.035,.5],8728:[.444,-.055,.5],8729:[.444,-.055,.5],8730:[.8,.2,.833,{ic:.02}],8733:[.442,.011,.778],8734:[.442,.011,1],8736:[.694,0,.722],8737:[.714,.02,.722],8738:[.551,.051,.722],8739:[.75,.249,.278],8740:[.75,.252,.278,{ic:.019}],8741:[.75,.25,.5],8742:[.75,.25,.5,{ic:.018}],8743:[.598,.022,.667],8744:[.598,.022,.667],8745:[.598,.022,.667],8746:[.598,.022,.667],8747:[.716,.216,.417,{ic:.055}],8748:[.805,.306,.819,{ic:.138}],8749:[.805,.306,1.166,{ic:.138}],8750:[.805,.306,.472,{ic:.138}],8756:[.471,.082,.667],8757:[.471,.082,.667],8764:[.367,-.133,.778],8765:[.367,-.133,.778],8768:[.583,.083,.278],8769:[.467,-.032,.778],8770:[.463,-.034,.778],8771:[.464,-.036,.778],8772:[.716,.215,.778],8773:[.589,-.022,.778],8775:[.652,.155,.778],8776:[.483,-.055,.778],8777:[.716,.215,.778],8778:[.579,.039,.778],8781:[.484,-.016,.778],8782:[.492,-.008,.778],8783:[.492,-.133,.778],8784:[.67,-.133,.778],8785:[.609,.108,.778],8786:[.601,.101,.778],8787:[.601,.102,.778],8790:[.367,-.133,.778],8791:[.721,-.133,.778],8796:[.859,-.133,.778],8800:[.716,.215,.778],8801:[.464,-.036,.778],8802:[.716,.215,.778],8804:[.636,.138,.778],8805:[.636,.138,.778],8806:[.753,.175,.778],8807:[.753,.175,.778],8808:[.752,.286,.778],8809:[.752,.286,.778],8810:[.568,.067,1],8811:[.567,.067,1],8812:[.75,.25,.5],8813:[.716,.215,.778],8814:[.708,.209,.778],8815:[.708,.209,.778],8816:[.801,.303,.778],8817:[.801,.303,.778],8818:[.732,.228,.778],8819:[.732,.228,.778],8820:[.732,.228,.778],8821:[.732,.228,.778],8822:[.681,.253,.778],8823:[.681,.253,.778],8824:[.716,.253,.778],8825:[.716,.253,.778],8826:[.539,.041,.778],8827:[.539,.041,.778],8828:[.58,.153,.778],8829:[.58,.154,.778],8830:[.732,.228,.778],8831:[.732,.228,.778],8832:[.705,.208,.778],8833:[.705,.208,.778],8834:[.54,.04,.778],8835:[.54,.04,.778],8836:[.716,.215,.778],8837:[.716,.215,.778],8838:[.636,.138,.778],8839:[.636,.138,.778],8840:[.801,.303,.778],8841:[.801,.303,.778],8842:[.635,.241,.778],8843:[.635,.241,.778],8846:[.598,.022,.667],8847:[.539,.041,.778],8848:[.539,.041,.778],8849:[.636,.138,.778],8850:[.636,.138,.778],8851:[.598,0,.667],8852:[.598,0,.667],8853:[.583,.083,.778],8854:[.583,.083,.778],8855:[.583,.083,.778],8856:[.583,.083,.778],8857:[.583,.083,.778],8858:[.582,.082,.778],8859:[.582,.082,.778],8861:[.582,.082,.778],8862:[.689,0,.778],8863:[.689,0,.778],8864:[.689,0,.778],8865:[.689,0,.778],8866:[.694,0,.611],8867:[.694,0,.611],8868:[.668,0,.778],8869:[.668,0,.778],8872:[.75,.249,.867],8873:[.694,0,.722],8874:[.694,0,.889],8876:[.695,0,.611],8877:[.695,0,.611],8878:[.695,0,.722],8879:[.695,0,.722],8882:[.539,.041,.778],8883:[.539,.041,.778],8884:[.636,.138,.778],8885:[.636,.138,.778],8888:[.408,-.092,1.111],8890:[.431,.212,.556],8891:[.716,0,.611],8892:[.716,0,.611],8896:[.75,.249,.833],8897:[.75,.249,.833],8898:[.75,.249,.833],8899:[.75,.249,.833],8900:[.488,-.012,.5],8901:[.31,-.19,.278],8902:[.486,-.016,.5],8903:[.545,.044,.778],8904:[.505,.005,.9],8905:[.492,-.008,.778],8906:[.492,-.008,.778],8907:[.694,.022,.778],8908:[.694,.022,.778],8909:[.464,-.036,.778],8910:[.578,.021,.76],8911:[.578,.022,.76],8912:[.54,.04,.778],8913:[.54,.04,.778],8914:[.598,.022,.667],8915:[.598,.022,.667],8916:[.736,.022,.667],8918:[.541,.041,.778],8919:[.541,.041,.778],8920:[.568,.067,1.333],8921:[.568,.067,1.333],8922:[.886,.386,.778],8923:[.886,.386,.778],8926:[.734,0,.778],8927:[.734,0,.778],8928:[.801,.303,.778],8929:[.801,.303,.778],8930:[.716,.215,.778],8931:[.716,.215,.778],8934:[.73,.359,.778],8935:[.73,.359,.778],8936:[.73,.359,.778],8937:[.73,.359,.778],8938:[.706,.208,.778],8939:[.706,.208,.778],8940:[.802,.303,.778],8941:[.801,.303,.778],8942:[1.3,.03,.278],8943:[.31,-.19,1.172],8945:[1.52,-.1,1.282],8965:[.716,0,.611],8966:[.813,.097,.611],8968:[.75,.25,.444],8969:[.75,.25,.444],8970:[.75,.25,.444],8971:[.75,.25,.444],8988:[.694,-.306,.5],8989:[.694,-.306,.5],8990:[.366,.022,.5],8991:[.366,.022,.5],8994:[.388,-.122,1],8995:[.378,-.134,1],9001:[.75,.25,.389],9002:[.75,.25,.389],9136:[.744,.244,.412],9137:[.744,.244,.412],9168:[.602,0,.667],9416:[.709,.175,.902],9484:[.694,-.306,.5],9488:[.694,-.306,.5],9492:[.366,.022,.5],9496:[.366,.022,.5],9585:[.694,.195,.889],9586:[.694,.195,.889],9632:[.689,0,.778],9633:[.689,0,.778],9642:[.689,0,.778],9650:[.575,.02,.722],9651:[.716,0,.889],9652:[.575,.02,.722],9653:[.716,0,.889],9654:[.539,.041,.778],9656:[.539,.041,.778],9657:[.505,.005,.5],9660:[.576,.019,.722],9661:[.5,.215,.889],9662:[.576,.019,.722],9663:[.5,.215,.889],9664:[.539,.041,.778],9666:[.539,.041,.778],9667:[.505,.005,.5],9674:[.716,.132,.667],9711:[.715,.215,1],9723:[.689,0,.778],9724:[.689,0,.778],9733:[.694,.111,.944],9824:[.727,.13,.778],9825:[.716,.033,.778],9826:[.727,.162,.778],9827:[.726,.13,.778],9837:[.75,.022,.389],9838:[.734,.223,.389],9839:[.723,.223,.389],10003:[.706,.034,.833],10016:[.716,.022,.833],10072:[.75,.249,.278],10216:[.75,.25,.389],10217:[.75,.25,.389],10222:[.744,.244,.412],10223:[.744,.244,.412],10229:[.511,.011,1.609],10230:[.511,.011,1.638],10231:[.511,.011,1.859],10232:[.525,.024,1.609],10233:[.525,.024,1.638],10234:[.525,.024,1.858],10236:[.511,.011,1.638],10731:[.716,.132,.667],10744:[.716,.215,.778],10752:[.75,.25,1.111],10753:[.75,.25,1.111],10754:[.75,.25,1.111],10756:[.75,.249,.833],10758:[.75,.249,.833],10764:[.805,.306,1.638,{ic:.138}],10799:[.491,-.009,.778],10815:[.683,0,.75],10846:[.813,.097,.611],10877:[.636,.138,.778],10878:[.636,.138,.778],10885:[.762,.29,.778],10886:[.762,.29,.778],10887:[.635,.241,.778],10888:[.635,.241,.778],10889:[.761,.387,.778],10890:[.761,.387,.778],10891:[1.003,.463,.778],10892:[1.003,.463,.778],10901:[.636,.138,.778],10902:[.636,.138,.778],10927:[.636,.138,.778],10928:[.636,.138,.778],10933:[.752,.286,.778],10934:[.752,.286,.778],10935:[.761,.294,.778],10936:[.761,.294,.778],10937:[.761,.337,.778],10938:[.761,.337,.778],10949:[.753,.215,.778],10950:[.753,.215,.778],10955:[.783,.385,.778],10956:[.783,.385,.778],12296:[.75,.25,.389],12297:[.75,.25,.389],57350:[.43,.023,.222,{ic:.018}],57351:[.431,.024,.389,{ic:.018}],57352:[.605,.085,.778],57353:[.434,.006,.667,{ic:.067}],57356:[.752,.284,.778],57357:[.752,.284,.778],57358:[.919,.421,.778],57359:[.801,.303,.778],57360:[.801,.303,.778],57361:[.919,.421,.778],57366:[.828,.33,.778],57367:[.752,.332,.778],57368:[.828,.33,.778],57369:[.752,.333,.778],57370:[.634,.255,.778],57371:[.634,.254,.778],119808:[.698,0,.869],119809:[.686,0,.818],119810:[.697,.011,.831],119811:[.686,0,.882],119812:[.68,0,.756],119813:[.68,0,.724],119814:[.697,.01,.904],119815:[.686,0,.9],119816:[.686,0,.436],119817:[.686,.011,.594],119818:[.686,0,.901],119819:[.686,0,.692],119820:[.686,0,1.092],119821:[.686,0,.9],119822:[.696,.01,.864],119823:[.686,0,.786],119824:[.696,.193,.864],119825:[.686,.011,.862],119826:[.697,.011,.639],119827:[.675,0,.8],119828:[.686,.011,.885],119829:[.686,.007,.869],119830:[.686,.007,1.189],119831:[.686,0,.869],119832:[.686,0,.869],119833:[.686,0,.703],119834:[.453,.006,.559],119835:[.694,.006,.639],119836:[.453,.006,.511],119837:[.694,.006,.639],119838:[.452,.006,.527],119839:[.7,0,.351,{ic:.101}],119840:[.455,.201,.575],119841:[.694,0,.639],119842:[.695,0,.319],119843:[.695,.2,.351],119844:[.694,0,.607],119845:[.694,0,.319],119846:[.45,0,.958],119847:[.45,0,.639],119848:[.452,.005,.575],119849:[.45,.194,.639],119850:[.45,.194,.607],119851:[.45,0,.474],119852:[.453,.006,.454],119853:[.635,.005,.447],119854:[.45,.006,.639],119855:[.444,0,.607],119856:[.444,0,.831],119857:[.444,0,.607],119858:[.444,.2,.607],119859:[.444,0,.511],119860:[.716,0,.75,{sk:.139}],119861:[.683,0,.759,{sk:.0833}],119862:[.705,.022,.715,{ic:.045,sk:.0833}],119863:[.683,0,.828,{sk:.0556}],119864:[.68,0,.738,{ic:.026,sk:.0833}],119865:[.68,0,.643,{ic:.106,sk:.0833}],119866:[.705,.022,.786,{sk:.0833}],119867:[.683,0,.831,{ic:.057,sk:.0556}],119868:[.683,0,.44,{ic:.064,sk:.111}],119869:[.683,.022,.555,{ic:.078,sk:.167}],119870:[.683,0,.849,{ic:.04,sk:.0556}],119871:[.683,0,.681,{sk:.0278}],119872:[.683,0,.97,{ic:.081,sk:.0833}],119873:[.683,0,.803,{ic:.085,sk:.0833}],119874:[.704,.022,.763,{sk:.0833}],119875:[.683,0,.642,{ic:.109,sk:.0833}],119876:[.704,.194,.791,{sk:.0833}],119877:[.683,.021,.759,{sk:.0833}],119878:[.705,.022,.613,{ic:.032,sk:.0833}],119879:[.677,0,.584,{ic:.12,sk:.0833}],119880:[.683,.022,.683,{ic:.084,sk:.0278}],119881:[.683,.022,.583,{ic:.186}],119882:[.683,.022,.944,{ic:.104}],119883:[.683,0,.828,{ic:.024,sk:.0833}],119884:[.683,0,.581,{ic:.182}],119885:[.683,0,.683,{ic:.04,sk:.0833}],119886:[.441,.01,.529],119887:[.694,.011,.429],119888:[.442,.011,.433,{sk:.0556}],119889:[.694,.01,.52,{sk:.167}],119890:[.442,.011,.466,{sk:.0556}],119891:[.705,.205,.49,{ic:.06,sk:.167}],119892:[.442,.205,.477,{sk:.0278}],119894:[.661,.011,.345],119895:[.661,.204,.412],119896:[.694,.011,.521],119897:[.694,.011,.298,{sk:.0833}],119898:[.442,.011,.878],119899:[.442,.011,.6],119900:[.441,.011,.485,{sk:.0556}],119901:[.442,.194,.503,{sk:.0833}],119902:[.442,.194,.446,{ic:.014,sk:.0833}],119903:[.442,.011,.451,{sk:.0556}],119904:[.442,.01,.469,{sk:.0556}],119905:[.626,.011,.361,{sk:.0833}],119906:[.442,.011,.572,{sk:.0278}],119907:[.443,.011,.485,{sk:.0278}],119908:[.443,.011,.716,{sk:.0833}],119909:[.442,.011,.572,{sk:.0278}],119910:[.442,.205,.49,{sk:.0556}],119911:[.442,.011,.465,{sk:.0556}],119912:[.711,0,.869,{sk:.16}],119913:[.686,0,.866,{sk:.0958}],119914:[.703,.017,.817,{ic:.038,sk:.0958}],119915:[.686,0,.938,{sk:.0639}],119916:[.68,0,.81,{ic:.015,sk:.0958}],119917:[.68,0,.689,{ic:.12,sk:.0958}],119918:[.703,.016,.887,{sk:.0958}],119919:[.686,0,.982,{ic:.045,sk:.0639}],119920:[.686,0,.511,{ic:.062,sk:.128}],119921:[.686,.017,.631,{ic:.063,sk:.192}],119922:[.686,0,.971,{ic:.032,sk:.0639}],119923:[.686,0,.756,{sk:.0319}],119924:[.686,0,1.142,{ic:.077,sk:.0958}],119925:[.686,0,.95,{ic:.077,sk:.0958}],119926:[.703,.017,.837,{sk:.0958}],119927:[.686,0,.723,{ic:.124,sk:.0958}],119928:[.703,.194,.869,{sk:.0958}],119929:[.686,.017,.872,{sk:.0958}],119930:[.703,.017,.693,{ic:.021,sk:.0958}],119931:[.675,0,.637,{ic:.135,sk:.0958}],119932:[.686,.016,.8,{ic:.077,sk:.0319}],119933:[.686,.016,.678,{ic:.208}],119934:[.686,.017,1.093,{ic:.114}],119935:[.686,0,.947,{sk:.0958}],119936:[.686,0,.675,{ic:.201}],119937:[.686,0,.773,{ic:.032,sk:.0958}],119938:[.452,.008,.633],119939:[.694,.008,.521],119940:[.451,.008,.513,{sk:.0639}],119941:[.694,.008,.61,{sk:.192}],119942:[.452,.008,.554,{sk:.0639}],119943:[.701,.201,.568,{ic:.056,sk:.192}],119944:[.452,.202,.545,{sk:.0319}],119945:[.694,.008,.668,{sk:-.0319}],119946:[.694,.008,.405],119947:[.694,.202,.471],119948:[.694,.008,.604],119949:[.694,.008,.348,{sk:.0958}],119950:[.452,.008,1.032],119951:[.452,.008,.713],119952:[.452,.008,.585,{sk:.0639}],119953:[.452,.194,.601,{sk:.0958}],119954:[.452,.194,.542,{sk:.0958}],119955:[.452,.008,.529,{sk:.0639}],119956:[.451,.008,.531,{sk:.0639}],119957:[.643,.007,.415,{sk:.0958}],119958:[.452,.008,.681,{sk:.0319}],119959:[.453,.008,.567,{sk:.0319}],119960:[.453,.008,.831,{sk:.0958}],119961:[.452,.008,.659,{sk:.0319}],119962:[.452,.202,.59,{sk:.0639}],119963:[.452,.008,.555,{sk:.0639}],119964:[.717,.008,.803,{ic:.213,sk:.389}],119966:[.728,.026,.666,{ic:.153,sk:.278}],119967:[.708,.031,.774,{ic:.081,sk:.111}],119970:[.717,.037,.61,{ic:.128,sk:.25}],119973:[.717,.314,1.052,{ic:.081,sk:.417}],119974:[.717,.037,.914,{ic:.29,sk:.361}],119977:[.726,.036,.902,{ic:.306,sk:.389}],119978:[.707,.008,.738,{ic:.067,sk:.167}],119979:[.716,.037,1.013,{ic:.018,sk:.222}],119980:[.717,.017,.883,{sk:.278}],119982:[.708,.036,.868,{ic:.148,sk:.333}],119983:[.735,.037,.747,{ic:.249,sk:.222}],119984:[.717,.017,.8,{ic:.16,sk:.25}],119985:[.717,.017,.622,{ic:.228,sk:.222}],119986:[.717,.017,.805,{ic:.221,sk:.25}],119987:[.717,.017,.944,{ic:.187,sk:.278}],119988:[.716,.017,.71,{ic:.249,sk:.194}],119989:[.717,.016,.821,{ic:.211,sk:.306}],120068:[.696,.026,.718],120069:[.691,.027,.884],120071:[.685,.027,.832],120072:[.685,.024,.663],120073:[.686,.153,.611],120074:[.69,.026,.785],120077:[.686,.139,.552],120078:[.68,.027,.668,{ic:.014}],120079:[.686,.026,.666],120080:[.692,.027,1.05],120081:[.686,.025,.832],120082:[.729,.027,.827],120083:[.692,.218,.828],120084:[.729,.069,.827],120086:[.692,.027,.829],120087:[.701,.027,.669],120088:[.697,.027,.646,{ic:.019}],120089:[.686,.026,.831],120090:[.686,.027,1.046],120091:[.688,.027,.719],120092:[.686,.218,.833],120094:[.47,.035,.5],120095:[.685,.031,.513],120096:[.466,.029,.389],120097:[.609,.033,.499],120098:[.467,.03,.401],120099:[.681,.221,.326],120100:[.47,.209,.504],120101:[.688,.205,.521],120102:[.673,.02,.279],120103:[.672,.208,.281],120104:[.689,.025,.389],120105:[.685,.02,.28],120106:[.475,.026,.767],120107:[.475,.022,.527],120108:[.48,.028,.489],120109:[.541,.212,.5],120110:[.479,.219,.489],120111:[.474,.021,.389],120112:[.478,.029,.443],120113:[.64,.02,.333,{ic:.015}],120114:[.474,.023,.517],120115:[.53,.028,.512],120116:[.532,.028,.774],120117:[.472,.188,.389],120118:[.528,.218,.499],120119:[.471,.214,.391],120120:[.701,0,.722],120121:[.683,0,.667],120123:[.683,0,.722],120124:[.683,0,.667],120125:[.683,0,.611],120126:[.702,.019,.778],120128:[.683,0,.389],120129:[.683,.077,.5],120130:[.683,0,.778],120131:[.683,0,.667],120132:[.683,0,.944],120134:[.701,.019,.778],120138:[.702,.012,.556],120139:[.683,0,.667],120140:[.683,.019,.722],120141:[.683,.02,.722],120142:[.683,.019,1],120143:[.683,0,.722],120144:[.683,0,.722],120172:[.686,.031,.847],120173:[.684,.031,1.044],120174:[.676,.032,.723],120175:[.683,.029,.982],120176:[.686,.029,.783],120177:[.684,.146,.722],120178:[.687,.029,.927],120179:[.683,.126,.851],120180:[.681,.025,.655],120181:[.68,.141,.652],120182:[.681,.026,.789,{ic:.017}],120183:[.683,.028,.786],120184:[.683,.032,1.239],120185:[.679,.03,.983],120186:[.726,.03,.976],120187:[.688,.223,.977],120188:[.726,.083,.976],120189:[.688,.028,.978],120190:[.685,.031,.978],120191:[.686,.03,.79,{ic:.012}],120192:[.688,.039,.851,{ic:.02}],120193:[.685,.029,.982],120194:[.683,.03,1.235],120195:[.681,.035,.849],120196:[.688,.214,.984],120197:[.677,.148,.711],120198:[.472,.032,.603],120199:[.69,.032,.59],120200:[.473,.026,.464],120201:[.632,.028,.589],120202:[.471,.027,.472],120203:[.687,.222,.388],120204:[.472,.208,.595],120205:[.687,.207,.615],120206:[.686,.025,.331],120207:[.682,.203,.332],120208:[.682,.025,.464],120209:[.681,.024,.337],120210:[.476,.031,.921],120211:[.473,.028,.654],120212:[.482,.034,.609],120213:[.557,.207,.604],120214:[.485,.211,.596],120215:[.472,.026,.46],120216:[.479,.034,.523],120217:[.648,.027,.393,{ic:.014}],120218:[.472,.032,.589,{ic:.014}],120219:[.546,.027,.604],120220:[.549,.032,.918],120221:[.471,.188,.459],120222:[.557,.221,.589],120223:[.471,.214,.461],120224:[.694,0,.667],120225:[.694,0,.667],120226:[.705,.011,.639],120227:[.694,0,.722],120228:[.691,0,.597],120229:[.691,0,.569],120230:[.704,.011,.667],120231:[.694,0,.708],120232:[.694,0,.278],120233:[.694,.022,.472],120234:[.694,0,.694],120235:[.694,0,.542],120236:[.694,0,.875],120237:[.694,0,.708],120238:[.715,.022,.736],120239:[.694,0,.639],120240:[.715,.125,.736],120241:[.694,0,.646],120242:[.716,.022,.556],120243:[.688,0,.681],120244:[.694,.022,.688],120245:[.694,0,.667],120246:[.694,0,.944],120247:[.694,0,.667],120248:[.694,0,.667],120249:[.694,0,.611],120250:[.46,.01,.481],120251:[.694,.011,.517],120252:[.46,.01,.444],120253:[.694,.01,.517],120254:[.461,.01,.444],120255:[.705,0,.306,{ic:.041}],120256:[.455,.206,.5],120257:[.694,0,.517],120258:[.68,0,.239],120259:[.68,.205,.267],120260:[.694,0,.489],120261:[.694,0,.239],120262:[.455,0,.794],120263:[.455,0,.517],120264:[.46,.01,.5],120265:[.455,.194,.517],120266:[.455,.194,.517],120267:[.455,0,.342],120268:[.46,.01,.383],120269:[.571,.01,.361],120270:[.444,.01,.517],120271:[.444,0,.461],120272:[.444,0,.683],120273:[.444,0,.461],120274:[.444,.204,.461],120275:[.444,0,.435],120276:[.694,0,.733],120277:[.694,0,.733],120278:[.704,.011,.703],120279:[.694,0,.794],120280:[.691,0,.642],120281:[.691,0,.611],120282:[.705,.011,.733],120283:[.694,0,.794],120284:[.694,0,.331],120285:[.694,.022,.519],120286:[.694,0,.764],120287:[.694,0,.581],120288:[.694,0,.978],120289:[.694,0,.794],120290:[.716,.022,.794],120291:[.694,0,.703],120292:[.716,.106,.794],120293:[.694,0,.703],120294:[.716,.022,.611],120295:[.688,0,.733],120296:[.694,.022,.764],120297:[.694,0,.733],120298:[.694,0,1.039],120299:[.694,0,.733],120300:[.694,0,.733],120301:[.694,0,.672],120302:[.475,.011,.525],120303:[.694,.01,.561],120304:[.475,.011,.489],120305:[.694,.011,.561],120306:[.474,.01,.511],120307:[.705,0,.336,{ic:.045}],120308:[.469,.206,.55],120309:[.694,0,.561],120310:[.695,0,.256],120311:[.695,.205,.286],120312:[.694,0,.531],120313:[.694,0,.256],120314:[.469,0,.867],120315:[.468,0,.561],120316:[.474,.011,.55],120317:[.469,.194,.561],120318:[.469,.194,.561],120319:[.469,0,.372],120320:[.474,.01,.422],120321:[.589,.01,.404],120322:[.458,.011,.561],120323:[.458,0,.5],120324:[.458,0,.744],120325:[.458,0,.5],120326:[.458,.205,.5],120327:[.458,0,.476],120328:[.694,0,.667],120329:[.694,0,.667,{ic:.029}],120330:[.705,.01,.639,{ic:.08}],120331:[.694,0,.722,{ic:.025}],120332:[.691,0,.597,{ic:.091}],120333:[.691,0,.569,{ic:.104}],120334:[.705,.011,.667,{ic:.063}],120335:[.694,0,.708,{ic:.06}],120336:[.694,0,.278,{ic:.06}],120337:[.694,.022,.472,{ic:.063}],120338:[.694,0,.694,{ic:.091}],120339:[.694,0,.542],120340:[.694,0,.875,{ic:.054}],120341:[.694,0,.708,{ic:.058}],120342:[.716,.022,.736,{ic:.027}],120343:[.694,0,.639,{ic:.051}],120344:[.716,.125,.736,{ic:.027}],120345:[.694,0,.646,{ic:.052}],120346:[.716,.022,.556,{ic:.053}],120347:[.688,0,.681,{ic:.109}],120348:[.694,.022,.688,{ic:.059}],120349:[.694,0,.667,{ic:.132}],120350:[.694,0,.944,{ic:.132}],120351:[.694,0,.667,{ic:.091}],120352:[.694,0,.667,{ic:.143}],120353:[.694,0,.611,{ic:.091}],120354:[.461,.01,.481],120355:[.694,.011,.517,{ic:.022}],120356:[.46,.011,.444,{ic:.055}],120357:[.694,.01,.517,{ic:.071}],120358:[.46,.011,.444,{ic:.028}],120359:[.705,0,.306,{ic:.188}],120360:[.455,.206,.5,{ic:.068}],120361:[.694,0,.517],120362:[.68,0,.239,{ic:.076}],120363:[.68,.204,.267,{ic:.069}],120364:[.694,0,.489,{ic:.054}],120365:[.694,0,.239,{ic:.072}],120366:[.455,0,.794],120367:[.454,0,.517],120368:[.461,.011,.5,{ic:.023}],120369:[.455,.194,.517,{ic:.021}],120370:[.455,.194,.517,{ic:.021}],120371:[.455,0,.342,{ic:.082}],120372:[.461,.011,.383,{ic:.053}],120373:[.571,.011,.361,{ic:.049}],120374:[.444,.01,.517,{ic:.02}],120375:[.444,0,.461,{ic:.079}],120376:[.444,0,.683,{ic:.079}],120377:[.444,0,.461,{ic:.076}],120378:[.444,.205,.461,{ic:.079}],120379:[.444,0,.435,{ic:.059}],120432:[.623,0,.525],120433:[.611,0,.525],120434:[.622,.011,.525],120435:[.611,0,.525],120436:[.611,0,.525],120437:[.611,0,.525],120438:[.622,.011,.525],120439:[.611,0,.525],120440:[.611,0,.525],120441:[.611,.011,.525],120442:[.611,0,.525],120443:[.611,0,.525],120444:[.611,0,.525],120445:[.611,0,.525],120446:[.621,.01,.525],120447:[.611,0,.525],120448:[.621,.138,.525],120449:[.611,.011,.525],120450:[.622,.011,.525],120451:[.611,0,.525],120452:[.611,.011,.525],120453:[.611,.007,.525],120454:[.611,.007,.525],120455:[.611,0,.525],120456:[.611,0,.525],120457:[.611,0,.525],120458:[.439,.006,.525],120459:[.611,.006,.525],120460:[.44,.006,.525],120461:[.611,.006,.525],120462:[.44,.006,.525],120463:[.617,0,.525],120464:[.442,.229,.525],120465:[.611,0,.525],120466:[.612,0,.525],120467:[.612,.228,.525],120468:[.611,0,.525],120469:[.611,0,.525],120470:[.436,0,.525,{ic:.011}],120471:[.436,0,.525],120472:[.44,.006,.525],120473:[.437,.221,.525],120474:[.437,.221,.525,{ic:.02}],120475:[.437,0,.525],120476:[.44,.006,.525],120477:[.554,.006,.525],120478:[.431,.005,.525],120479:[.431,0,.525],120480:[.431,0,.525],120481:[.431,0,.525],120482:[.431,.228,.525],120483:[.431,0,.525],120488:[.698,0,.869],120489:[.686,0,.818],120490:[.68,0,.692],120491:[.698,0,.958],120492:[.68,0,.756],120493:[.686,0,.703],120494:[.686,0,.9],120495:[.696,.01,.894],120496:[.686,0,.436],120497:[.686,0,.901],120498:[.698,0,.806],120499:[.686,0,1.092],120500:[.686,0,.9],120501:[.675,0,.767],120502:[.696,.01,.864],120503:[.68,0,.9],120504:[.686,0,.786],120506:[.686,0,.831],120507:[.675,0,.8],120508:[.697,0,.894],120509:[.686,0,.831],120510:[.686,0,.869],120511:[.686,0,.894],120512:[.696,0,.831],120513:[.686,.024,.958],120546:[.716,0,.75,{sk:.139}],120547:[.683,0,.759,{sk:.0833}],120548:[.68,0,.615,{ic:.106,sk:.0833}],120549:[.716,0,.833,{sk:.167}],120550:[.68,0,.738,{ic:.026,sk:.0833}],120551:[.683,0,.683,{ic:.04,sk:.0833}],120552:[.683,0,.831,{ic:.057,sk:.0556}],120553:[.704,.022,.763,{sk:.0833}],120554:[.683,0,.44,{ic:.064,sk:.111}],120555:[.683,0,.849,{ic:.04,sk:.0556}],120556:[.716,0,.694,{sk:.167}],120557:[.683,0,.97,{ic:.081,sk:.0833}],120558:[.683,0,.803,{ic:.085,sk:.0833}],120559:[.677,0,.742,{ic:.035,sk:.0833}],120560:[.704,.022,.763,{sk:.0833}],120561:[.68,0,.831,{ic:.056,sk:.0556}],120562:[.683,0,.642,{ic:.109,sk:.0833}],120564:[.683,0,.78,{ic:.026,sk:.0833}],120565:[.677,0,.584,{ic:.12,sk:.0833}],120566:[.705,0,.583,{ic:.117,sk:.0556}],120567:[.683,0,.667,{sk:.0833}],120568:[.683,0,.828,{ic:.024,sk:.0833}],120569:[.683,0,.612,{ic:.08,sk:.0556}],120570:[.704,0,.772,{ic:.014,sk:.0833}],120572:[.442,.011,.64,{sk:.0278}],120573:[.705,.194,.566,{sk:.0833}],120574:[.441,.216,.518,{ic:.025}],120575:[.717,.01,.444,{sk:.0556}],120576:[.452,.022,.466,{sk:.0833}],120577:[.704,.204,.438,{ic:.033,sk:.0833}],120578:[.442,.216,.497,{sk:.0556}],120579:[.705,.01,.469,{sk:.0833}],120580:[.442,.01,.354,{sk:.0556}],120581:[.442,.011,.576],120582:[.694,.012,.583],120583:[.442,.216,.603,{sk:.0278}],120584:[.442,0,.494,{ic:.036,sk:.0278}],120585:[.704,.205,.438,{sk:.111}],120586:[.441,.011,.485,{sk:.0556}],120587:[.431,.011,.57],120588:[.442,.216,.517,{sk:.0833}],120589:[.442,.107,.363,{ic:.042,sk:.0833}],120590:[.431,.011,.571],120591:[.431,.013,.437,{ic:.08,sk:.0278}],120592:[.443,.01,.54,{sk:.0278}],120593:[.442,.218,.654,{sk:.0833}],120594:[.442,.204,.626,{sk:.0556}],120595:[.694,.205,.651,{sk:.111}],120596:[.443,.011,.622],120597:[.715,.022,.531,{ic:.035,sk:.0833}],120598:[.431,.011,.406,{sk:.0556}],120599:[.705,.011,.591,{sk:.0833}],120600:[.434,.006,.667,{ic:.067}],120601:[.694,.205,.596,{sk:.0833}],120602:[.442,.194,.517,{sk:.0833}],120603:[.431,.01,.828],120604:[.711,0,.869,{sk:.16}],120605:[.686,0,.866,{sk:.0958}],120606:[.68,0,.657,{ic:.12,sk:.0958}],120607:[.711,0,.958,{sk:.192}],120608:[.68,0,.81,{ic:.015,sk:.0958}],120609:[.686,0,.773,{ic:.032,sk:.0958}],120610:[.686,0,.982,{ic:.045,sk:.0639}],120611:[.702,.017,.867,{sk:.0958}],120612:[.686,0,.511,{ic:.062,sk:.128}],120613:[.686,0,.971,{ic:.032,sk:.0639}],120614:[.711,0,.806,{sk:.192}],120615:[.686,0,1.142,{ic:.077,sk:.0958}],120616:[.686,0,.95,{ic:.077,sk:.0958}],120617:[.675,0,.841,{ic:.026,sk:.0958}],120618:[.703,.017,.837,{sk:.0958}],120619:[.68,0,.982,{ic:.044,sk:.0639}],120620:[.686,0,.723,{ic:.124,sk:.0958}],120622:[.686,0,.885,{ic:.017,sk:.0958}],120623:[.675,0,.637,{ic:.135,sk:.0958}],120624:[.703,0,.671,{ic:.131,sk:.0639}],120625:[.686,0,.767,{sk:.0958}],120626:[.686,0,.947,{sk:.0958}],120627:[.686,0,.714,{ic:.076,sk:.0639}],120628:[.703,0,.879,{sk:.0958}],120630:[.452,.008,.761,{sk:.0319}],120631:[.701,.194,.66,{sk:.0958}],120632:[.451,.211,.59,{ic:.027}],120633:[.725,.008,.522,{sk:.0639}],120634:[.461,.017,.529,{sk:.0958}],120635:[.711,.202,.508,{ic:.013,sk:.0958}],120636:[.452,.211,.6,{sk:.0639}],120637:[.702,.008,.562,{sk:.0958}],120638:[.452,.008,.412,{sk:.0639}],120639:[.452,.008,.668],120640:[.694,.013,.671],120641:[.452,.211,.708,{sk:.0319}],120642:[.452,0,.577,{ic:.031,sk:.0319}],120643:[.711,.201,.508,{sk:.128}],120644:[.452,.008,.585,{sk:.0639}],120645:[.444,.008,.682],120646:[.451,.211,.612,{sk:.0958}],120647:[.451,.105,.424,{ic:.033,sk:.0958}],120648:[.444,.008,.686],120649:[.444,.013,.521,{ic:.089,sk:.0319}],120650:[.453,.008,.631,{sk:.0319}],120651:[.452,.216,.747,{sk:.0958}],120652:[.452,.201,.718,{sk:.0639}],120653:[.694,.202,.758,{sk:.128}],120654:[.453,.008,.718],120655:[.71,.017,.628,{ic:.029,sk:.0958}],120656:[.444,.007,.483,{sk:.0639}],120657:[.701,.008,.692,{sk:.0958}],120658:[.434,.006,.667,{ic:.067}],120659:[.694,.202,.712,{sk:.0958}],120660:[.451,.194,.612,{sk:.0958}],120661:[.444,.008,.975],120662:[.694,0,.733],120663:[.694,0,.733],120664:[.691,0,.581],120665:[.694,0,.917],120666:[.691,0,.642],120667:[.694,0,.672],120668:[.694,0,.794],120669:[.716,.022,.856],120670:[.694,0,.331],120671:[.694,0,.764],120672:[.694,0,.672],120673:[.694,0,.978],120674:[.694,0,.794],120675:[.688,0,.733],120676:[.716,.022,.794],120677:[.691,0,.794],120678:[.694,0,.703],120680:[.694,0,.794],120681:[.688,0,.733],120682:[.715,0,.856],120683:[.694,0,.794],120684:[.694,0,.733],120685:[.694,0,.856],120686:[.716,0,.794],120782:[.654,.01,.575],120783:[.655,0,.575],120784:[.654,0,.575],120785:[.655,.011,.575],120786:[.656,0,.575],120787:[.655,.011,.575],120788:[.655,.011,.575],120789:[.676,.011,.575],120790:[.654,.011,.575],120791:[.654,.011,.575],120802:[.678,.022,.5],120803:[.678,0,.5],120804:[.677,0,.5],120805:[.678,.022,.5],120806:[.656,0,.5],120807:[.656,.021,.5],120808:[.677,.022,.5],120809:[.656,.011,.5],120810:[.678,.022,.5],120811:[.677,.022,.5],120812:[.715,.022,.55],120813:[.716,0,.55],120814:[.716,0,.55],120815:[.716,.022,.55],120816:[.694,0,.55],120817:[.694,.022,.55],120818:[.716,.022,.55],120819:[.695,.011,.55],120820:[.715,.022,.55],120821:[.716,.022,.55],120822:[.621,.01,.525],120823:[.622,0,.525],120824:[.622,0,.525],120825:[.622,.011,.525],120826:[.624,0,.525],120827:[.611,.01,.525],120828:[.622,.011,.525],120829:[.627,.01,.525],120830:[.621,.01,.525],120831:[.622,.011,.525]},Object.defineProperty(normal$1,"__esModule",{value:!0}),normal$1.normal=void 0;var FontData_js_1$a=FontData,normal_js_1$1=normal;normal$1.normal=(0,FontData_js_1$a.AddCSS)(normal_js_1$1.normal,{163:{f:"MI"},165:{f:"A"},174:{f:"A"},183:{c:"\\22C5"},240:{f:"A"},697:{c:"\\2032"},913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8192:{c:""},8193:{c:""},8194:{c:""},8195:{c:""},8196:{c:""},8197:{c:""},8198:{c:""},8201:{c:""},8202:{c:""},8203:{c:""},8204:{c:""},8213:{c:"\\2014"},8214:{c:"\\2225"},8215:{c:"_"},8226:{c:"\\2219"},8243:{c:"\\2032\\2032"},8244:{c:"\\2032\\2032\\2032"},8245:{f:"A"},8246:{c:"\\2035\\2035",f:"A"},8247:{c:"\\2035\\2035\\2035",f:"A"},8254:{c:"\\2C9"},8260:{c:"/"},8279:{c:"\\2032\\2032\\2032\\2032"},8288:{c:""},8289:{c:""},8290:{c:""},8291:{c:""},8292:{c:""},8407:{c:"\\2192",f:"V"},8450:{c:"C",f:"A"},8459:{c:"H",f:"SC"},8460:{c:"H",f:"FR"},8461:{c:"H",f:"A"},8462:{c:"h",f:"I"},8463:{f:"A"},8464:{c:"I",f:"SC"},8465:{c:"I",f:"FR"},8466:{c:"L",f:"SC"},8469:{c:"N",f:"A"},8473:{c:"P",f:"A"},8474:{c:"Q",f:"A"},8475:{c:"R",f:"SC"},8476:{c:"R",f:"FR"},8477:{c:"R",f:"A"},8484:{c:"Z",f:"A"},8486:{c:"\\3A9"},8487:{f:"A"},8488:{c:"Z",f:"FR"},8492:{c:"B",f:"SC"},8493:{c:"C",f:"FR"},8496:{c:"E",f:"SC"},8497:{c:"F",f:"SC"},8498:{f:"A"},8499:{c:"M",f:"SC"},8502:{f:"A"},8503:{f:"A"},8504:{f:"A"},8513:{f:"A"},8602:{f:"A"},8603:{f:"A"},8606:{f:"A"},8608:{f:"A"},8610:{f:"A"},8611:{f:"A"},8619:{f:"A"},8620:{f:"A"},8621:{f:"A"},8622:{f:"A"},8624:{f:"A"},8625:{f:"A"},8630:{f:"A"},8631:{f:"A"},8634:{f:"A"},8635:{f:"A"},8638:{f:"A"},8639:{f:"A"},8642:{f:"A"},8643:{f:"A"},8644:{f:"A"},8646:{f:"A"},8647:{f:"A"},8648:{f:"A"},8649:{f:"A"},8650:{f:"A"},8651:{f:"A"},8653:{f:"A"},8654:{f:"A"},8655:{f:"A"},8666:{f:"A"},8667:{f:"A"},8669:{f:"A"},8672:{f:"A"},8674:{f:"A"},8705:{f:"A"},8708:{c:"\\2203\\338"},8710:{c:"\\394"},8716:{c:"\\220B\\338"},8717:{f:"A"},8719:{f:"S1"},8720:{f:"S1"},8721:{f:"S1"},8724:{f:"A"},8737:{f:"A"},8738:{f:"A"},8740:{f:"A"},8742:{f:"A"},8748:{f:"S1"},8749:{f:"S1"},8750:{f:"S1"},8756:{f:"A"},8757:{f:"A"},8765:{f:"A"},8769:{f:"A"},8770:{f:"A"},8772:{c:"\\2243\\338"},8775:{c:"\\2246",f:"A"},8777:{c:"\\2248\\338"},8778:{f:"A"},8782:{f:"A"},8783:{f:"A"},8785:{f:"A"},8786:{f:"A"},8787:{f:"A"},8790:{f:"A"},8791:{f:"A"},8796:{f:"A"},8802:{c:"\\2261\\338"},8806:{f:"A"},8807:{f:"A"},8808:{f:"A"},8809:{f:"A"},8812:{f:"A"},8813:{c:"\\224D\\338"},8814:{f:"A"},8815:{f:"A"},8816:{f:"A"},8817:{f:"A"},8818:{f:"A"},8819:{f:"A"},8820:{c:"\\2272\\338"},8821:{c:"\\2273\\338"},8822:{f:"A"},8823:{f:"A"},8824:{c:"\\2276\\338"},8825:{c:"\\2277\\338"},8828:{f:"A"},8829:{f:"A"},8830:{f:"A"},8831:{f:"A"},8832:{f:"A"},8833:{f:"A"},8836:{c:"\\2282\\338"},8837:{c:"\\2283\\338"},8840:{f:"A"},8841:{f:"A"},8842:{f:"A"},8843:{f:"A"},8847:{f:"A"},8848:{f:"A"},8858:{f:"A"},8859:{f:"A"},8861:{f:"A"},8862:{f:"A"},8863:{f:"A"},8864:{f:"A"},8865:{f:"A"},8873:{f:"A"},8874:{f:"A"},8876:{f:"A"},8877:{f:"A"},8878:{f:"A"},8879:{f:"A"},8882:{f:"A"},8883:{f:"A"},8884:{f:"A"},8885:{f:"A"},8888:{f:"A"},8890:{f:"A"},8891:{f:"A"},8892:{f:"A"},8896:{f:"S1"},8897:{f:"S1"},8898:{f:"S1"},8899:{f:"S1"},8903:{f:"A"},8905:{f:"A"},8906:{f:"A"},8907:{f:"A"},8908:{f:"A"},8909:{f:"A"},8910:{f:"A"},8911:{f:"A"},8912:{f:"A"},8913:{f:"A"},8914:{f:"A"},8915:{f:"A"},8916:{f:"A"},8918:{f:"A"},8919:{f:"A"},8920:{f:"A"},8921:{f:"A"},8922:{f:"A"},8923:{f:"A"},8926:{f:"A"},8927:{f:"A"},8928:{f:"A"},8929:{f:"A"},8930:{c:"\\2291\\338"},8931:{c:"\\2292\\338"},8934:{f:"A"},8935:{f:"A"},8936:{f:"A"},8937:{f:"A"},8938:{f:"A"},8939:{f:"A"},8940:{f:"A"},8941:{f:"A"},8965:{c:"\\22BC",f:"A"},8966:{c:"\\2A5E",f:"A"},8988:{c:"\\250C",f:"A"},8989:{c:"\\2510",f:"A"},8990:{c:"\\2514",f:"A"},8991:{c:"\\2518",f:"A"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},9168:{f:"S1"},9416:{f:"A"},9484:{f:"A"},9488:{f:"A"},9492:{f:"A"},9496:{f:"A"},9585:{f:"A"},9586:{f:"A"},9632:{f:"A"},9633:{f:"A"},9642:{c:"\\25A0",f:"A"},9650:{f:"A"},9652:{c:"\\25B2",f:"A"},9653:{c:"\\25B3"},9654:{f:"A"},9656:{c:"\\25B6",f:"A"},9660:{f:"A"},9662:{c:"\\25BC",f:"A"},9663:{c:"\\25BD"},9664:{f:"A"},9666:{c:"\\25C0",f:"A"},9674:{f:"A"},9723:{c:"\\25A1",f:"A"},9724:{c:"\\25A0",f:"A"},9733:{f:"A"},10003:{f:"A"},10016:{f:"A"},10072:{c:"\\2223"},10731:{f:"A"},10744:{c:"/",f:"I"},10752:{f:"S1"},10753:{f:"S1"},10754:{f:"S1"},10756:{f:"S1"},10758:{f:"S1"},10764:{c:"\\222C\\222C",f:"S1"},10799:{c:"\\D7"},10846:{f:"A"},10877:{f:"A"},10878:{f:"A"},10885:{f:"A"},10886:{f:"A"},10887:{f:"A"},10888:{f:"A"},10889:{f:"A"},10890:{f:"A"},10891:{f:"A"},10892:{f:"A"},10901:{f:"A"},10902:{f:"A"},10933:{f:"A"},10934:{f:"A"},10935:{f:"A"},10936:{f:"A"},10937:{f:"A"},10938:{f:"A"},10949:{f:"A"},10950:{f:"A"},10955:{f:"A"},10956:{f:"A"},12296:{c:"\\27E8"},12297:{c:"\\27E9"},57350:{f:"A"},57351:{f:"A"},57352:{f:"A"},57353:{f:"A"},57356:{f:"A"},57357:{f:"A"},57358:{f:"A"},57359:{f:"A"},57360:{f:"A"},57361:{f:"A"},57366:{f:"A"},57367:{f:"A"},57368:{f:"A"},57369:{f:"A"},57370:{f:"A"},57371:{f:"A"},119808:{c:"A",f:"B"},119809:{c:"B",f:"B"},119810:{c:"C",f:"B"},119811:{c:"D",f:"B"},119812:{c:"E",f:"B"},119813:{c:"F",f:"B"},119814:{c:"G",f:"B"},119815:{c:"H",f:"B"},119816:{c:"I",f:"B"},119817:{c:"J",f:"B"},119818:{c:"K",f:"B"},119819:{c:"L",f:"B"},119820:{c:"M",f:"B"},119821:{c:"N",f:"B"},119822:{c:"O",f:"B"},119823:{c:"P",f:"B"},119824:{c:"Q",f:"B"},119825:{c:"R",f:"B"},119826:{c:"S",f:"B"},119827:{c:"T",f:"B"},119828:{c:"U",f:"B"},119829:{c:"V",f:"B"},119830:{c:"W",f:"B"},119831:{c:"X",f:"B"},119832:{c:"Y",f:"B"},119833:{c:"Z",f:"B"},119834:{c:"a",f:"B"},119835:{c:"b",f:"B"},119836:{c:"c",f:"B"},119837:{c:"d",f:"B"},119838:{c:"e",f:"B"},119839:{c:"f",f:"B"},119840:{c:"g",f:"B"},119841:{c:"h",f:"B"},119842:{c:"i",f:"B"},119843:{c:"j",f:"B"},119844:{c:"k",f:"B"},119845:{c:"l",f:"B"},119846:{c:"m",f:"B"},119847:{c:"n",f:"B"},119848:{c:"o",f:"B"},119849:{c:"p",f:"B"},119850:{c:"q",f:"B"},119851:{c:"r",f:"B"},119852:{c:"s",f:"B"},119853:{c:"t",f:"B"},119854:{c:"u",f:"B"},119855:{c:"v",f:"B"},119856:{c:"w",f:"B"},119857:{c:"x",f:"B"},119858:{c:"y",f:"B"},119859:{c:"z",f:"B"},119860:{c:"A",f:"I"},119861:{c:"B",f:"I"},119862:{c:"C",f:"I"},119863:{c:"D",f:"I"},119864:{c:"E",f:"I"},119865:{c:"F",f:"I"},119866:{c:"G",f:"I"},119867:{c:"H",f:"I"},119868:{c:"I",f:"I"},119869:{c:"J",f:"I"},119870:{c:"K",f:"I"},119871:{c:"L",f:"I"},119872:{c:"M",f:"I"},119873:{c:"N",f:"I"},119874:{c:"O",f:"I"},119875:{c:"P",f:"I"},119876:{c:"Q",f:"I"},119877:{c:"R",f:"I"},119878:{c:"S",f:"I"},119879:{c:"T",f:"I"},119880:{c:"U",f:"I"},119881:{c:"V",f:"I"},119882:{c:"W",f:"I"},119883:{c:"X",f:"I"},119884:{c:"Y",f:"I"},119885:{c:"Z",f:"I"},119886:{c:"a",f:"I"},119887:{c:"b",f:"I"},119888:{c:"c",f:"I"},119889:{c:"d",f:"I"},119890:{c:"e",f:"I"},119891:{c:"f",f:"I"},119892:{c:"g",f:"I"},119894:{c:"i",f:"I"},119895:{c:"j",f:"I"},119896:{c:"k",f:"I"},119897:{c:"l",f:"I"},119898:{c:"m",f:"I"},119899:{c:"n",f:"I"},119900:{c:"o",f:"I"},119901:{c:"p",f:"I"},119902:{c:"q",f:"I"},119903:{c:"r",f:"I"},119904:{c:"s",f:"I"},119905:{c:"t",f:"I"},119906:{c:"u",f:"I"},119907:{c:"v",f:"I"},119908:{c:"w",f:"I"},119909:{c:"x",f:"I"},119910:{c:"y",f:"I"},119911:{c:"z",f:"I"},119912:{c:"A",f:"BI"},119913:{c:"B",f:"BI"},119914:{c:"C",f:"BI"},119915:{c:"D",f:"BI"},119916:{c:"E",f:"BI"},119917:{c:"F",f:"BI"},119918:{c:"G",f:"BI"},119919:{c:"H",f:"BI"},119920:{c:"I",f:"BI"},119921:{c:"J",f:"BI"},119922:{c:"K",f:"BI"},119923:{c:"L",f:"BI"},119924:{c:"M",f:"BI"},119925:{c:"N",f:"BI"},119926:{c:"O",f:"BI"},119927:{c:"P",f:"BI"},119928:{c:"Q",f:"BI"},119929:{c:"R",f:"BI"},119930:{c:"S",f:"BI"},119931:{c:"T",f:"BI"},119932:{c:"U",f:"BI"},119933:{c:"V",f:"BI"},119934:{c:"W",f:"BI"},119935:{c:"X",f:"BI"},119936:{c:"Y",f:"BI"},119937:{c:"Z",f:"BI"},119938:{c:"a",f:"BI"},119939:{c:"b",f:"BI"},119940:{c:"c",f:"BI"},119941:{c:"d",f:"BI"},119942:{c:"e",f:"BI"},119943:{c:"f",f:"BI"},119944:{c:"g",f:"BI"},119945:{c:"h",f:"BI"},119946:{c:"i",f:"BI"},119947:{c:"j",f:"BI"},119948:{c:"k",f:"BI"},119949:{c:"l",f:"BI"},119950:{c:"m",f:"BI"},119951:{c:"n",f:"BI"},119952:{c:"o",f:"BI"},119953:{c:"p",f:"BI"},119954:{c:"q",f:"BI"},119955:{c:"r",f:"BI"},119956:{c:"s",f:"BI"},119957:{c:"t",f:"BI"},119958:{c:"u",f:"BI"},119959:{c:"v",f:"BI"},119960:{c:"w",f:"BI"},119961:{c:"x",f:"BI"},119962:{c:"y",f:"BI"},119963:{c:"z",f:"BI"},119964:{c:"A",f:"SC"},119966:{c:"C",f:"SC"},119967:{c:"D",f:"SC"},119970:{c:"G",f:"SC"},119973:{c:"J",f:"SC"},119974:{c:"K",f:"SC"},119977:{c:"N",f:"SC"},119978:{c:"O",f:"SC"},119979:{c:"P",f:"SC"},119980:{c:"Q",f:"SC"},119982:{c:"S",f:"SC"},119983:{c:"T",f:"SC"},119984:{c:"U",f:"SC"},119985:{c:"V",f:"SC"},119986:{c:"W",f:"SC"},119987:{c:"X",f:"SC"},119988:{c:"Y",f:"SC"},119989:{c:"Z",f:"SC"},120068:{c:"A",f:"FR"},120069:{c:"B",f:"FR"},120071:{c:"D",f:"FR"},120072:{c:"E",f:"FR"},120073:{c:"F",f:"FR"},120074:{c:"G",f:"FR"},120077:{c:"J",f:"FR"},120078:{c:"K",f:"FR"},120079:{c:"L",f:"FR"},120080:{c:"M",f:"FR"},120081:{c:"N",f:"FR"},120082:{c:"O",f:"FR"},120083:{c:"P",f:"FR"},120084:{c:"Q",f:"FR"},120086:{c:"S",f:"FR"},120087:{c:"T",f:"FR"},120088:{c:"U",f:"FR"},120089:{c:"V",f:"FR"},120090:{c:"W",f:"FR"},120091:{c:"X",f:"FR"},120092:{c:"Y",f:"FR"},120094:{c:"a",f:"FR"},120095:{c:"b",f:"FR"},120096:{c:"c",f:"FR"},120097:{c:"d",f:"FR"},120098:{c:"e",f:"FR"},120099:{c:"f",f:"FR"},120100:{c:"g",f:"FR"},120101:{c:"h",f:"FR"},120102:{c:"i",f:"FR"},120103:{c:"j",f:"FR"},120104:{c:"k",f:"FR"},120105:{c:"l",f:"FR"},120106:{c:"m",f:"FR"},120107:{c:"n",f:"FR"},120108:{c:"o",f:"FR"},120109:{c:"p",f:"FR"},120110:{c:"q",f:"FR"},120111:{c:"r",f:"FR"},120112:{c:"s",f:"FR"},120113:{c:"t",f:"FR"},120114:{c:"u",f:"FR"},120115:{c:"v",f:"FR"},120116:{c:"w",f:"FR"},120117:{c:"x",f:"FR"},120118:{c:"y",f:"FR"},120119:{c:"z",f:"FR"},120120:{c:"A",f:"A"},120121:{c:"B",f:"A"},120123:{c:"D",f:"A"},120124:{c:"E",f:"A"},120125:{c:"F",f:"A"},120126:{c:"G",f:"A"},120128:{c:"I",f:"A"},120129:{c:"J",f:"A"},120130:{c:"K",f:"A"},120131:{c:"L",f:"A"},120132:{c:"M",f:"A"},120134:{c:"O",f:"A"},120138:{c:"S",f:"A"},120139:{c:"T",f:"A"},120140:{c:"U",f:"A"},120141:{c:"V",f:"A"},120142:{c:"W",f:"A"},120143:{c:"X",f:"A"},120144:{c:"Y",f:"A"},120172:{c:"A",f:"FRB"},120173:{c:"B",f:"FRB"},120174:{c:"C",f:"FRB"},120175:{c:"D",f:"FRB"},120176:{c:"E",f:"FRB"},120177:{c:"F",f:"FRB"},120178:{c:"G",f:"FRB"},120179:{c:"H",f:"FRB"},120180:{c:"I",f:"FRB"},120181:{c:"J",f:"FRB"},120182:{c:"K",f:"FRB"},120183:{c:"L",f:"FRB"},120184:{c:"M",f:"FRB"},120185:{c:"N",f:"FRB"},120186:{c:"O",f:"FRB"},120187:{c:"P",f:"FRB"},120188:{c:"Q",f:"FRB"},120189:{c:"R",f:"FRB"},120190:{c:"S",f:"FRB"},120191:{c:"T",f:"FRB"},120192:{c:"U",f:"FRB"},120193:{c:"V",f:"FRB"},120194:{c:"W",f:"FRB"},120195:{c:"X",f:"FRB"},120196:{c:"Y",f:"FRB"},120197:{c:"Z",f:"FRB"},120198:{c:"a",f:"FRB"},120199:{c:"b",f:"FRB"},120200:{c:"c",f:"FRB"},120201:{c:"d",f:"FRB"},120202:{c:"e",f:"FRB"},120203:{c:"f",f:"FRB"},120204:{c:"g",f:"FRB"},120205:{c:"h",f:"FRB"},120206:{c:"i",f:"FRB"},120207:{c:"j",f:"FRB"},120208:{c:"k",f:"FRB"},120209:{c:"l",f:"FRB"},120210:{c:"m",f:"FRB"},120211:{c:"n",f:"FRB"},120212:{c:"o",f:"FRB"},120213:{c:"p",f:"FRB"},120214:{c:"q",f:"FRB"},120215:{c:"r",f:"FRB"},120216:{c:"s",f:"FRB"},120217:{c:"t",f:"FRB"},120218:{c:"u",f:"FRB"},120219:{c:"v",f:"FRB"},120220:{c:"w",f:"FRB"},120221:{c:"x",f:"FRB"},120222:{c:"y",f:"FRB"},120223:{c:"z",f:"FRB"},120224:{c:"A",f:"SS"},120225:{c:"B",f:"SS"},120226:{c:"C",f:"SS"},120227:{c:"D",f:"SS"},120228:{c:"E",f:"SS"},120229:{c:"F",f:"SS"},120230:{c:"G",f:"SS"},120231:{c:"H",f:"SS"},120232:{c:"I",f:"SS"},120233:{c:"J",f:"SS"},120234:{c:"K",f:"SS"},120235:{c:"L",f:"SS"},120236:{c:"M",f:"SS"},120237:{c:"N",f:"SS"},120238:{c:"O",f:"SS"},120239:{c:"P",f:"SS"},120240:{c:"Q",f:"SS"},120241:{c:"R",f:"SS"},120242:{c:"S",f:"SS"},120243:{c:"T",f:"SS"},120244:{c:"U",f:"SS"},120245:{c:"V",f:"SS"},120246:{c:"W",f:"SS"},120247:{c:"X",f:"SS"},120248:{c:"Y",f:"SS"},120249:{c:"Z",f:"SS"},120250:{c:"a",f:"SS"},120251:{c:"b",f:"SS"},120252:{c:"c",f:"SS"},120253:{c:"d",f:"SS"},120254:{c:"e",f:"SS"},120255:{c:"f",f:"SS"},120256:{c:"g",f:"SS"},120257:{c:"h",f:"SS"},120258:{c:"i",f:"SS"},120259:{c:"j",f:"SS"},120260:{c:"k",f:"SS"},120261:{c:"l",f:"SS"},120262:{c:"m",f:"SS"},120263:{c:"n",f:"SS"},120264:{c:"o",f:"SS"},120265:{c:"p",f:"SS"},120266:{c:"q",f:"SS"},120267:{c:"r",f:"SS"},120268:{c:"s",f:"SS"},120269:{c:"t",f:"SS"},120270:{c:"u",f:"SS"},120271:{c:"v",f:"SS"},120272:{c:"w",f:"SS"},120273:{c:"x",f:"SS"},120274:{c:"y",f:"SS"},120275:{c:"z",f:"SS"},120276:{c:"A",f:"SSB"},120277:{c:"B",f:"SSB"},120278:{c:"C",f:"SSB"},120279:{c:"D",f:"SSB"},120280:{c:"E",f:"SSB"},120281:{c:"F",f:"SSB"},120282:{c:"G",f:"SSB"},120283:{c:"H",f:"SSB"},120284:{c:"I",f:"SSB"},120285:{c:"J",f:"SSB"},120286:{c:"K",f:"SSB"},120287:{c:"L",f:"SSB"},120288:{c:"M",f:"SSB"},120289:{c:"N",f:"SSB"},120290:{c:"O",f:"SSB"},120291:{c:"P",f:"SSB"},120292:{c:"Q",f:"SSB"},120293:{c:"R",f:"SSB"},120294:{c:"S",f:"SSB"},120295:{c:"T",f:"SSB"},120296:{c:"U",f:"SSB"},120297:{c:"V",f:"SSB"},120298:{c:"W",f:"SSB"},120299:{c:"X",f:"SSB"},120300:{c:"Y",f:"SSB"},120301:{c:"Z",f:"SSB"},120302:{c:"a",f:"SSB"},120303:{c:"b",f:"SSB"},120304:{c:"c",f:"SSB"},120305:{c:"d",f:"SSB"},120306:{c:"e",f:"SSB"},120307:{c:"f",f:"SSB"},120308:{c:"g",f:"SSB"},120309:{c:"h",f:"SSB"},120310:{c:"i",f:"SSB"},120311:{c:"j",f:"SSB"},120312:{c:"k",f:"SSB"},120313:{c:"l",f:"SSB"},120314:{c:"m",f:"SSB"},120315:{c:"n",f:"SSB"},120316:{c:"o",f:"SSB"},120317:{c:"p",f:"SSB"},120318:{c:"q",f:"SSB"},120319:{c:"r",f:"SSB"},120320:{c:"s",f:"SSB"},120321:{c:"t",f:"SSB"},120322:{c:"u",f:"SSB"},120323:{c:"v",f:"SSB"},120324:{c:"w",f:"SSB"},120325:{c:"x",f:"SSB"},120326:{c:"y",f:"SSB"},120327:{c:"z",f:"SSB"},120328:{c:"A",f:"SSI"},120329:{c:"B",f:"SSI"},120330:{c:"C",f:"SSI"},120331:{c:"D",f:"SSI"},120332:{c:"E",f:"SSI"},120333:{c:"F",f:"SSI"},120334:{c:"G",f:"SSI"},120335:{c:"H",f:"SSI"},120336:{c:"I",f:"SSI"},120337:{c:"J",f:"SSI"},120338:{c:"K",f:"SSI"},120339:{c:"L",f:"SSI"},120340:{c:"M",f:"SSI"},120341:{c:"N",f:"SSI"},120342:{c:"O",f:"SSI"},120343:{c:"P",f:"SSI"},120344:{c:"Q",f:"SSI"},120345:{c:"R",f:"SSI"},120346:{c:"S",f:"SSI"},120347:{c:"T",f:"SSI"},120348:{c:"U",f:"SSI"},120349:{c:"V",f:"SSI"},120350:{c:"W",f:"SSI"},120351:{c:"X",f:"SSI"},120352:{c:"Y",f:"SSI"},120353:{c:"Z",f:"SSI"},120354:{c:"a",f:"SSI"},120355:{c:"b",f:"SSI"},120356:{c:"c",f:"SSI"},120357:{c:"d",f:"SSI"},120358:{c:"e",f:"SSI"},120359:{c:"f",f:"SSI"},120360:{c:"g",f:"SSI"},120361:{c:"h",f:"SSI"},120362:{c:"i",f:"SSI"},120363:{c:"j",f:"SSI"},120364:{c:"k",f:"SSI"},120365:{c:"l",f:"SSI"},120366:{c:"m",f:"SSI"},120367:{c:"n",f:"SSI"},120368:{c:"o",f:"SSI"},120369:{c:"p",f:"SSI"},120370:{c:"q",f:"SSI"},120371:{c:"r",f:"SSI"},120372:{c:"s",f:"SSI"},120373:{c:"t",f:"SSI"},120374:{c:"u",f:"SSI"},120375:{c:"v",f:"SSI"},120376:{c:"w",f:"SSI"},120377:{c:"x",f:"SSI"},120378:{c:"y",f:"SSI"},120379:{c:"z",f:"SSI"},120432:{c:"A",f:"T"},120433:{c:"B",f:"T"},120434:{c:"C",f:"T"},120435:{c:"D",f:"T"},120436:{c:"E",f:"T"},120437:{c:"F",f:"T"},120438:{c:"G",f:"T"},120439:{c:"H",f:"T"},120440:{c:"I",f:"T"},120441:{c:"J",f:"T"},120442:{c:"K",f:"T"},120443:{c:"L",f:"T"},120444:{c:"M",f:"T"},120445:{c:"N",f:"T"},120446:{c:"O",f:"T"},120447:{c:"P",f:"T"},120448:{c:"Q",f:"T"},120449:{c:"R",f:"T"},120450:{c:"S",f:"T"},120451:{c:"T",f:"T"},120452:{c:"U",f:"T"},120453:{c:"V",f:"T"},120454:{c:"W",f:"T"},120455:{c:"X",f:"T"},120456:{c:"Y",f:"T"},120457:{c:"Z",f:"T"},120458:{c:"a",f:"T"},120459:{c:"b",f:"T"},120460:{c:"c",f:"T"},120461:{c:"d",f:"T"},120462:{c:"e",f:"T"},120463:{c:"f",f:"T"},120464:{c:"g",f:"T"},120465:{c:"h",f:"T"},120466:{c:"i",f:"T"},120467:{c:"j",f:"T"},120468:{c:"k",f:"T"},120469:{c:"l",f:"T"},120470:{c:"m",f:"T"},120471:{c:"n",f:"T"},120472:{c:"o",f:"T"},120473:{c:"p",f:"T"},120474:{c:"q",f:"T"},120475:{c:"r",f:"T"},120476:{c:"s",f:"T"},120477:{c:"t",f:"T"},120478:{c:"u",f:"T"},120479:{c:"v",f:"T"},120480:{c:"w",f:"T"},120481:{c:"x",f:"T"},120482:{c:"y",f:"T"},120483:{c:"z",f:"T"},120488:{c:"A",f:"B"},120489:{c:"B",f:"B"},120490:{c:"\\393",f:"B"},120491:{c:"\\394",f:"B"},120492:{c:"E",f:"B"},120493:{c:"Z",f:"B"},120494:{c:"H",f:"B"},120495:{c:"\\398",f:"B"},120496:{c:"I",f:"B"},120497:{c:"K",f:"B"},120498:{c:"\\39B",f:"B"},120499:{c:"M",f:"B"},120500:{c:"N",f:"B"},120501:{c:"\\39E",f:"B"},120502:{c:"O",f:"B"},120503:{c:"\\3A0",f:"B"},120504:{c:"P",f:"B"},120506:{c:"\\3A3",f:"B"},120507:{c:"T",f:"B"},120508:{c:"\\3A5",f:"B"},120509:{c:"\\3A6",f:"B"},120510:{c:"X",f:"B"},120511:{c:"\\3A8",f:"B"},120512:{c:"\\3A9",f:"B"},120513:{c:"\\2207",f:"B"},120546:{c:"A",f:"I"},120547:{c:"B",f:"I"},120548:{c:"\\393",f:"I"},120549:{c:"\\394",f:"I"},120550:{c:"E",f:"I"},120551:{c:"Z",f:"I"},120552:{c:"H",f:"I"},120553:{c:"\\398",f:"I"},120554:{c:"I",f:"I"},120555:{c:"K",f:"I"},120556:{c:"\\39B",f:"I"},120557:{c:"M",f:"I"},120558:{c:"N",f:"I"},120559:{c:"\\39E",f:"I"},120560:{c:"O",f:"I"},120561:{c:"\\3A0",f:"I"},120562:{c:"P",f:"I"},120564:{c:"\\3A3",f:"I"},120565:{c:"T",f:"I"},120566:{c:"\\3A5",f:"I"},120567:{c:"\\3A6",f:"I"},120568:{c:"X",f:"I"},120569:{c:"\\3A8",f:"I"},120570:{c:"\\3A9",f:"I"},120572:{c:"\\3B1",f:"I"},120573:{c:"\\3B2",f:"I"},120574:{c:"\\3B3",f:"I"},120575:{c:"\\3B4",f:"I"},120576:{c:"\\3B5",f:"I"},120577:{c:"\\3B6",f:"I"},120578:{c:"\\3B7",f:"I"},120579:{c:"\\3B8",f:"I"},120580:{c:"\\3B9",f:"I"},120581:{c:"\\3BA",f:"I"},120582:{c:"\\3BB",f:"I"},120583:{c:"\\3BC",f:"I"},120584:{c:"\\3BD",f:"I"},120585:{c:"\\3BE",f:"I"},120586:{c:"\\3BF",f:"I"},120587:{c:"\\3C0",f:"I"},120588:{c:"\\3C1",f:"I"},120589:{c:"\\3C2",f:"I"},120590:{c:"\\3C3",f:"I"},120591:{c:"\\3C4",f:"I"},120592:{c:"\\3C5",f:"I"},120593:{c:"\\3C6",f:"I"},120594:{c:"\\3C7",f:"I"},120595:{c:"\\3C8",f:"I"},120596:{c:"\\3C9",f:"I"},120597:{c:"\\2202"},120598:{c:"\\3F5",f:"I"},120599:{c:"\\3D1",f:"I"},120600:{c:"\\E009",f:"A"},120601:{c:"\\3D5",f:"I"},120602:{c:"\\3F1",f:"I"},120603:{c:"\\3D6",f:"I"},120604:{c:"A",f:"BI"},120605:{c:"B",f:"BI"},120606:{c:"\\393",f:"BI"},120607:{c:"\\394",f:"BI"},120608:{c:"E",f:"BI"},120609:{c:"Z",f:"BI"},120610:{c:"H",f:"BI"},120611:{c:"\\398",f:"BI"},120612:{c:"I",f:"BI"},120613:{c:"K",f:"BI"},120614:{c:"\\39B",f:"BI"},120615:{c:"M",f:"BI"},120616:{c:"N",f:"BI"},120617:{c:"\\39E",f:"BI"},120618:{c:"O",f:"BI"},120619:{c:"\\3A0",f:"BI"},120620:{c:"P",f:"BI"},120622:{c:"\\3A3",f:"BI"},120623:{c:"T",f:"BI"},120624:{c:"\\3A5",f:"BI"},120625:{c:"\\3A6",f:"BI"},120626:{c:"X",f:"BI"},120627:{c:"\\3A8",f:"BI"},120628:{c:"\\3A9",f:"BI"},120630:{c:"\\3B1",f:"BI"},120631:{c:"\\3B2",f:"BI"},120632:{c:"\\3B3",f:"BI"},120633:{c:"\\3B4",f:"BI"},120634:{c:"\\3B5",f:"BI"},120635:{c:"\\3B6",f:"BI"},120636:{c:"\\3B7",f:"BI"},120637:{c:"\\3B8",f:"BI"},120638:{c:"\\3B9",f:"BI"},120639:{c:"\\3BA",f:"BI"},120640:{c:"\\3BB",f:"BI"},120641:{c:"\\3BC",f:"BI"},120642:{c:"\\3BD",f:"BI"},120643:{c:"\\3BE",f:"BI"},120644:{c:"\\3BF",f:"BI"},120645:{c:"\\3C0",f:"BI"},120646:{c:"\\3C1",f:"BI"},120647:{c:"\\3C2",f:"BI"},120648:{c:"\\3C3",f:"BI"},120649:{c:"\\3C4",f:"BI"},120650:{c:"\\3C5",f:"BI"},120651:{c:"\\3C6",f:"BI"},120652:{c:"\\3C7",f:"BI"},120653:{c:"\\3C8",f:"BI"},120654:{c:"\\3C9",f:"BI"},120655:{c:"\\2202",f:"B"},120656:{c:"\\3F5",f:"BI"},120657:{c:"\\3D1",f:"BI"},120658:{c:"\\E009",f:"A"},120659:{c:"\\3D5",f:"BI"},120660:{c:"\\3F1",f:"BI"},120661:{c:"\\3D6",f:"BI"},120662:{c:"A",f:"SSB"},120663:{c:"B",f:"SSB"},120664:{c:"\\393",f:"SSB"},120665:{c:"\\394",f:"SSB"},120666:{c:"E",f:"SSB"},120667:{c:"Z",f:"SSB"},120668:{c:"H",f:"SSB"},120669:{c:"\\398",f:"SSB"},120670:{c:"I",f:"SSB"},120671:{c:"K",f:"SSB"},120672:{c:"\\39B",f:"SSB"},120673:{c:"M",f:"SSB"},120674:{c:"N",f:"SSB"},120675:{c:"\\39E",f:"SSB"},120676:{c:"O",f:"SSB"},120677:{c:"\\3A0",f:"SSB"},120678:{c:"P",f:"SSB"},120680:{c:"\\3A3",f:"SSB"},120681:{c:"T",f:"SSB"},120682:{c:"\\3A5",f:"SSB"},120683:{c:"\\3A6",f:"SSB"},120684:{c:"X",f:"SSB"},120685:{c:"\\3A8",f:"SSB"},120686:{c:"\\3A9",f:"SSB"},120782:{c:"0",f:"B"},120783:{c:"1",f:"B"},120784:{c:"2",f:"B"},120785:{c:"3",f:"B"},120786:{c:"4",f:"B"},120787:{c:"5",f:"B"},120788:{c:"6",f:"B"},120789:{c:"7",f:"B"},120790:{c:"8",f:"B"},120791:{c:"9",f:"B"},120802:{c:"0",f:"SS"},120803:{c:"1",f:"SS"},120804:{c:"2",f:"SS"},120805:{c:"3",f:"SS"},120806:{c:"4",f:"SS"},120807:{c:"5",f:"SS"},120808:{c:"6",f:"SS"},120809:{c:"7",f:"SS"},120810:{c:"8",f:"SS"},120811:{c:"9",f:"SS"},120812:{c:"0",f:"SSB"},120813:{c:"1",f:"SSB"},120814:{c:"2",f:"SSB"},120815:{c:"3",f:"SSB"},120816:{c:"4",f:"SSB"},120817:{c:"5",f:"SSB"},120818:{c:"6",f:"SSB"},120819:{c:"7",f:"SSB"},120820:{c:"8",f:"SSB"},120821:{c:"9",f:"SSB"},120822:{c:"0",f:"T"},120823:{c:"1",f:"T"},120824:{c:"2",f:"T"},120825:{c:"3",f:"T"},120826:{c:"4",f:"T"},120827:{c:"5",f:"T"},120828:{c:"6",f:"T"},120829:{c:"7",f:"T"},120830:{c:"8",f:"T"},120831:{c:"9",f:"T"}});var sansSerifBoldItalic$1={},sansSerifBoldItalic={};Object.defineProperty(sansSerifBoldItalic,"__esModule",{value:!0}),sansSerifBoldItalic.sansSerifBoldItalic=void 0,sansSerifBoldItalic.sansSerifBoldItalic={305:[.458,0,.256],567:[.458,.205,.286]},Object.defineProperty(sansSerifBoldItalic$1,"__esModule",{value:!0}),sansSerifBoldItalic$1.sansSerifBoldItalic=void 0;var FontData_js_1$9=FontData,sans_serif_bold_italic_js_1$1=sansSerifBoldItalic;sansSerifBoldItalic$1.sansSerifBoldItalic=(0,FontData_js_1$9.AddCSS)(sans_serif_bold_italic_js_1$1.sansSerifBoldItalic,{305:{f:"SSB"},567:{f:"SSB"}});var sansSerifBold$1={},sansSerifBold={};Object.defineProperty(sansSerifBold,"__esModule",{value:!0}),sansSerifBold.sansSerifBold=void 0,sansSerifBold.sansSerifBold={33:[.694,0,.367],34:[.694,-.442,.558],35:[.694,.193,.917],36:[.75,.056,.55],37:[.75,.056,1.029],38:[.716,.022,.831],39:[.694,-.442,.306],40:[.75,.249,.428],41:[.75,.25,.428],42:[.75,-.293,.55],43:[.617,.116,.856],44:[.146,.106,.306],45:[.273,-.186,.367],46:[.146,0,.306],47:[.75,.249,.55],58:[.458,0,.306],59:[.458,.106,.306],61:[.407,-.094,.856],63:[.705,0,.519],64:[.704,.011,.733],91:[.75,.25,.343],93:[.75,.25,.343],94:[.694,-.537,.55],95:[-.023,.11,.55],126:[.344,-.198,.55],305:[.458,0,.256],567:[.458,.205,.286],768:[.694,-.537,0],769:[.694,-.537,0],770:[.694,-.537,0],771:[.694,-.548,0],772:[.66,-.56,0],774:[.694,-.552,0],775:[.695,-.596,0],776:[.695,-.595,0],778:[.694,-.538,0],779:[.694,-.537,0],780:[.657,-.5,0],8211:[.327,-.24,.55],8212:[.327,-.24,1.1],8213:[.327,-.24,1.1],8215:[-.023,.11,.55],8216:[.694,-.443,.306],8217:[.694,-.442,.306],8220:[.694,-.443,.558],8221:[.694,-.442,.558],8260:[.75,.249,.55],8710:[.694,0,.917]},Object.defineProperty(sansSerifBold$1,"__esModule",{value:!0}),sansSerifBold$1.sansSerifBold=void 0;var FontData_js_1$8=FontData,sans_serif_bold_js_1$1=sansSerifBold;sansSerifBold$1.sansSerifBold=(0,FontData_js_1$8.AddCSS)(sans_serif_bold_js_1$1.sansSerifBold,{8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/"},8710:{c:"\\394"}});var sansSerifItalic$1={},sansSerifItalic={};Object.defineProperty(sansSerifItalic,"__esModule",{value:!0}),sansSerifItalic.sansSerifItalic=void 0,sansSerifItalic.sansSerifItalic={33:[.694,0,.319,{ic:.036}],34:[.694,-.471,.5],35:[.694,.194,.833,{ic:.018}],36:[.75,.056,.5,{ic:.065}],37:[.75,.056,.833],38:[.716,.022,.758],39:[.694,-.471,.278,{ic:.057}],40:[.75,.25,.389,{ic:.102}],41:[.75,.25,.389],42:[.75,-.306,.5,{ic:.068}],43:[.583,.083,.778],44:[.098,.125,.278],45:[.259,-.186,.333],46:[.098,0,.278],47:[.75,.25,.5,{ic:.1}],48:[.678,.022,.5,{ic:.049}],49:[.678,0,.5],50:[.678,0,.5,{ic:.051}],51:[.678,.022,.5,{ic:.044}],52:[.656,0,.5,{ic:.021}],53:[.656,.022,.5,{ic:.055}],54:[.678,.022,.5,{ic:.048}],55:[.656,.011,.5,{ic:.096}],56:[.678,.022,.5,{ic:.054}],57:[.677,.022,.5,{ic:.045}],58:[.444,0,.278],59:[.444,.125,.278],61:[.37,-.13,.778,{ic:.018}],63:[.704,0,.472,{ic:.064}],64:[.705,.01,.667,{ic:.04}],91:[.75,.25,.289,{ic:.136}],93:[.75,.25,.289,{ic:.064}],94:[.694,-.527,.5,{ic:.033}],95:[-.038,.114,.5,{ic:.065}],126:[.327,-.193,.5,{ic:.06}],305:[.444,0,.239,{ic:.019}],567:[.444,.204,.267,{ic:.019}],768:[.694,-.527,0],769:[.694,-.527,0,{ic:.063}],770:[.694,-.527,0,{ic:.033}],771:[.677,-.543,0,{ic:.06}],772:[.631,-.552,0,{ic:.064}],774:[.694,-.508,0,{ic:.073}],775:[.68,-.576,0],776:[.68,-.582,0,{ic:.04}],778:[.693,-.527,0],779:[.694,-.527,0,{ic:.063}],780:[.654,-.487,0,{ic:.06}],913:[.694,0,.667],914:[.694,0,.667,{ic:.029}],915:[.691,0,.542,{ic:.104}],916:[.694,0,.833],917:[.691,0,.597,{ic:.091}],918:[.694,0,.611,{ic:.091}],919:[.694,0,.708,{ic:.06}],920:[.715,.022,.778,{ic:.026}],921:[.694,0,.278,{ic:.06}],922:[.694,0,.694,{ic:.091}],923:[.694,0,.611],924:[.694,0,.875,{ic:.054}],925:[.694,0,.708,{ic:.058}],926:[.688,0,.667,{ic:.098}],927:[.716,.022,.736,{ic:.027}],928:[.691,0,.708,{ic:.06}],929:[.694,0,.639,{ic:.051}],931:[.694,0,.722,{ic:.091}],932:[.688,0,.681,{ic:.109}],933:[.716,0,.778,{ic:.065}],934:[.694,0,.722,{ic:.021}],935:[.694,0,.667,{ic:.091}],936:[.694,0,.778,{ic:.076}],937:[.716,0,.722,{ic:.047}],8211:[.312,-.236,.5,{ic:.065}],8212:[.312,-.236,1,{ic:.065}],8213:[.312,-.236,1,{ic:.065}],8215:[-.038,.114,.5,{ic:.065}],8216:[.694,-.471,.278,{ic:.058}],8217:[.694,-.471,.278,{ic:.057}],8220:[.694,-.471,.5,{ic:.114}],8221:[.694,-.471,.5],8260:[.75,.25,.5,{ic:.1}],8710:[.694,0,.833]},Object.defineProperty(sansSerifItalic$1,"__esModule",{value:!0}),sansSerifItalic$1.sansSerifItalic=void 0;var FontData_js_1$7=FontData,sans_serif_italic_js_1$1=sansSerifItalic;sansSerifItalic$1.sansSerifItalic=(0,FontData_js_1$7.AddCSS)(sans_serif_italic_js_1$1.sansSerifItalic,{913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/"},8710:{c:"\\394"}});var sansSerif$1={},sansSerif={};Object.defineProperty(sansSerif,"__esModule",{value:!0}),sansSerif.sansSerif=void 0,sansSerif.sansSerif={33:[.694,0,.319],34:[.694,-.471,.5],35:[.694,.194,.833],36:[.75,.056,.5],37:[.75,.056,.833],38:[.716,.022,.758],39:[.694,-.471,.278],40:[.75,.25,.389],41:[.75,.25,.389],42:[.75,-.306,.5],43:[.583,.082,.778],44:[.098,.125,.278],45:[.259,-.186,.333],46:[.098,0,.278],47:[.75,.25,.5],58:[.444,0,.278],59:[.444,.125,.278],61:[.37,-.13,.778],63:[.704,0,.472],64:[.704,.011,.667],91:[.75,.25,.289],93:[.75,.25,.289],94:[.694,-.527,.5],95:[-.038,.114,.5],126:[.327,-.193,.5],305:[.444,0,.239],567:[.444,.205,.267],768:[.694,-.527,0],769:[.694,-.527,0],770:[.694,-.527,0],771:[.677,-.543,0],772:[.631,-.552,0],774:[.694,-.508,0],775:[.68,-.576,0],776:[.68,-.582,0],778:[.694,-.527,0],779:[.694,-.527,0],780:[.654,-.487,0],913:[.694,0,.667],914:[.694,0,.667],915:[.691,0,.542],916:[.694,0,.833],917:[.691,0,.597],918:[.694,0,.611],919:[.694,0,.708],920:[.716,.021,.778],921:[.694,0,.278],922:[.694,0,.694],923:[.694,0,.611],924:[.694,0,.875],925:[.694,0,.708],926:[.688,0,.667],927:[.715,.022,.736],928:[.691,0,.708],929:[.694,0,.639],931:[.694,0,.722],932:[.688,0,.681],933:[.716,0,.778],934:[.694,0,.722],935:[.694,0,.667],936:[.694,0,.778],937:[.716,0,.722],8211:[.312,-.236,.5],8212:[.312,-.236,1],8213:[.312,-.236,1],8215:[-.038,.114,.5],8216:[.694,-.471,.278],8217:[.694,-.471,.278],8220:[.694,-.471,.5],8221:[.694,-.471,.5],8260:[.75,.25,.5],8710:[.694,0,.833]},Object.defineProperty(sansSerif$1,"__esModule",{value:!0}),sansSerif$1.sansSerif=void 0;var FontData_js_1$6=FontData,sans_serif_js_1$1=sansSerif;sansSerif$1.sansSerif=(0,FontData_js_1$6.AddCSS)(sans_serif_js_1$1.sansSerif,{913:{c:"A"},914:{c:"B"},917:{c:"E"},918:{c:"Z"},919:{c:"H"},921:{c:"I"},922:{c:"K"},924:{c:"M"},925:{c:"N"},927:{c:"O"},929:{c:"P"},932:{c:"T"},935:{c:"X"},8213:{c:"\\2014"},8215:{c:"_"},8260:{c:"/"},8710:{c:"\\394"}});var scriptBold$1={},scriptBold={};Object.defineProperty(scriptBold,"__esModule",{value:!0}),scriptBold.scriptBold=void 0,scriptBold.scriptBold={},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.scriptBold=void 0;var e=scriptBold;Object.defineProperty(t,"scriptBold",{enumerable:!0,get:function(){return e.scriptBold}})}(scriptBold$1),getDefaultExportFromCjs(scriptBold$1);var script$1={},script={};Object.defineProperty(script,"__esModule",{value:!0}),script.script=void 0,script.script={},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.script=void 0;var e=script;Object.defineProperty(t,"script",{enumerable:!0,get:function(){return e.script}})}(script$1),getDefaultExportFromCjs(script$1);var smallop$1={},smallop={};Object.defineProperty(smallop,"__esModule",{value:!0}),smallop.smallop=void 0,smallop.smallop={40:[.85,.349,.458],41:[.85,.349,.458],47:[.85,.349,.578],91:[.85,.349,.417],92:[.85,.349,.578],93:[.85,.349,.417],123:[.85,.349,.583],125:[.85,.349,.583],710:[.744,-.551,.556],732:[.722,-.597,.556],770:[.744,-.551,0],771:[.722,-.597,0],8214:[.602,0,.778],8260:[.85,.349,.578],8593:[.6,0,.667],8595:[.6,0,.667],8657:[.599,0,.778],8659:[.6,0,.778],8719:[.75,.25,.944],8720:[.75,.25,.944],8721:[.75,.25,1.056],8730:[.85,.35,1,{ic:.02}],8739:[.627,.015,.333],8741:[.627,.015,.556],8747:[.805,.306,.472,{ic:.138}],8748:[.805,.306,.819,{ic:.138}],8749:[.805,.306,1.166,{ic:.138}],8750:[.805,.306,.472,{ic:.138}],8896:[.75,.249,.833],8897:[.75,.249,.833],8898:[.75,.249,.833],8899:[.75,.249,.833],8968:[.85,.349,.472],8969:[.85,.349,.472],8970:[.85,.349,.472],8971:[.85,.349,.472],9001:[.85,.35,.472],9002:[.85,.35,.472],9168:[.602,0,.667],10072:[.627,.015,.333],10216:[.85,.35,.472],10217:[.85,.35,.472],10752:[.75,.25,1.111],10753:[.75,.25,1.111],10754:[.75,.25,1.111],10756:[.75,.249,.833],10758:[.75,.249,.833],10764:[.805,.306,1.638,{ic:.138}],12296:[.85,.35,.472],12297:[.85,.35,.472]},Object.defineProperty(smallop$1,"__esModule",{value:!0}),smallop$1.smallop=void 0;var FontData_js_1$5=FontData,smallop_js_1$1=smallop;smallop$1.smallop=(0,FontData_js_1$5.AddCSS)(smallop_js_1$1.smallop,{8260:{c:"/"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},10072:{c:"\\2223"},10764:{c:"\\222C\\222C"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}});var texCalligraphicBold$1={},texCalligraphicBold={};Object.defineProperty(texCalligraphicBold,"__esModule",{value:!0}),texCalligraphicBold.texCalligraphicBold=void 0,texCalligraphicBold.texCalligraphicBold={65:[.751,.049,.921,{ic:.068,sk:.224}],66:[.705,.017,.748,{sk:.16}],67:[.703,.02,.613,{sk:.16}],68:[.686,0,.892,{sk:.0958}],69:[.703,.016,.607,{ic:.02,sk:.128}],70:[.686,.03,.814,{ic:.116,sk:.128}],71:[.703,.113,.682,{sk:.128}],72:[.686,.048,.987,{sk:.128}],73:[.686,0,.642,{ic:.104,sk:.0319}],74:[.686,.114,.779,{ic:.158,sk:.192}],75:[.703,.017,.871,{sk:.0639}],76:[.703,.017,.788,{sk:.16}],77:[.703,.049,1.378,{sk:.16}],78:[.84,.049,.937,{ic:.168,sk:.0958}],79:[.703,.017,.906,{sk:.128}],80:[.686,.067,.81,{ic:.036,sk:.0958}],81:[.703,.146,.939,{sk:.128}],82:[.686,.017,.99,{sk:.0958}],83:[.703,.016,.696,{ic:.025,sk:.16}],84:[.72,.069,.644,{ic:.303,sk:.0319}],85:[.686,.024,.715,{ic:.056,sk:.0958}],86:[.686,.077,.737,{ic:.037,sk:.0319}],87:[.686,.077,1.169,{ic:.037,sk:.0958}],88:[.686,0,.817,{ic:.089,sk:.16}],89:[.686,.164,.759,{ic:.038,sk:.0958}],90:[.686,0,.818,{ic:.035,sk:.16}],305:[.452,.008,.394,{sk:.0319}],567:[.451,.201,.439,{sk:.0958}]},Object.defineProperty(texCalligraphicBold$1,"__esModule",{value:!0}),texCalligraphicBold$1.texCalligraphicBold=void 0;var FontData_js_1$4=FontData,tex_calligraphic_bold_js_1$1=texCalligraphicBold;texCalligraphicBold$1.texCalligraphicBold=(0,FontData_js_1$4.AddCSS)(tex_calligraphic_bold_js_1$1.texCalligraphicBold,{305:{f:"B"},567:{f:"B"}});var texCalligraphic$1={},texCalligraphic={};Object.defineProperty(texCalligraphic,"__esModule",{value:!0}),texCalligraphic.texCalligraphic=void 0,texCalligraphic.texCalligraphic={65:[.728,.05,.798,{ic:.021,sk:.194}],66:[.705,.022,.657,{sk:.139}],67:[.705,.025,.527,{sk:.139}],68:[.683,0,.771,{sk:.0833}],69:[.705,.022,.528,{ic:.036,sk:.111}],70:[.683,.032,.719,{ic:.11,sk:.111}],71:[.704,.119,.595,{sk:.111}],72:[.683,.048,.845,{sk:.111}],73:[.683,0,.545,{ic:.097,sk:.0278}],74:[.683,.119,.678,{ic:.161,sk:.167}],75:[.705,.022,.762,{sk:.0556}],76:[.705,.022,.69,{sk:.139}],77:[.705,.05,1.201,{sk:.139}],78:[.789,.05,.82,{ic:.159,sk:.0833}],79:[.705,.022,.796,{sk:.111}],80:[.683,.057,.696,{ic:.037,sk:.0833}],81:[.705,.131,.817,{sk:.111}],82:[.682,.022,.848,{sk:.0833}],83:[.705,.022,.606,{ic:.036,sk:.139}],84:[.717,.068,.545,{ic:.288,sk:.0278}],85:[.683,.028,.626,{ic:.061,sk:.0833}],86:[.683,.052,.613,{ic:.045,sk:.0278}],87:[.683,.053,.988,{ic:.046,sk:.0833}],88:[.683,0,.713,{ic:.094,sk:.139}],89:[.683,.143,.668,{ic:.046,sk:.0833}],90:[.683,0,.725,{ic:.042,sk:.139}]},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.texCalligraphic=void 0;var e=texCalligraphic;Object.defineProperty(t,"texCalligraphic",{enumerable:!0,get:function(){return e.texCalligraphic}})}(texCalligraphic$1),getDefaultExportFromCjs(texCalligraphic$1);var texMathit$1={},texMathit={};Object.defineProperty(texMathit,"__esModule",{value:!0}),texMathit.texMathit=void 0,texMathit.texMathit={65:[.716,0,.743],66:[.683,0,.704],67:[.705,.021,.716],68:[.683,0,.755],69:[.68,0,.678],70:[.68,0,.653],71:[.705,.022,.774],72:[.683,0,.743],73:[.683,0,.386],74:[.683,.021,.525],75:[.683,0,.769],76:[.683,0,.627],77:[.683,0,.897],78:[.683,0,.743],79:[.704,.022,.767],80:[.683,0,.678],81:[.704,.194,.767],82:[.683,.022,.729],83:[.705,.022,.562],84:[.677,0,.716],85:[.683,.022,.743],86:[.683,.022,.743],87:[.683,.022,.999],88:[.683,0,.743],89:[.683,0,.743],90:[.683,0,.613],97:[.442,.011,.511],98:[.694,.011,.46],99:[.441,.01,.46],100:[.694,.011,.511],101:[.442,.01,.46],102:[.705,.204,.307],103:[.442,.205,.46],104:[.694,.011,.511],105:[.656,.01,.307],106:[.656,.204,.307],107:[.694,.011,.46],108:[.694,.011,.256],109:[.442,.011,.818],110:[.442,.011,.562],111:[.442,.011,.511],112:[.442,.194,.511],113:[.442,.194,.46],114:[.442,.011,.422],115:[.442,.011,.409],116:[.626,.011,.332],117:[.441,.011,.537],118:[.443,.01,.46],119:[.443,.011,.664],120:[.442,.011,.464],121:[.441,.205,.486],122:[.442,.011,.409]},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.texMathit=void 0;var e=texMathit;Object.defineProperty(t,"texMathit",{enumerable:!0,get:function(){return e.texMathit}})}(texMathit$1),getDefaultExportFromCjs(texMathit$1);var texOldstyleBold$1={},texOldstyleBold={};Object.defineProperty(texOldstyleBold,"__esModule",{value:!0}),texOldstyleBold.texOldstyleBold=void 0,texOldstyleBold.texOldstyleBold={48:[.46,.017,.575],49:[.461,0,.575],50:[.46,0,.575],51:[.461,.211,.575],52:[.469,.194,.575],53:[.461,.211,.575],54:[.66,.017,.575],55:[.476,.211,.575],56:[.661,.017,.575],57:[.461,.21,.575],65:[.751,.049,.921,{ic:.068,sk:.224}],66:[.705,.017,.748,{sk:.16}],67:[.703,.02,.613,{sk:.16}],68:[.686,0,.892,{sk:.0958}],69:[.703,.016,.607,{ic:.02,sk:.128}],70:[.686,.03,.814,{ic:.116,sk:.128}],71:[.703,.113,.682,{sk:.128}],72:[.686,.048,.987,{sk:.128}],73:[.686,0,.642,{ic:.104,sk:.0319}],74:[.686,.114,.779,{ic:.158,sk:.192}],75:[.703,.017,.871,{sk:.0639}],76:[.703,.017,.788,{sk:.16}],77:[.703,.049,1.378,{sk:.16}],78:[.84,.049,.937,{ic:.168,sk:.0958}],79:[.703,.017,.906,{sk:.128}],80:[.686,.067,.81,{ic:.036,sk:.0958}],81:[.703,.146,.939,{sk:.128}],82:[.686,.017,.99,{sk:.0958}],83:[.703,.016,.696,{ic:.025,sk:.16}],84:[.72,.069,.644,{ic:.303,sk:.0319}],85:[.686,.024,.715,{ic:.056,sk:.0958}],86:[.686,.077,.737,{ic:.037,sk:.0319}],87:[.686,.077,1.169,{ic:.037,sk:.0958}],88:[.686,0,.817,{ic:.089,sk:.16}],89:[.686,.164,.759,{ic:.038,sk:.0958}],90:[.686,0,.818,{ic:.035,sk:.16}]},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.texOldstyleBold=void 0;var e=texOldstyleBold;Object.defineProperty(t,"texOldstyleBold",{enumerable:!0,get:function(){return e.texOldstyleBold}})}(texOldstyleBold$1),getDefaultExportFromCjs(texOldstyleBold$1);var texOldstyle$1={},texOldstyle={};Object.defineProperty(texOldstyle,"__esModule",{value:!0}),texOldstyle.texOldstyle=void 0,texOldstyle.texOldstyle={48:[.452,.022,.5],49:[.453,0,.5],50:[.453,0,.5],51:[.452,.216,.5],52:[.464,.194,.5],53:[.453,.216,.5],54:[.665,.022,.5],55:[.463,.216,.5],56:[.666,.021,.5],57:[.453,.216,.5],65:[.728,.05,.798,{ic:.021,sk:.194}],66:[.705,.022,.657,{sk:.139}],67:[.705,.025,.527,{sk:.139}],68:[.683,0,.771,{sk:.0833}],69:[.705,.022,.528,{ic:.036,sk:.111}],70:[.683,.032,.719,{ic:.11,sk:.111}],71:[.704,.119,.595,{sk:.111}],72:[.683,.048,.845,{sk:.111}],73:[.683,0,.545,{ic:.097,sk:.0278}],74:[.683,.119,.678,{ic:.161,sk:.167}],75:[.705,.022,.762,{sk:.0556}],76:[.705,.022,.69,{sk:.139}],77:[.705,.05,1.201,{sk:.139}],78:[.789,.05,.82,{ic:.159,sk:.0833}],79:[.705,.022,.796,{sk:.111}],80:[.683,.057,.696,{ic:.037,sk:.0833}],81:[.705,.131,.817,{sk:.111}],82:[.682,.022,.848,{sk:.0833}],83:[.705,.022,.606,{ic:.036,sk:.139}],84:[.717,.068,.545,{ic:.288,sk:.0278}],85:[.683,.028,.626,{ic:.061,sk:.0833}],86:[.683,.052,.613,{ic:.045,sk:.0278}],87:[.683,.053,.988,{ic:.046,sk:.0833}],88:[.683,0,.713,{ic:.094,sk:.139}],89:[.683,.143,.668,{ic:.046,sk:.0833}],90:[.683,0,.725,{ic:.042,sk:.139}]},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.texOldstyle=void 0;var e=texOldstyle;Object.defineProperty(t,"texOldstyle",{enumerable:!0,get:function(){return e.texOldstyle}})}(texOldstyle$1),getDefaultExportFromCjs(texOldstyle$1);var texSize3$1={},texSize3={};Object.defineProperty(texSize3,"__esModule",{value:!0}),texSize3.texSize3=void 0,texSize3.texSize3={40:[1.45,.949,.736],41:[1.45,.949,.736],47:[1.45,.949,1.044],91:[1.45,.949,.528],92:[1.45,.949,1.044],93:[1.45,.949,.528],123:[1.45,.949,.75],125:[1.45,.949,.75],710:[.772,-.564,1.444],732:[.749,-.61,1.444],770:[.772,-.564,0],771:[.749,-.61,0],8260:[1.45,.949,1.044],8730:[1.45,.95,1,{ic:.02}],8968:[1.45,.949,.583],8969:[1.45,.949,.583],8970:[1.45,.949,.583],8971:[1.45,.949,.583],9001:[1.45,.95,.75],9002:[1.45,.949,.75],10216:[1.45,.95,.75],10217:[1.45,.949,.75],12296:[1.45,.95,.75],12297:[1.45,.949,.75]},Object.defineProperty(texSize3$1,"__esModule",{value:!0}),texSize3$1.texSize3=void 0;var FontData_js_1$3=FontData,tex_size3_js_1$1=texSize3;texSize3$1.texSize3=(0,FontData_js_1$3.AddCSS)(tex_size3_js_1$1.texSize3,{8260:{c:"/"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},12296:{c:"\\27E8"},12297:{c:"\\27E9"}});var texSize4$1={},texSize4={};Object.defineProperty(texSize4,"__esModule",{value:!0}),texSize4.texSize4=void 0,texSize4.texSize4={40:[1.75,1.249,.792],41:[1.75,1.249,.792],47:[1.75,1.249,1.278],91:[1.75,1.249,.583],92:[1.75,1.249,1.278],93:[1.75,1.249,.583],123:[1.75,1.249,.806],125:[1.75,1.249,.806],710:[.845,-.561,1.889,{ic:.013}],732:[.823,-.583,1.889],770:[.845,-.561,0,{ic:.013}],771:[.823,-.583,0],8260:[1.75,1.249,1.278],8730:[1.75,1.25,1,{ic:.02}],8968:[1.75,1.249,.639],8969:[1.75,1.249,.639],8970:[1.75,1.249,.639],8971:[1.75,1.249,.639],9001:[1.75,1.248,.806],9002:[1.75,1.248,.806],9115:[1.154,.655,.875],9116:[.61,.01,.875],9117:[1.165,.644,.875],9118:[1.154,.655,.875],9119:[.61,.01,.875],9120:[1.165,.644,.875],9121:[1.154,.645,.667],9122:[.602,0,.667],9123:[1.155,.644,.667],9124:[1.154,.645,.667],9125:[.602,0,.667],9126:[1.155,.644,.667],9127:[.899,.01,.889],9128:[1.16,.66,.889],9129:[.01,.899,.889],9130:[.29,.015,.889],9131:[.899,.01,.889],9132:[1.16,.66,.889],9133:[.01,.899,.889],9143:[.935,.885,1.056],10216:[1.75,1.248,.806],10217:[1.75,1.248,.806],12296:[1.75,1.248,.806],12297:[1.75,1.248,.806],57344:[.625,.014,1.056],57345:[.605,.014,1.056,{ic:.02}],57680:[.12,.213,.45,{ic:.01}],57681:[.12,.213,.45,{ic:.024}],57682:[.333,0,.45,{ic:.01}],57683:[.333,0,.45,{ic:.024}],57684:[.32,.2,.4,{ic:.01}],57685:[.333,0,.9,{ic:.01}],57686:[.12,.213,.9,{ic:.01}]},Object.defineProperty(texSize4$1,"__esModule",{value:!0}),texSize4$1.texSize4=void 0;var FontData_js_1$2=FontData,tex_size4_js_1$1=texSize4;texSize4$1.texSize4=(0,FontData_js_1$2.AddCSS)(tex_size4_js_1$1.texSize4,{8260:{c:"/"},9001:{c:"\\27E8"},9002:{c:"\\27E9"},12296:{c:"\\27E8"},12297:{c:"\\27E9"},57685:{c:"\\E153\\E152"},57686:{c:"\\E151\\E150"}});var texVariant$1={},texVariant={};Object.defineProperty(texVariant,"__esModule",{value:!0}),texVariant.texVariant=void 0,texVariant.texVariant={710:[.845,-.561,2.333,{ic:.013}],732:[.899,-.628,2.333],770:[.845,-.561,0,{ic:.013}],771:[.899,-.628,0],1008:[.434,.006,.667,{ic:.067}],8463:[.695,.013,.54,{ic:.022}],8592:[.437,-.064,.5],8594:[.437,-.064,.5],8652:[.514,.014,1],8708:[.86,.166,.556],8709:[.587,0,.778],8722:[.27,-.23,.5],8726:[.43,.023,.778],8733:[.472,-.028,.778],8739:[.43,.023,.222],8740:[.43,.023,.222,{ic:.018}],8741:[.431,.023,.389],8742:[.431,.024,.389,{ic:.018}],8764:[.365,-.132,.778],8776:[.481,-.05,.778],8808:[.752,.284,.778],8809:[.752,.284,.778],8816:[.919,.421,.778],8817:[.919,.421,.778],8840:[.828,.33,.778],8841:[.828,.33,.778],8842:[.634,.255,.778],8843:[.634,.254,.778],8872:[.694,0,.611],8901:[.189,0,.278],8994:[.378,-.122,.778],8995:[.378,-.143,.778],9651:[.575,.02,.722],9661:[.576,.019,.722],10887:[.801,.303,.778],10888:[.801,.303,.778],10955:[.752,.332,.778],10956:[.752,.333,.778]},Object.defineProperty(texVariant$1,"__esModule",{value:!0}),texVariant$1.texVariant=void 0;var FontData_js_1$1=FontData,tex_variant_js_1$1=texVariant;texVariant$1.texVariant=(0,FontData_js_1$1.AddCSS)(tex_variant_js_1$1.texVariant,{1008:{c:"\\E009"},8463:{f:""},8740:{c:"\\E006"},8742:{c:"\\E007"},8808:{c:"\\E00C"},8809:{c:"\\E00D"},8816:{c:"\\E011"},8817:{c:"\\E00E"},8840:{c:"\\E016"},8841:{c:"\\E018"},8842:{c:"\\E01A"},8843:{c:"\\E01B"},10887:{c:"\\E010"},10888:{c:"\\E00F"},10955:{c:"\\E017"},10956:{c:"\\E019"}});var delimiters={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.delimiters=t.VSIZES=t.HDW3=t.HDW2=t.HDW1=void 0;var e=FontData$2;t.HDW1=[.75,.25,.875],t.HDW2=[.85,.349,.667],t.HDW3=[.583,.082,.5],t.VSIZES=[1,1.2,1.8,2.4,3];var r={c:47,dir:e.V,sizes:t.VSIZES},n={c:175,dir:e.H,sizes:[.5],stretch:[0,175],HDW:[.59,-.544,.5]},o={c:710,dir:e.H,sizes:[.5,.556,1,1.444,1.889]},i={c:732,dir:e.H,sizes:[.5,.556,1,1.444,1.889]},a={c:8211,dir:e.H,sizes:[.5],stretch:[0,8211],HDW:[.285,-.248,.5]},s={c:8592,dir:e.H,sizes:[1],stretch:[8592,8722],HDW:t.HDW3},l={c:8594,dir:e.H,sizes:[1],stretch:[0,8722,8594],HDW:t.HDW3},c={c:8596,dir:e.H,sizes:[1],stretch:[8592,8722,8594],HDW:t.HDW3},u={c:8612,dir:e.H,stretch:[8592,8722,8739],HDW:t.HDW3,min:1.278},d={c:8614,dir:e.H,sizes:[1],stretch:[8739,8722,8594],HDW:t.HDW3},p={c:8656,dir:e.H,sizes:[1],stretch:[8656,61],HDW:t.HDW3},m={c:8658,dir:e.H,sizes:[1],stretch:[0,61,8658],HDW:t.HDW3},h={c:8660,dir:e.H,sizes:[1],stretch:[8656,61,8658],HDW:t.HDW3},f={c:8722,dir:e.H,sizes:[.778],stretch:[0,8722],HDW:t.HDW3},_={c:8739,dir:e.V,sizes:[1],stretch:[0,8739],HDW:[.627,.015,.333]},g={c:9180,dir:e.H,sizes:[.778,1],schar:[8994,8994],variants:[5,0],stretch:[57680,57684,57681],HDW:[.32,.2,.5]},y={c:9181,dir:e.H,sizes:[.778,1],schar:[8995,8995],variants:[5,0],stretch:[57682,57684,57683],HDW:[.32,.2,.5]},b={c:9182,dir:e.H,stretch:[57680,57684,57681,57685],HDW:[.32,.2,.5],min:1.8},v={c:9183,dir:e.H,stretch:[57682,57684,57683,57686],HDW:[.32,.2,.5],min:1.8},x={c:10216,dir:e.V,sizes:t.VSIZES},M={c:10217,dir:e.V,sizes:t.VSIZES},S={c:10502,dir:e.H,stretch:[8656,61,8739],HDW:t.HDW3,min:1.278},E={c:10503,dir:e.H,stretch:[8872,61,8658],HDW:t.HDW3,min:1.278};t.delimiters={40:{dir:e.V,sizes:t.VSIZES,stretch:[9115,9116,9117],HDW:[.85,.349,.875]},41:{dir:e.V,sizes:t.VSIZES,stretch:[9118,9119,9120],HDW:[.85,.349,.875]},45:f,47:r,61:{dir:e.H,sizes:[.778],stretch:[0,61],HDW:t.HDW3},91:{dir:e.V,sizes:t.VSIZES,stretch:[9121,9122,9123],HDW:t.HDW2},92:{dir:e.V,sizes:t.VSIZES},93:{dir:e.V,sizes:t.VSIZES,stretch:[9124,9125,9126],HDW:t.HDW2},94:o,95:a,123:{dir:e.V,sizes:t.VSIZES,stretch:[9127,9130,9129,9128],HDW:[.85,.349,.889]},124:{dir:e.V,sizes:[1],stretch:[0,8739],HDW:[.75,.25,.333]},125:{dir:e.V,sizes:t.VSIZES,stretch:[9131,9130,9133,9132],HDW:[.85,.349,.889]},126:i,175:n,710:o,713:n,732:i,770:o,771:i,818:a,8211:a,8212:a,8213:a,8214:{dir:e.V,sizes:[.602,1],schar:[0,8741],variants:[1,0],stretch:[0,8741],HDW:[.602,0,.556]},8215:a,8254:n,8407:l,8592:s,8593:{dir:e.V,sizes:[.888],stretch:[8593,9168],HDW:[.6,0,.667]},8594:l,8595:{dir:e.V,sizes:[.888],stretch:[0,9168,8595],HDW:[.6,0,.667]},8596:c,8597:{dir:e.V,sizes:[1.044],stretch:[8593,9168,8595],HDW:t.HDW1},8606:{dir:e.H,sizes:[1],stretch:[8606,8722],HDW:t.HDW3},8608:{dir:e.H,sizes:[1],stretch:[0,8722,8608],HDW:t.HDW3},8612:u,8613:{dir:e.V,stretch:[8593,9168,8869],HDW:t.HDW1,min:1.555},8614:d,8615:{dir:e.V,stretch:[8868,9168,8595],HDW:t.HDW1,min:1.555},8624:{dir:e.V,sizes:[.722],stretch:[8624,9168],HDW:t.HDW1},8625:{dir:e.V,sizes:[.722],stretch:[8625,9168],HDW:t.HDW1},8636:{dir:e.H,sizes:[1],stretch:[8636,8722],HDW:t.HDW3},8637:{dir:e.H,sizes:[1],stretch:[8637,8722],HDW:t.HDW3},8638:{dir:e.V,sizes:[.888],stretch:[8638,9168],HDW:t.HDW1},8639:{dir:e.V,sizes:[.888],stretch:[8639,9168],HDW:t.HDW1},8640:{dir:e.H,sizes:[1],stretch:[0,8722,8640],HDW:t.HDW3},8641:{dir:e.H,sizes:[1],stretch:[0,8722,8641],HDW:t.HDW3},8642:{dir:e.V,sizes:[.888],stretch:[0,9168,8642],HDW:t.HDW1},8643:{dir:e.V,sizes:[.888],stretch:[0,9168,8643],HDW:t.HDW1},8656:p,8657:{dir:e.V,sizes:[.888],stretch:[8657,8214],HDW:[.599,0,.778]},8658:m,8659:{dir:e.V,sizes:[.888],stretch:[0,8214,8659],HDW:[.6,0,.778]},8660:h,8661:{dir:e.V,sizes:[1.044],stretch:[8657,8214,8659],HDW:[.75,.25,.778]},8666:{dir:e.H,sizes:[1],stretch:[8666,8801],HDW:[.464,-.036,.5]},8667:{dir:e.H,sizes:[1],stretch:[0,8801,8667],HDW:[.464,-.036,.5]},8722:f,8725:r,8730:{dir:e.V,sizes:t.VSIZES,stretch:[57345,57344,9143],fullExt:[.65,2.3],HDW:[.85,.35,1.056]},8739:_,8741:{dir:e.V,sizes:[1],stretch:[0,8741],HDW:[.627,.015,.556]},8968:{dir:e.V,sizes:t.VSIZES,stretch:[9121,9122],HDW:t.HDW2},8969:{dir:e.V,sizes:t.VSIZES,stretch:[9124,9125],HDW:t.HDW2},8970:{dir:e.V,sizes:t.VSIZES,stretch:[0,9122,9123],HDW:t.HDW2},8971:{dir:e.V,sizes:t.VSIZES,stretch:[0,9125,9126],HDW:t.HDW2},8978:g,8994:g,8995:y,9001:x,9002:M,9130:{dir:e.V,sizes:[.32],stretch:[9130,9130,9130],HDW:[.29,.015,.889]},9135:a,9136:{dir:e.V,sizes:[.989],stretch:[9127,9130,9133],HDW:[.75,.25,.889]},9137:{dir:e.V,sizes:[.989],stretch:[9131,9130,9129],HDW:[.75,.25,.889]},9140:{dir:e.H,stretch:[9484,8722,9488],HDW:t.HDW3,min:1},9141:{dir:e.H,stretch:[9492,8722,9496],HDW:t.HDW3,min:1},9168:{dir:e.V,sizes:[.602,1],schar:[0,8739],variants:[1,0],stretch:[0,8739],HDW:[.602,0,.333]},9180:g,9181:y,9182:b,9183:v,9184:{dir:e.H,stretch:[714,713,715],HDW:[.59,-.544,.5],min:1},9185:{dir:e.H,stretch:[715,713,714],HDW:[.59,-.544,.5],min:1},9472:a,10072:_,10216:x,10217:M,10222:{dir:e.V,sizes:[.989],stretch:[9127,9130,9129],HDW:[.75,.25,.889]},10223:{dir:e.V,sizes:[.989],stretch:[9131,9130,9133],HDW:[.75,.25,.889]},10229:s,10230:l,10231:c,10232:p,10233:m,10234:h,10235:u,10236:d,10237:S,10238:E,10502:S,10503:E,10574:{dir:e.H,stretch:[8636,8722,8640],HDW:t.HDW3,min:2},10575:{dir:e.V,stretch:[8638,9168,8642],HDW:t.HDW1,min:1.776},10576:{dir:e.H,stretch:[8637,8722,8641],HDW:t.HDW3,min:2},10577:{dir:e.V,stretch:[8639,9168,8643],HDW:t.HDW1,min:.5},10586:{dir:e.H,stretch:[8636,8722,8739],HDW:t.HDW3,min:1.278},10587:{dir:e.H,stretch:[8739,8722,8640],HDW:t.HDW3,min:1.278},10588:{dir:e.V,stretch:[8638,9168,8869],HDW:t.HDW1,min:1.556},10589:{dir:e.V,stretch:[8868,9168,8642],HDW:t.HDW1,min:1.556},10590:{dir:e.H,stretch:[8637,8722,8739],HDW:t.HDW3,min:1.278},10591:{dir:e.H,stretch:[8739,8722,8641],HDW:t.HDW3,min:1.278},10592:{dir:e.V,stretch:[8639,9168,8869],HDW:t.HDW1,min:1.776},10593:{dir:e.V,stretch:[8868,9168,8643],HDW:t.HDW1,min:1.776},12296:x,12297:M,65079:b,65080:v}}(delimiters),getDefaultExportFromCjs(delimiters);var __extends$k=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$3=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$3=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$3.apply(this,arguments)};Object.defineProperty(tex$1,"__esModule",{value:!0}),tex$1.TeXFont=void 0;var FontData_js_1=FontData,tex_js_1$1=tex,bold_italic_js_1=boldItalic$1,bold_js_1=bold$1,double_struck_js_1=doubleStruck$1,fraktur_bold_js_1=frakturBold$1,fraktur_js_1=fraktur$1,italic_js_1=italic$1,largeop_js_1=largeop$1,monospace_js_1=monospace$1,normal_js_1=normal$1,sans_serif_bold_italic_js_1=sansSerifBoldItalic$1,sans_serif_bold_js_1=sansSerifBold$1,sans_serif_italic_js_1=sansSerifItalic$1,sans_serif_js_1=sansSerif$1,script_bold_js_1=scriptBold$1,script_js_1=script$1,smallop_js_1=smallop$1,tex_calligraphic_bold_js_1=texCalligraphicBold$1,tex_calligraphic_js_1=texCalligraphic$1,tex_mathit_js_1=texMathit$1,tex_oldstyle_bold_js_1=texOldstyleBold$1,tex_oldstyle_js_1=texOldstyle$1,tex_size3_js_1=texSize3$1,tex_size4_js_1=texSize4$1,tex_variant_js_1=texVariant$1,delimiters_js_1=delimiters,TeXFont=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$k(e,t),e.defaultCssFamilyPrefix="MJXZERO",e.defaultVariantClasses={normal:"mjx-n",bold:"mjx-b",italic:"mjx-i","bold-italic":"mjx-b mjx-i","double-struck":"mjx-ds mjx-b",fraktur:"mjx-fr","bold-fraktur":"mjx-fr mjx-b",script:"mjx-sc mjx-i","bold-script":"mjx-sc mjx-b mjx-i","sans-serif":"mjx-ss","bold-sans-serif":"mjx-ss mjx-b","sans-serif-italic":"mjx-ss mjx-i","sans-serif-bold-italic":"mjx-ss mjx-b mjx-i",monospace:"mjx-ty","-smallop":"mjx-sop","-largeop":"mjx-lop","-size3":"mjx-s3","-size4":"mjx-s4","-tex-calligraphic":"mjx-cal mjx-i","-tex-bold-calligraphic":"mjx-cal mjx-b","-tex-mathit":"mjx-mit mjx-i","-tex-oldstyle":"mjx-os","-tex-bold-oldstyle":"mjx-os mjx-b","-tex-variant":"mjx-var"},e.defaultVariantLetters={normal:"",bold:"B",italic:"MI","bold-italic":"BI","double-struck":"A",fraktur:"FR","bold-fraktur":"FRB",script:"SC","bold-script":"SCB","sans-serif":"SS","bold-sans-serif":"SSB","sans-serif-italic":"SSI","sans-serif-bold-italic":"SSBI",monospace:"T","-smallop":"S1","-largeop":"S2","-size3":"S3","-size4":"S4","-tex-calligraphic":"C","-tex-bold-calligraphic":"CB","-tex-mathit":"MI","-tex-oldstyle":"C","-tex-bold-oldstyle":"CB","-tex-variant":"A"},e.defaultDelimiters=delimiters_js_1.delimiters,e.defaultChars={normal:normal_js_1.normal,bold:bold_js_1.bold,italic:italic_js_1.italic,"bold-italic":bold_italic_js_1.boldItalic,"double-struck":double_struck_js_1.doubleStruck,fraktur:fraktur_js_1.fraktur,"bold-fraktur":fraktur_bold_js_1.frakturBold,script:script_js_1.script,"bold-script":script_bold_js_1.scriptBold,"sans-serif":sans_serif_js_1.sansSerif,"bold-sans-serif":sans_serif_bold_js_1.sansSerifBold,"sans-serif-italic":sans_serif_italic_js_1.sansSerifItalic,"sans-serif-bold-italic":sans_serif_bold_italic_js_1.sansSerifBoldItalic,monospace:monospace_js_1.monospace,"-smallop":smallop_js_1.smallop,"-largeop":largeop_js_1.largeop,"-size3":tex_size3_js_1.texSize3,"-size4":tex_size4_js_1.texSize4,"-tex-calligraphic":tex_calligraphic_js_1.texCalligraphic,"-tex-bold-calligraphic":tex_calligraphic_bold_js_1.texCalligraphicBold,"-tex-mathit":tex_mathit_js_1.texMathit,"-tex-oldstyle":tex_oldstyle_js_1.texOldstyle,"-tex-bold-oldstyle":tex_oldstyle_bold_js_1.texOldstyleBold,"-tex-variant":tex_variant_js_1.texVariant},e.defaultStyles=__assign$3(__assign$3({},FontData_js_1.CHTMLFontData.defaultStyles),{".MJX-TEX":{"font-family":"MJXZERO, MJXTEX"},".TEX-B":{"font-family":"MJXZERO, MJXTEX-B"},".TEX-I":{"font-family":"MJXZERO, MJXTEX-I"},".TEX-MI":{"font-family":"MJXZERO, MJXTEX-MI"},".TEX-BI":{"font-family":"MJXZERO, MJXTEX-BI"},".TEX-S1":{"font-family":"MJXZERO, MJXTEX-S1"},".TEX-S2":{"font-family":"MJXZERO, MJXTEX-S2"},".TEX-S3":{"font-family":"MJXZERO, MJXTEX-S3"},".TEX-S4":{"font-family":"MJXZERO, MJXTEX-S4"},".TEX-A":{"font-family":"MJXZERO, MJXTEX-A"},".TEX-C":{"font-family":"MJXZERO, MJXTEX-C"},".TEX-CB":{"font-family":"MJXZERO, MJXTEX-CB"},".TEX-FR":{"font-family":"MJXZERO, MJXTEX-FR"},".TEX-FRB":{"font-family":"MJXZERO, MJXTEX-FRB"},".TEX-SS":{"font-family":"MJXZERO, MJXTEX-SS"},".TEX-SSB":{"font-family":"MJXZERO, MJXTEX-SSB"},".TEX-SSI":{"font-family":"MJXZERO, MJXTEX-SSI"},".TEX-SC":{"font-family":"MJXZERO, MJXTEX-SC"},".TEX-T":{"font-family":"MJXZERO, MJXTEX-T"},".TEX-V":{"font-family":"MJXZERO, MJXTEX-V"},".TEX-VB":{"font-family":"MJXZERO, MJXTEX-VB"},"mjx-stretchy-v mjx-c, mjx-stretchy-h mjx-c":{"font-family":"MJXZERO, MJXTEX-S1, MJXTEX-S4, MJXTEX, MJXTEX-A ! important"}}),e.defaultFonts=__assign$3(__assign$3({},FontData_js_1.CHTMLFontData.defaultFonts),{"@font-face /* 1 */":{"font-family":"MJXTEX",src:'url("%%URL%%/MathJax_Main-Regular.woff") format("woff")'},"@font-face /* 2 */":{"font-family":"MJXTEX-B",src:'url("%%URL%%/MathJax_Main-Bold.woff") format("woff")'},"@font-face /* 3 */":{"font-family":"MJXTEX-I",src:'url("%%URL%%/MathJax_Math-Italic.woff") format("woff")'},"@font-face /* 4 */":{"font-family":"MJXTEX-MI",src:'url("%%URL%%/MathJax_Main-Italic.woff") format("woff")'},"@font-face /* 5 */":{"font-family":"MJXTEX-BI",src:'url("%%URL%%/MathJax_Math-BoldItalic.woff") format("woff")'},"@font-face /* 6 */":{"font-family":"MJXTEX-S1",src:'url("%%URL%%/MathJax_Size1-Regular.woff") format("woff")'},"@font-face /* 7 */":{"font-family":"MJXTEX-S2",src:'url("%%URL%%/MathJax_Size2-Regular.woff") format("woff")'},"@font-face /* 8 */":{"font-family":"MJXTEX-S3",src:'url("%%URL%%/MathJax_Size3-Regular.woff") format("woff")'},"@font-face /* 9 */":{"font-family":"MJXTEX-S4",src:'url("%%URL%%/MathJax_Size4-Regular.woff") format("woff")'},"@font-face /* 10 */":{"font-family":"MJXTEX-A",src:'url("%%URL%%/MathJax_AMS-Regular.woff") format("woff")'},"@font-face /* 11 */":{"font-family":"MJXTEX-C",src:'url("%%URL%%/MathJax_Calligraphic-Regular.woff") format("woff")'},"@font-face /* 12 */":{"font-family":"MJXTEX-CB",src:'url("%%URL%%/MathJax_Calligraphic-Bold.woff") format("woff")'},"@font-face /* 13 */":{"font-family":"MJXTEX-FR",src:'url("%%URL%%/MathJax_Fraktur-Regular.woff") format("woff")'},"@font-face /* 14 */":{"font-family":"MJXTEX-FRB",src:'url("%%URL%%/MathJax_Fraktur-Bold.woff") format("woff")'},"@font-face /* 15 */":{"font-family":"MJXTEX-SS",src:'url("%%URL%%/MathJax_SansSerif-Regular.woff") format("woff")'},"@font-face /* 16 */":{"font-family":"MJXTEX-SSB",src:'url("%%URL%%/MathJax_SansSerif-Bold.woff") format("woff")'},"@font-face /* 17 */":{"font-family":"MJXTEX-SSI",src:'url("%%URL%%/MathJax_SansSerif-Italic.woff") format("woff")'},"@font-face /* 18 */":{"font-family":"MJXTEX-SC",src:'url("%%URL%%/MathJax_Script-Regular.woff") format("woff")'},"@font-face /* 19 */":{"font-family":"MJXTEX-T",src:'url("%%URL%%/MathJax_Typewriter-Regular.woff") format("woff")'},"@font-face /* 20 */":{"font-family":"MJXTEX-V",src:'url("%%URL%%/MathJax_Vector-Regular.woff") format("woff")'},"@font-face /* 21 */":{"font-family":"MJXTEX-VB",src:'url("%%URL%%/MathJax_Vector-Bold.woff") format("woff")'}}),e}((0,tex_js_1$1.CommonTeXFontMixin)(FontData_js_1.CHTMLFontData));tex$1.TeXFont=TeXFont;var __extends$j=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$2=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$2=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$2.apply(this,arguments)},__createBinding$6=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$6=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$6=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$6(e,t,r);return __setModuleDefault$6(e,t),e},__values$a=commonjsGlobal&&commonjsGlobal.__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(chtml,"__esModule",{value:!0});var CHTML_1=chtml.CHTML=void 0,OutputJax_js_1=OutputJax$1,StyleList_js_1=StyleList,WrapperFactory_js_1=WrapperFactory$2,Usage_js_1=Usage$1,tex_js_1=tex$1,LENGTHS=__importStar$6(lengths),string_js_1=string,CHTML=function(t){function e(e){void 0===e&&(e=null);var r=t.call(this,e,WrapperFactory_js_1.CHTMLWrapperFactory,tex_js_1.TeXFont)||this;return r.chtmlStyles=null,r.font.adaptiveCSS(r.options.adaptiveCSS),r.wrapperUsage=new Usage_js_1.Usage,r}return __extends$j(e,t),e.prototype.escaped=function(t,e){return this.setDocument(e),this.html("span",{},[this.text(t.math)])},e.prototype.styleSheet=function(r){if(this.chtmlStyles){if(this.options.adaptiveCSS){var n=new StyleList_js_1.CssStyles;this.addWrapperStyles(n),this.updateFontStyles(n),this.adaptor.insertRules(this.chtmlStyles,n.getStyleRules())}return this.chtmlStyles}var o=this.chtmlStyles=t.prototype.styleSheet.call(this,r);return this.adaptor.setAttribute(o,"id",e.STYLESHEETID),this.wrapperUsage.update(),o},e.prototype.updateFontStyles=function(t){t.addStyles(this.font.updateStyles({}))},e.prototype.addWrapperStyles=function(e){var r,n;if(this.options.adaptiveCSS)try{for(var o=__values$a(this.wrapperUsage.update()),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.factory.getNodeClass(a);s&&this.addClassStyles(s,e)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}else t.prototype.addWrapperStyles.call(this,e)},e.prototype.addClassStyles=function(e,r){var n,o=e;o.autoStyle&&"unknown"!==o.kind&&r.addStyles(((n={})["mjx-"+o.kind]={display:"inline-block","text-align":"left"},n)),this.wrapperUsage.add(o.kind),t.prototype.addClassStyles.call(this,e,r)},e.prototype.processMath=function(t,e){this.factory.wrap(t).toCHTML(e)},e.prototype.clearCache=function(){this.cssStyles.clear(),this.font.clearCache(),this.wrapperUsage.clear(),this.chtmlStyles=null},e.prototype.reset=function(){this.clearCache()},e.prototype.unknownText=function(t,e,r){void 0===r&&(r=null);var n={},o=100/this.math.metrics.scale;if(100!==o&&(n["font-size"]=this.fixed(o,1)+"%",n.padding=LENGTHS.em(75/o)+" 0 "+LENGTHS.em(20/o)+" 0"),"-explicitFont"!==e){var i=(0,string_js_1.unicodeChars)(t);(1!==i.length||i[0]<119808||i[0]>120831)&&this.cssFontStyles(this.font.getCssFont(e),n)}if(null!==r){var a=this.math.metrics;n.width=Math.round(r*a.em*a.scale)+"px"}return this.html("mjx-utext",{variant:e,style:n},[this.text(t)])},e.prototype.measureTextNode=function(t){var e=this.adaptor,r=e.clone(t);e.setStyle(r,"font-family",e.getStyle(r,"font-family").replace(/MJXZERO, /g,""));var n=this.html("mjx-measure-text",{style:{position:"absolute","white-space":"nowrap"}},[r]);e.append(e.parent(this.math.start.node),this.container),e.append(this.container,n);var o=e.nodeSize(r,this.math.metrics.em)[0]/this.math.metrics.scale;return e.remove(this.container),e.remove(n),{w:o,h:.75,d:.2}},e.NAME="CHTML",e.OPTIONS=__assign$2(__assign$2({},OutputJax_js_1.CommonOutputJax.OPTIONS),{adaptiveCSS:!0,matchFontHeight:!0}),e.commonStyles={'mjx-container[jax="CHTML"]':{"line-height":0},'mjx-container [space="1"]':{"margin-left":".111em"},'mjx-container [space="2"]':{"margin-left":".167em"},'mjx-container [space="3"]':{"margin-left":".222em"},'mjx-container [space="4"]':{"margin-left":".278em"},'mjx-container [space="5"]':{"margin-left":".333em"},'mjx-container [rspace="1"]':{"margin-right":".111em"},'mjx-container [rspace="2"]':{"margin-right":".167em"},'mjx-container [rspace="3"]':{"margin-right":".222em"},'mjx-container [rspace="4"]':{"margin-right":".278em"},'mjx-container [rspace="5"]':{"margin-right":".333em"},'mjx-container [size="s"]':{"font-size":"70.7%"},'mjx-container [size="ss"]':{"font-size":"50%"},'mjx-container [size="Tn"]':{"font-size":"60%"},'mjx-container [size="sm"]':{"font-size":"85%"},'mjx-container [size="lg"]':{"font-size":"120%"},'mjx-container [size="Lg"]':{"font-size":"144%"},'mjx-container [size="LG"]':{"font-size":"173%"},'mjx-container [size="hg"]':{"font-size":"207%"},'mjx-container [size="HG"]':{"font-size":"249%"},'mjx-container [width="full"]':{width:"100%"},"mjx-box":{display:"inline-block"},"mjx-block":{display:"block"},"mjx-itable":{display:"inline-table"},"mjx-row":{display:"table-row"},"mjx-row > *":{display:"table-cell"},"mjx-mtext":{display:"inline-block"},"mjx-mstyle":{display:"inline-block"},"mjx-merror":{display:"inline-block",color:"red","background-color":"yellow"},"mjx-mphantom":{visibility:"hidden"},"_::-webkit-full-page-media, _:future, :root mjx-container":{"will-change":"opacity"}},e.STYLESHEETID="MJX-CHTML-styles",e}(OutputJax_js_1.CommonOutputJax);CHTML_1=chtml.CHTML=CHTML;var html={},HTMLHandler$1={},Handler={},MathDocument={},MathList={},LinkedList={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},o=commonjsGlobal&&commonjsGlobal.__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(t,"__esModule",{value:!0}),t.LinkedList=t.ListItem=t.END=void 0,t.END=Symbol();var i=function(t){void 0===t&&(t=null),this.next=null,this.prev=null,this.data=t};t.ListItem=i;var a=function(){function a(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];this.list=new i(t.END),this.list.next=this.list.prev=this.list,this.push.apply(this,n([],r(e),!1))}return a.prototype.isBefore=function(t,e){return t<e},a.prototype.push=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var a=o(r),s=a.next();!s.done;s=a.next()){var l=s.value,c=new i(l);c.next=this.list,c.prev=this.list.prev,this.list.prev=c,c.prev.next=c}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return this},a.prototype.pop=function(){var e=this.list.prev;return e.data===t.END?null:(this.list.prev=e.prev,e.prev.next=this.list,e.next=e.prev=null,e.data)},a.prototype.unshift=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var a=o(r.slice(0).reverse()),s=a.next();!s.done;s=a.next()){var l=s.value,c=new i(l);c.next=this.list.next,c.prev=this.list,this.list.next=c,c.next.prev=c}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return this},a.prototype.shift=function(){var e=this.list.next;return e.data===t.END?null:(this.list.next=e.next,e.next.prev=this.list,e.next=e.prev=null,e.data)},a.prototype.remove=function(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=new Map;try{for(var s=o(n),l=s.next();!l.done;l=s.next()){var c=l.value;a.set(c,!0)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}for(var u=this.list.next;u.data!==t.END;){var d=u.next;a.has(u.data)&&(u.prev.next=u.next,u.next.prev=u.prev,u.next=u.prev=null),u=d}},a.prototype.clear=function(){return this.list.next.prev=this.list.prev.next=null,this.list.next=this.list.prev=this.list,this},a.prototype[Symbol.iterator]=function(){var r;return e(this,(function(e){switch(e.label){case 0:r=this.list.next,e.label=1;case 1:return r.data===t.END?[3,3]:[4,r.data];case 2:return e.sent(),r=r.next,[3,1];case 3:return[2]}}))},a.prototype.reversed=function(){var r;return e(this,(function(e){switch(e.label){case 0:r=this.list.prev,e.label=1;case 1:return r.data===t.END?[3,3]:[4,r.data];case 2:return e.sent(),r=r.prev,[3,1];case 3:return[2]}}))},a.prototype.insert=function(e,r){void 0===r&&(r=null),null===r&&(r=this.isBefore.bind(this));for(var n=new i(e),o=this.list.next;o.data!==t.END&&r(o.data,n.data);)o=o.next;return n.prev=o.prev,n.next=o,o.prev.next=o.prev=n,this},a.prototype.sort=function(t){var e,r;void 0===t&&(t=null),null===t&&(t=this.isBefore.bind(this));var n=[];try{for(var i=o(this),s=i.next();!s.done;s=i.next()){var l=s.value;n.push(new a(l))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}for(this.list.next=this.list.prev=this.list;n.length>1;){var c=n.shift(),u=n.shift();c.merge(u,t),n.push(c)}return n.length&&(this.list=n[0].list),this},a.prototype.merge=function(e,n){var o,i,a,s,l;void 0===n&&(n=null),null===n&&(n=this.isBefore.bind(this));for(var c=this.list.next,u=e.list.next;c.data!==t.END&&u.data!==t.END;)n(u.data,c.data)?(o=r([c,u],2),u.prev.next=o[0],c.prev.next=o[1],i=r([c.prev,u.prev],2),u.prev=i[0],c.prev=i[1],a=r([e.list,this.list],2),this.list.prev.next=a[0],e.list.prev.next=a[1],s=r([e.list.prev,this.list.prev],2),this.list.prev=s[0],e.list.prev=s[1],c=(l=r([u.next,c],2))[0],u=l[1]):c=c.next;return u.data!==t.END&&(this.list.prev.next=e.list.next,e.list.next.prev=this.list.prev,e.list.prev.next=this.list,this.list.prev=e.list.prev,e.list.next=e.list.prev=e.list),this},a}();t.LinkedList=a}(LinkedList),getDefaultExportFromCjs(LinkedList);var __extends$i=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(MathList,"__esModule",{value:!0}),MathList.AbstractMathList=void 0;var LinkedList_js_1=LinkedList,AbstractMathList=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$i(e,t),e.prototype.isBefore=function(t,e){return t.start.i<e.start.i||t.start.i===e.start.i&&t.start.n<e.start.n},e}(LinkedList_js_1.LinkedList);MathList.AbstractMathList=AbstractMathList;var BitField$1={},__extends$h=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$9=commonjsGlobal&&commonjsGlobal.__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.")},__read$7=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$2=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(BitField$1,"__esModule",{value:!0}),BitField$1.BitFieldClass=BitField$1.BitField=void 0;var BitField=function(){function t(){this.bits=0}return t.allocate=function(){for(var e,r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var i=__values$9(n),a=i.next();!a.done;a=i.next()){var s=a.value;if(this.has(s))throw new Error("Bit already allocated for "+s);if(this.next===t.MAXBIT)throw new Error("Maximum number of bits already allocated");this.names.set(s,this.next),this.next<<=1}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},t.has=function(t){return this.names.has(t)},t.prototype.set=function(t){this.bits|=this.getBit(t)},t.prototype.clear=function(t){this.bits&=~this.getBit(t)},t.prototype.isSet=function(t){return!!(this.bits&this.getBit(t))},t.prototype.reset=function(){this.bits=0},t.prototype.getBit=function(t){var e=this.constructor.names.get(t);if(!e)throw new Error("Unknown bit-field name: "+t);return e},t.MAXBIT=1<<31,t.next=1,t.names=new Map,t}();function BitFieldClass(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$h(e,t),e}(BitField);return r.allocate.apply(r,__spreadArray$2([],__read$7(t),!1)),r}BitField$1.BitField=BitField,BitField$1.BitFieldClass=BitFieldClass,function(t){var e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},o=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMathDocument=t.resetAllOptions=t.resetOptions=t.RenderList=void 0;var i=Options,a=InputJax,s=OutputJax,l=MathList,c=MathItem,u=MmlFactory$1,d=BitField$1,p=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.create=function(t){var e,o,i=new this;try{for(var a=r(Object.keys(t)),s=a.next();!s.done;s=a.next()){var l=s.value,c=n(this.action(l,t[l]),2),u=c[0],d=c[1];d&&i.add(u,d)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(e)throw e.error}}return i},o.action=function(t,e){var r,o,i,a,s,l,c=!0,u=e[0];if(1===e.length||"boolean"==typeof e[1])2===e.length&&(c=e[1]),s=(r=n(this.methodActions(t),2))[0],l=r[1];else if("string"==typeof e[1])if("string"==typeof e[2]){4===e.length&&(c=e[3]);var d=n(e.slice(1),2),p=d[0],m=d[1];s=(o=n(this.methodActions(p,m),2))[0],l=o[1]}else 3===e.length&&(c=e[2]),s=(i=n(this.methodActions(e[1]),2))[0],l=i[1];else 4===e.length&&(c=e[3]),s=(a=n(e.slice(1),2))[0],l=a[1];return[{id:t,renderDoc:s,renderMath:l,convert:c},u]},o.methodActions=function(t,e){return void 0===e&&(e=t),[function(e){return t&&e[t](),!1},function(t,r){return e&&t[e](r),!1}]},o.prototype.renderDoc=function(t,e){var n,o;void 0===e&&(e=c.STATE.UNPROCESSED);try{for(var i=r(this.items),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.priority>=e&&s.item.renderDoc(t))return}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},o.prototype.renderMath=function(t,e,n){var o,i;void 0===n&&(n=c.STATE.UNPROCESSED);try{for(var a=r(this.items),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.priority>=n&&l.item.renderMath(t,e))return}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},o.prototype.renderConvert=function(t,e,n){var o,i;void 0===n&&(n=c.STATE.LAST);try{for(var a=r(this.items),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.priority>n)return;if(l.item.convert&&l.item.renderMath(t,e))return}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},o.prototype.findID=function(t){var e,n;try{for(var o=r(this.items),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.item.id===t)return a.item}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return null},o}(PrioritizedList$1.PrioritizedList);t.RenderList=p,t.resetOptions={all:!1,processed:!1,inputJax:null,outputJax:null},t.resetAllOptions={all:!0,processed:!0,inputJax:[],outputJax:[]};var m=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.compile=function(t){return null},r}(a.AbstractInputJax),h=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.typeset=function(t,e){return null},r.prototype.escaped=function(t,e){return null},r}(s.AbstractOutputJax),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(l.AbstractMathList),_=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(c.AbstractMathItem),g=function(){function e(t,r,n){var o=this,a=this.constructor;this.document=t,this.options=(0,i.userOptions)((0,i.defaultOptions)({},a.OPTIONS),n),this.math=new(this.options.MathList||f),this.renderActions=p.create(this.options.renderActions),this.processed=new e.ProcessBits,this.outputJax=this.options.OutputJax||new h;var s=this.options.InputJax||[new m];Array.isArray(s)||(s=[s]),this.inputJax=s,this.adaptor=r,this.outputJax.setAdaptor(r),this.inputJax.map((function(t){return t.setAdaptor(r)})),this.mmlFactory=this.options.MmlFactory||new u.MmlFactory,this.inputJax.map((function(t){return t.setMmlFactory(o.mmlFactory)})),this.outputJax.initialize(),this.inputJax.map((function(t){return t.initialize()}))}return Object.defineProperty(e.prototype,"kind",{get:function(){return this.constructor.KIND},enumerable:!1,configurable:!0}),e.prototype.addRenderAction=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=n(p.action(t,e),2),i=o[0],a=o[1];this.renderActions.add(i,a)},e.prototype.removeRenderAction=function(t){var e=this.renderActions.findID(t);e&&this.renderActions.remove(e)},e.prototype.render=function(){return this.renderActions.renderDoc(this),this},e.prototype.rerender=function(t){return void 0===t&&(t=c.STATE.RERENDER),this.state(t-1),this.render(),this},e.prototype.convert=function(t,e){void 0===e&&(e={});var r=(0,i.userOptions)({format:this.inputJax[0].name,display:!0,end:c.STATE.LAST,em:16,ex:8,containerWidth:null,lineWidth:1e6,scale:1,family:""},e),n=r.format,o=r.display,a=r.end,s=r.ex,l=r.em,u=r.containerWidth,d=r.lineWidth,p=r.scale,m=r.family;null===u&&(u=80*s);var h=this.inputJax.reduce((function(t,e){return e.name===n?e:t}),null),f=new this.options.MathItem(t,h,o);return f.start.node=this.adaptor.body(this.document),f.setMetrics(l,s,u,d,p),this.outputJax.options.mtextInheritFont&&(f.outputData.mtextFamily=m),this.outputJax.options.merrorInheritFont&&(f.outputData.merrorFamily=m),f.convert(this,a),f.typesetRoot||f.root},e.prototype.findMath=function(t){return this.processed.set("findMath"),this},e.prototype.compile=function(){var t,e,n,o;if(!this.processed.isSet("compile")){var i=[];try{for(var a=r(this.math),s=a.next();!s.done;s=a.next()){var l=s.value;this.compileMath(l),void 0!==l.inputData.recompile&&i.push(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var c=r(i),u=c.next();!u.done;u=c.next()){var d=(l=u.value).inputData.recompile;l.state(d.state),l.inputData.recompile=d,this.compileMath(l)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.processed.set("compile")}return this},e.prototype.compileMath=function(t){try{t.compile(this)}catch(e){if(e.retry||e.restart)throw e;this.options.compileError(this,t,e),t.inputData.error=e}},e.prototype.compileError=function(t,e){t.root=this.mmlFactory.create("math",null,[this.mmlFactory.create("merror",{"data-mjx-error":e.message,title:e.message},[this.mmlFactory.create("mtext",null,[this.mmlFactory.create("text").setText("Math input error")])])]),t.display&&t.root.attributes.set("display","block"),t.inputData.error=e.message},e.prototype.typeset=function(){var t,e;if(!this.processed.isSet("typeset")){try{for(var n=r(this.math),o=n.next();!o.done;o=n.next()){var i=o.value;try{i.typeset(this)}catch(t){if(t.retry||t.restart)throw t;this.options.typesetError(this,i,t),i.outputData.error=t}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.processed.set("typeset")}return this},e.prototype.typesetError=function(t,e){t.typesetRoot=this.adaptor.node("mjx-container",{class:"MathJax mjx-output-error",jax:this.outputJax.name},[this.adaptor.node("span",{"data-mjx-error":e.message,title:e.message,style:{color:"red","background-color":"yellow","line-height":"normal"}},[this.adaptor.text("Math output error")])]),t.display&&this.adaptor.setAttributes(t.typesetRoot,{style:{display:"block",margin:"1em 0","text-align":"center"}}),t.outputData.error=e.message},e.prototype.getMetrics=function(){return this.processed.isSet("getMetrics")||(this.outputJax.getMetrics(this),this.processed.set("getMetrics")),this},e.prototype.updateDocument=function(){var t,e;if(!this.processed.isSet("updateDocument")){try{for(var n=r(this.math.reversed()),o=n.next();!o.done;o=n.next()){o.value.updateDocument(this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.processed.set("updateDocument")}return this},e.prototype.removeFromDocument=function(t){return this},e.prototype.state=function(t,e){var n,o;void 0===e&&(e=!1);try{for(var i=r(this.math),a=i.next();!a.done;a=i.next()){a.value.state(t,e)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return t<c.STATE.INSERTED&&this.processed.clear("updateDocument"),t<c.STATE.TYPESET&&(this.processed.clear("typeset"),this.processed.clear("getMetrics")),t<c.STATE.COMPILED&&this.processed.clear("compile"),this},e.prototype.reset=function(e){var r;return void 0===e&&(e={processed:!0}),(e=(0,i.userOptions)(Object.assign({},t.resetOptions),e)).all&&Object.assign(e,t.resetAllOptions),e.processed&&this.processed.reset(),e.inputJax&&this.inputJax.forEach((function(t){return t.reset.apply(t,o([],n(e.inputJax),!1))})),e.outputJax&&(r=this.outputJax).reset.apply(r,o([],n(e.outputJax),!1)),this},e.prototype.clear=function(){return this.reset(),this.math.clear(),this},e.prototype.concat=function(t){return this.math.merge(t),this},e.prototype.clearMathItemsWithin=function(t){var e,r=this.getMathItemsWithin(t);return(e=this.math).remove.apply(e,o([],n(r),!1)),r},e.prototype.getMathItemsWithin=function(t){var e,n,o,i;Array.isArray(t)||(t=[t]);var a=this.adaptor,s=[],l=a.getElements(t,this.document);try{t:for(var c=r(this.math),u=c.next();!u.done;u=c.next()){var d=u.value;try{for(var p=(o=void 0,r(l)),m=p.next();!m.done;m=p.next()){var h=m.value;if(d.start.node&&a.contains(h,d.start.node)){s.push(d);continue t}}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}return s},e.KIND="MathDocument",e.OPTIONS={OutputJax:null,InputJax:null,MmlFactory:null,MathList:f,MathItem:_,compileError:function(t,e,r){t.compileError(e,r)},typesetError:function(t,e,r){t.typesetError(e,r)},renderActions:(0,i.expandable)({find:[c.STATE.FINDMATH,"findMath","",!1],compile:[c.STATE.COMPILED],metrics:[c.STATE.METRICS,"getMetrics","",!1],typeset:[c.STATE.TYPESET],update:[c.STATE.INSERTED,"updateDocument",!1]})},e.ProcessBits=(0,d.BitFieldClass)("findMath","compile","getMetrics","typeset","updateDocument"),e}();t.AbstractMathDocument=g}(MathDocument),getDefaultExportFromCjs(MathDocument);var __extends$g=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Handler,"__esModule",{value:!0}),Handler.AbstractHandler=void 0;var MathDocument_js_1$1=MathDocument,DefaultMathDocument=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$g(e,t),e}(MathDocument_js_1$1.AbstractMathDocument),AbstractHandler=function(){function t(t,e){void 0===e&&(e=5),this.documentClass=DefaultMathDocument,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}();Handler.AbstractHandler=AbstractHandler;var HTMLDocument$1={},HTMLMathItem$1={},__extends$f=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(HTMLMathItem$1,"__esModule",{value:!0}),HTMLMathItem$1.HTMLMathItem=void 0;var MathItem_js_1$1=MathItem,HTMLMathItem=function(t){function e(e,r,n,o,i){return void 0===n&&(n=!0),void 0===o&&(o={node:null,n:0,delim:""}),void 0===i&&(i={node:null,n:0,delim:""}),t.call(this,e,r,n,o,i)||this}return __extends$f(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()<MathItem_js_1$1.STATE.INSERTED){if(this.inputJax.processStrings){var e=this.start.node;if(e===this.end.node)this.end.n&&this.end.n<this.adaptor.value(this.end.node).length&&this.adaptor.split(this.end.node,this.end.n),this.start.n&&(e=this.adaptor.split(this.start.node,this.start.n)),this.adaptor.replace(this.typesetRoot,e);else{for(this.start.n&&(e=this.adaptor.split(e,this.start.n));e!==this.end.node;){var r=this.adaptor.next(e);this.adaptor.remove(e),e=r}this.adaptor.insert(this.typesetRoot,e),this.end.n<this.adaptor.value(e).length&&this.adaptor.split(e,this.end.n),this.adaptor.remove(e)}}else this.adaptor.replace(this.typesetRoot,this.start.node);this.start.node=this.end.node=this.typesetRoot,this.start.n=this.end.n=0,this.state(MathItem_js_1$1.STATE.INSERTED)}},e.prototype.updateStyleSheet=function(t){t.addStyleSheet()},e.prototype.removeFromDocument=function(t){if(void 0===t&&(t=!1),this.state()>=MathItem_js_1$1.STATE.TYPESET){var e=this.adaptor,r=this.start.node,n=e.text("");if(t){var o=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)n=e.text(o);else{var i=e.parse(o,"text/html");n=e.firstChild(e.body(i))}}e.parent(r)&&e.replace(n,r),this.start.node=this.end.node=n,this.start.n=this.end.n=0}},e}(MathItem_js_1$1.AbstractMathItem);HTMLMathItem$1.HTMLMathItem=HTMLMathItem;var HTMLMathList$1={},__extends$e=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(HTMLMathList$1,"__esModule",{value:!0}),HTMLMathList$1.HTMLMathList=void 0;var MathList_js_1=MathList,HTMLMathList=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$e(e,t),e}(MathList_js_1.AbstractMathList);HTMLMathList$1.HTMLMathList=HTMLMathList;var HTMLDomStrings$1={},__read$6=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a};Object.defineProperty(HTMLDomStrings$1,"__esModule",{value:!0});var HTMLDomStrings_2=HTMLDomStrings$1.HTMLDomStrings=void 0,Options_js_1$3=Options,HTMLDomStrings=function(){function t(t){void 0===t&&(t=null);var e=this.constructor;this.options=(0,Options_js_1$3.userOptions)((0,Options_js_1$3.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,Options_js_1$3.makeArray)(this.options.skipHtmlTags),e=(0,Options_js_1$3.makeArray)(this.options.ignoreHtmlClass),r=(0,Options_js_1$3.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)||"",o=this.processHtmlClass.exec(r),i=t;return!this.adaptor.firstChild(t)||this.adaptor.getAttribute(t,"data-MJX")||!o&&this.skipHtmlTags.exec(n)?i=this.adaptor.next(t):(this.adaptor.next(t)&&this.stack.push([this.adaptor.next(t),e]),i=this.adaptor.firstChild(t),e=(e||this.ignoreHtmlClass.exec(r))&&!o),[i,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 n=this.adaptor.next(t),o=!1,i=this.options.includeHtmlTags;t&&t!==n;){var a=this.adaptor.kind(t);"#text"===a?t=this.handleText(t,o):i.hasOwnProperty(a)?t=this.handleTag(t,o):a?(t=(e=__read$6(this.handleContainer(t,o),2))[0],o=e[1]):t=this.handleOther(t,o),!t&&this.stack.length&&(this.pushString(),t=(r=__read$6(this.stack.pop(),2))[0],o=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}();HTMLDomStrings_2=HTMLDomStrings$1.HTMLDomStrings=HTMLDomStrings;var __extends$d=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign$1=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$1=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign$1.apply(this,arguments)},__read$5=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__values$8=commonjsGlobal&&commonjsGlobal.__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(HTMLDocument$1,"__esModule",{value:!0}),HTMLDocument$1.HTMLDocument=void 0;var MathDocument_js_1=MathDocument,Options_js_1$2=Options,HTMLMathItem_js_1=HTMLMathItem$1,HTMLMathList_js_1=HTMLMathList$1,HTMLDomStrings_js_1=HTMLDomStrings$1,MathItem_js_1=MathItem,HTMLDocument=function(t){function e(e,r,n){var o=this,i=__read$5((0,Options_js_1$2.separateOptions)(n,HTMLDomStrings_js_1.HTMLDomStrings.OPTIONS),2),a=i[0],s=i[1];return(o=t.call(this,e,r,a)||this).domStrings=o.options.DomStrings||new HTMLDomStrings_js_1.HTMLDomStrings(s),o.domStrings.adaptor=r,o.styles=[],o}return __extends$d(e,t),e.prototype.findPosition=function(t,e,r,n){var o,i,a=this.adaptor;try{for(var s=__values$8(n[t]),l=s.next();!l.done;l=s.next()){var c=l.value,u=__read$5(c,2),d=u[0],p=u[1];if(e<=p&&"#text"===a.kind(d))return{node:d,n:Math.max(e,0),delim:r};e-=p}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return{node:null,n:0,delim:r}},e.prototype.mathItem=function(t,e,r){var n=t.math,o=this.findPosition(t.n,t.start.n,t.open,r),i=this.findPosition(t.n,t.end.n,t.close,r);return new this.options.MathItem(n,e,t.display,o,i)},e.prototype.findMath=function(t){var e,r,n,o,i,a,s,l,c;if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,t=(0,Options_js_1$2.userOptions)({elements:this.options.elements||[this.adaptor.body(this.document)]},t);try{for(var u=__values$8(this.adaptor.getElements(t.elements,this.document)),d=u.next();!d.done;d=u.next()){var p=d.value,m=__read$5([null,null],2),h=m[0],f=m[1];try{for(var _=(n=void 0,__values$8(this.inputJax)),g=_.next();!g.done;g=_.next()){var y=g.value,b=new this.options.MathList;if(y.processStrings){null===h&&(h=(i=__read$5(this.domStrings.find(p),2))[0],f=i[1]);try{for(var v=(a=void 0,__values$8(y.findMath(h))),x=v.next();!x.done;x=v.next()){var M=x.value;b.push(this.mathItem(M,y,f))}}catch(t){a={error:t}}finally{try{x&&!x.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}}else try{for(var S=(l=void 0,__values$8(y.findMath(p))),E=S.next();!E.done;E=S.next()){M=E.value;var C=new this.options.MathItem(M.math,y,M.display,M.start,M.end);b.push(C)}}catch(t){l={error:t}}finally{try{E&&!E.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}this.math.merge(b)}}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=_.return)&&o.call(_)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}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 o=__values$8(this.adaptor.tags(t,"style")),i=o.next();!i.done;i=o.next()){var a=i.value;if(this.adaptor.getAttribute(a,"id")===e)return a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}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=__values$8(this.math),o=n.next();!o.done;o=n.next()){var i=o.value;i.state()>=MathItem_js_1.STATE.INSERTED&&i.state(MathItem_js_1.STATE.TYPESET,t)}}catch(t){e={error:t}}finally{try{o&&!o.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=__assign$1(__assign$1({},MathDocument_js_1.AbstractMathDocument.OPTIONS),{renderActions:(0,Options_js_1$2.expandable)(__assign$1(__assign$1({},MathDocument_js_1.AbstractMathDocument.OPTIONS.renderActions),{styles:[MathItem_js_1.STATE.INSERTED+1,"","updateStyleSheet",!1]})),MathList:HTMLMathList_js_1.HTMLMathList,MathItem:HTMLMathItem_js_1.HTMLMathItem,DomStrings:null}),e}(MathDocument_js_1.AbstractMathDocument);HTMLDocument$1.HTMLDocument=HTMLDocument;var __extends$c=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(HTMLHandler$1,"__esModule",{value:!0}),HTMLHandler$1.HTMLHandler=void 0;var Handler_js_1=Handler,HTMLDocument_js_1=HTMLDocument$1,HTMLHandler=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.documentClass=HTMLDocument_js_1.HTMLDocument,e}return __extends$c(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 o=e;e=n.parse("","text/html"),n.append(n.body(e),o)}return t.prototype.create.call(this,e,r)},e}(Handler_js_1.AbstractHandler);HTMLHandler$1.HTMLHandler=HTMLHandler,Object.defineProperty(html,"__esModule",{value:!0});var RegisterHTMLHandler_1=html.RegisterHTMLHandler=void 0,mathjax_js_1=mathjax,HTMLHandler_js_1=HTMLHandler$1;function RegisterHTMLHandler(t){var e=new HTMLHandler_js_1.HTMLHandler(t);return mathjax_js_1.mathjax.handlers.register(e),e}RegisterHTMLHandler_1=html.RegisterHTMLHandler=RegisterHTMLHandler;var browserAdaptor$1={},HTMLAdaptor$1={},DOMAdaptor={},__values$7=commonjsGlobal&&commonjsGlobal.__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(DOMAdaptor,"__esModule",{value:!0}),DOMAdaptor.AbstractDOMAdaptor=void 0;var AbstractDOMAdaptor=function(){function t(t){void 0===t&&(t=null),this.document=t}return t.prototype.node=function(t,e,r,n){var o,i;void 0===e&&(e={}),void 0===r&&(r=[]);var a=this.create(t,n);this.setAttributes(a,e);try{for(var s=__values$7(r),l=s.next();!l.done;l=s.next()){var c=l.value;this.append(a,c)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a},t.prototype.setAttributes=function(t,e){var r,n,o,i,a,s;if(e.style&&"string"!=typeof e.style)try{for(var l=__values$7(Object.keys(e.style)),c=l.next();!c.done;c=l.next()){var u=c.value;this.setStyle(t,u.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()})),e.style[u])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(e.properties)try{for(var d=__values$7(Object.keys(e.properties)),p=d.next();!p.done;p=d.next()){t[u=p.value]=e.properties[u]}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}try{for(var m=__values$7(Object.keys(e)),h=m.next();!h.done;h=m.next()){"style"===(u=h.value)&&"string"!=typeof e.style||"properties"===u||this.setAttribute(t,u,e[u])}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.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}();DOMAdaptor.AbstractDOMAdaptor=AbstractDOMAdaptor;var __extends$b=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$6=commonjsGlobal&&commonjsGlobal.__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(HTMLAdaptor$1,"__esModule",{value:!0}),HTMLAdaptor$1.HTMLAdaptor=void 0;var DOMAdaptor_js_1=DOMAdaptor,HTMLAdaptor=function(t){function e(e){var r=t.call(this,e.document)||this;return r.window=e,r.parser=new e.DOMParser,r}return __extends$b(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?"<!DOCTYPE ".concat(t.doctype.name,">"):""},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,o=[];try{for(var i=__values$6(t),a=i.next();!a.done;a=i.next()){var s=a.value;"string"==typeof s?o=o.concat(Array.from(this.document.querySelectorAll(s))):Array.isArray(s)||s instanceof this.window.NodeList||s instanceof this.window.HTMLCollection?o=o.concat(Array.from(s)):o.push(s)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},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 o=__values$6(e.reverse()),i=o.next();!i.done;i=o.next()){var a=i.value;try{t.sheet.insertRule(a,0)}catch(t){console.warn("MathJax: can't insert css rule '".concat(a,"': ").concat(t.message))}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}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}(DOMAdaptor_js_1.AbstractDOMAdaptor);HTMLAdaptor$1.HTMLAdaptor=HTMLAdaptor,Object.defineProperty(browserAdaptor$1,"__esModule",{value:!0});var browserAdaptor_2=browserAdaptor$1.browserAdaptor=void 0,HTMLAdaptor_js_1=HTMLAdaptor$1;function browserAdaptor(){return new HTMLAdaptor_js_1.HTMLAdaptor(window)}browserAdaptor_2=browserAdaptor$1.browserAdaptor=browserAdaptor;var AllPackages={},ActionConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionConfiguration=t.ActionMethods=void 0;var r=Configuration,n=e(TexParser$1),o=SymbolMap,i=e(BaseMethods$1);t.ActionMethods={},t.ActionMethods.Macro=i.default.Macro,t.ActionMethods.Toggle=function(t,e){for(var r,o=[];"\\endtoggle"!==(r=t.GetArgument(e));)o.push(new n.default(r,t.stack.env,t.configuration).mml());t.Push(t.create("node","maction",o,{actiontype:"toggle"}))},t.ActionMethods.Mathtip=function(t,e){var r=t.ParseArg(e),n=t.ParseArg(e);t.Push(t.create("node","maction",[r,n],{actiontype:"tooltip"}))},new o.CommandMap("action-macros",{toggle:"Toggle",mathtip:"Mathtip",texttip:["Macro","\\mathtip{#1}{\\text{#2}}",2]},t.ActionMethods),t.ActionConfiguration=r.Configuration.create("action",{handler:{macro:["action-macros"]}})}(ActionConfiguration),getDefaultExportFromCjs(ActionConfiguration);var AmsConfiguration={},AmsItems={},__extends$a=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign.apply(this,arguments)},__importDefault$w=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AmsItems,"__esModule",{value:!0}),AmsItems.FlalignItem=AmsItems.MultlineItem=void 0;var BaseItems_js_1$4=BaseItems,ParseUtil_js_1$a=__importDefault$w(ParseUtil$1),NodeUtil_js_1$7=__importDefault$w(NodeUtil$1),TexError_js_1$d=__importDefault$w(TexError$1),TexConstants_js_1$8=TexConstants,MultlineItem=function(t){function e(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=t.call(this,e)||this;return o.factory.configuration.tags.start("multline",!0,r[0]),o}return __extends$a(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"multline"},enumerable:!1,configurable:!0}),e.prototype.EndEntry=function(){this.table.length&&ParseUtil_js_1$a.default.fixInitialMO(this.factory.configuration,this.nodes);var t=this.getProperty("shove"),e=this.create("node","mtd",this.nodes,t?{columnalign:t}:{});this.setProperty("shove",null),this.row.push(e),this.Clear()},e.prototype.EndRow=function(){if(1!==this.row.length)throw new TexError_js_1$d.default("MultlineRowsOneCol","The rows within the %1 environment must have exactly one column","multline");var t=this.create("node","mtr",this.row);this.table.push(t),this.row=[]},e.prototype.EndTable=function(){if(t.prototype.EndTable.call(this),this.table.length){var e=this.table.length-1,r=-1;NodeUtil_js_1$7.default.getAttribute(NodeUtil_js_1$7.default.getChildren(this.table[0])[0],"columnalign")||NodeUtil_js_1$7.default.setAttribute(NodeUtil_js_1$7.default.getChildren(this.table[0])[0],"columnalign",TexConstants_js_1$8.TexConstant.Align.LEFT),NodeUtil_js_1$7.default.getAttribute(NodeUtil_js_1$7.default.getChildren(this.table[e])[0],"columnalign")||NodeUtil_js_1$7.default.setAttribute(NodeUtil_js_1$7.default.getChildren(this.table[e])[0],"columnalign",TexConstants_js_1$8.TexConstant.Align.RIGHT);var n=this.factory.configuration.tags.getTag();if(n){r=this.arraydef.side===TexConstants_js_1$8.TexConstant.Align.LEFT?0:this.table.length-1;var o=this.table[r],i=this.create("node","mlabeledtr",[n].concat(NodeUtil_js_1$7.default.getChildren(o)));NodeUtil_js_1$7.default.copyAttributes(o,i),this.table[r]=i}}this.factory.configuration.tags.end()},e}(BaseItems_js_1$4.ArrayItem);AmsItems.MultlineItem=MultlineItem;var FlalignItem=function(t){function e(e,r,n,o,i){var a=t.call(this,e)||this;return a.name=r,a.numbered=n,a.padded=o,a.center=i,a.factory.configuration.tags.start(r,n,n),a}return __extends$a(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"flalign"},enumerable:!1,configurable:!0}),e.prototype.EndEntry=function(){t.prototype.EndEntry.call(this);var e=this.getProperty("xalignat");if(e&&this.row.length>e)throw new TexError_js_1$d.default("XalignOverflow","Extra %1 in row of %2","&",this.name)},e.prototype.EndRow=function(){for(var e,r=this.row,n=this.getProperty("xalignat");r.length<n;)r.push(this.create("node","mtd"));for(this.row=[],this.padded&&this.row.push(this.create("node","mtd"));e=r.shift();)this.row.push(e),(e=r.shift())&&this.row.push(e),(r.length||this.padded)&&this.row.push(this.create("node","mtd"));this.row.length>this.maxrow&&(this.maxrow=this.row.length),t.prototype.EndRow.call(this);var o=this.table[this.table.length-1];if(this.getProperty("zeroWidthLabel")&&o.isKind("mlabeledtr")){var i=NodeUtil_js_1$7.default.getChildren(o)[0],a=this.factory.configuration.options.tagSide,s=__assign({width:0},"right"===a?{lspace:"-1width"}:{}),l=this.create("node","mpadded",NodeUtil_js_1$7.default.getChildren(i),s);i.setChildren([l])}},e.prototype.EndTable=function(){(t.prototype.EndTable.call(this),this.center)&&(this.maxrow<=2&&(delete this.arraydef.width,delete this.global.indentalign))},e}(BaseItems_js_1$4.EqnArrayItem);AmsItems.FlalignItem=FlalignItem;var AmsMethods={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__assign||function(){return e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)},r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.NEW_OPS=t.AmsMethods=void 0;var o=n(ParseUtil$1),i=n(ParseMethods$1),a=n(NodeUtil$1),s=TexConstants,l=n(TexParser$1),c=n(TexError$1),u=_Symbol,d=n(BaseMethods$1),p=MmlNode;function m(t){if(!t||t.isInferred&&0===t.childNodes.length)return[null,null];if(t.isKind("msubsup")&&h(t))return[t,null];var e=a.default.getChildAt(t,0);return t.isInferred&&e&&h(e)?(t.childNodes.splice(0,1),[e,t]):[null,t]}function h(t){var e=t.childNodes[0];return e&&e.isKind("mi")&&""===e.getText()}t.AmsMethods={},t.AmsMethods.AmsEqnArray=function(t,e,r,n,i,a,s){var l=t.GetBrackets("\\begin{"+e.getName()+"}"),c=d.default.EqnArray(t,e,r,n,i,a,s);return o.default.setArrayAlign(c,l)},t.AmsMethods.AlignAt=function(e,r,n,i){var a,s,l=r.getName(),u="",d=[];if(i||(s=e.GetBrackets("\\begin{"+l+"}")),(a=e.GetArgument("\\begin{"+l+"}")).match(/[^0-9]/))throw new c.default("PositiveIntegerArg","Argument to %1 must me a positive integer","\\begin{"+l+"}");for(var p=parseInt(a,10);p>0;)u+="rl",d.push("0em 0em"),p--;var m=d.join(" ");if(i)return t.AmsMethods.EqnArray(e,r,n,i,u,m);var h=t.AmsMethods.EqnArray(e,r,n,i,u,m);return o.default.setArrayAlign(h,s)},t.AmsMethods.Multline=function(t,e,r){t.Push(e),o.default.checkEqnEnv(t);var n=t.itemFactory.create("multline",r,t.stack);return n.arraydef={displaystyle:!0,rowspacing:".5em",columnspacing:"100%",width:t.options.ams.multlineWidth,side:t.options.tagSide,minlabelspacing:t.options.tagIndent,framespacing:t.options.ams.multlineIndent+" 0",frame:"","data-width-includes-label":!0},n},t.AmsMethods.XalignAt=function(e,r,n,o){var i=e.GetArgument("\\begin{"+r.getName()+"}");if(i.match(/[^0-9]/))throw new c.default("PositiveIntegerArg","Argument to %1 must me a positive integer","\\begin{"+r.getName()+"}");var a=o?"crl":"rlc",s=o?"fit auto auto":"auto auto fit",l=t.AmsMethods.FlalignArray(e,r,n,o,!1,a,s,!0);return l.setProperty("xalignat",2*parseInt(i)),l},t.AmsMethods.FlalignArray=function(t,e,r,n,i,a,s,l){void 0===l&&(l=!1),t.Push(e),o.default.checkEqnEnv(t),a=a.split("").join(" ").replace(/r/g,"right").replace(/l/g,"left").replace(/c/g,"center");var c=t.itemFactory.create("flalign",e.getName(),r,n,i,t.stack);return c.arraydef={width:"100%",displaystyle:!0,columnalign:a,columnspacing:"0em",columnwidth:s,rowspacing:"3pt",side:t.options.tagSide,minlabelspacing:l?"0":t.options.tagIndent,"data-width-includes-label":!0},c.setProperty("zeroWidthLabel",l),c},t.NEW_OPS="ams-declare-ops",t.AmsMethods.HandleDeclareOp=function(e,r){var n=e.GetStar()?"*":"",i=o.default.trimSpaces(e.GetArgument(r));"\\"===i.charAt(0)&&(i=i.substr(1));var a=e.GetArgument(r);e.configuration.handlers.retrieve(t.NEW_OPS).add(i,new u.Macro(i,t.AmsMethods.Macro,["\\operatorname".concat(n,"{").concat(a,"}")]))},t.AmsMethods.HandleOperatorName=function(t,r){var n=t.GetStar(),i=o.default.trimSpaces(t.GetArgument(r)),c=new l.default(i,e(e({},t.stack.env),{font:s.TexConstant.Variant.NORMAL,multiLetterIdentifiers:/^[-*a-z]+/i,operatorLetters:!0}),t.configuration).mml();if(c.isKind("mi")||(c=t.create("node","TeXAtom",[c])),a.default.setProperties(c,{movesupsub:n,movablelimits:!0,texClass:p.TEXCLASS.OP}),!n){var u=t.GetNext(),d=t.i;"\\"===u&&++t.i&&"limits"!==t.GetCS()&&(t.i=d)}t.Push(c)},t.AmsMethods.SideSet=function(t,e){var n=r(m(t.ParseArg(e)),2),i=n[0],s=n[1],l=r(m(t.ParseArg(e)),2),c=l[0],u=l[1],d=t.ParseArg(e),h=d;i&&(s?i.replaceChild(t.create("node","mphantom",[t.create("node","mpadded",[o.default.copyNode(d,t)],{width:0})]),a.default.getChildAt(i,0)):(h=t.create("node","mmultiscripts",[d]),c&&a.default.appendChildren(h,[a.default.getChildAt(c,1)||t.create("node","none"),a.default.getChildAt(c,2)||t.create("node","none")]),a.default.setProperty(h,"scriptalign","left"),a.default.appendChildren(h,[t.create("node","mprescripts"),a.default.getChildAt(i,1)||t.create("node","none"),a.default.getChildAt(i,2)||t.create("node","none")]))),c&&h===d&&(c.replaceChild(d,a.default.getChildAt(c,0)),h=c);var f=t.create("node","TeXAtom",[],{texClass:p.TEXCLASS.OP,movesupsub:!0,movablelimits:!0});s&&(i&&f.appendChild(i),f.appendChild(s)),f.appendChild(h),u&&f.appendChild(u),t.Push(f)},t.AmsMethods.operatorLetter=function(t,e){return!!t.stack.env.operatorLetters&&i.default.variable(t,e)},t.AmsMethods.MultiIntegral=function(t,e,r){var n=t.GetNext();if("\\"===n){var o=t.i;n=t.GetArgument(e),t.i=o,"\\limits"===n&&(r="\\idotsint"===e?"\\!\\!\\mathop{\\,\\,"+r+"}":"\\!\\!\\!\\mathop{\\,\\,\\,"+r+"}")}t.string=r+" "+t.string.slice(t.i),t.i=0},t.AmsMethods.xArrow=function(t,e,r,n,i){var s={width:"+"+o.default.Em((n+i)/18),lspace:o.default.Em(n/18)},c=t.GetBrackets(e),u=t.ParseArg(e),d=t.create("node","mspace",[],{depth:".25em"}),m=t.create("token","mo",{stretchy:!0,texClass:p.TEXCLASS.REL},String.fromCodePoint(r));m=t.create("node","mstyle",[m],{scriptlevel:0});var h=t.create("node","munderover",[m]),f=t.create("node","mpadded",[u,d],s);if(a.default.setAttribute(f,"voffset","-.2em"),a.default.setAttribute(f,"height","-.2em"),a.default.setChild(h,h.over,f),c){var _=new l.default(c,t.stack.env,t.configuration).mml(),g=t.create("node","mspace",[],{height:".75em"});f=t.create("node","mpadded",[_,g],s),a.default.setAttribute(f,"voffset",".15em"),a.default.setAttribute(f,"depth","-.15em"),a.default.setChild(h,h.under,f)}a.default.setProperty(h,"subsupOK",!0),t.Push(h)},t.AmsMethods.HandleShove=function(t,e,r){var n=t.stack.Top();if("multline"!==n.kind)throw new c.default("CommandOnlyAllowedInEnv","%1 only allowed in %2 environment",t.currentCS,"multline");if(n.Size())throw new c.default("CommandAtTheBeginingOfLine","%1 must come at the beginning of the line",t.currentCS);n.setProperty("shove",r)},t.AmsMethods.CFrac=function(t,e){var r=o.default.trimSpaces(t.GetBrackets(e,"")),n=t.GetArgument(e),i=t.GetArgument(e),u={l:s.TexConstant.Align.LEFT,r:s.TexConstant.Align.RIGHT,"":""},d=new l.default("\\strut\\textstyle{"+n+"}",t.stack.env,t.configuration).mml(),p=new l.default("\\strut\\textstyle{"+i+"}",t.stack.env,t.configuration).mml(),m=t.create("node","mfrac",[d,p]);if(null==(r=u[r]))throw new c.default("IllegalAlign","Illegal alignment specified in %1",t.currentCS);r&&a.default.setProperties(m,{numalign:r,denomalign:r}),t.Push(m)},t.AmsMethods.Genfrac=function(t,e,r,n,i,s){null==r&&(r=t.GetDelimiterArg(e)),null==n&&(n=t.GetDelimiterArg(e)),null==i&&(i=t.GetArgument(e)),null==s&&(s=o.default.trimSpaces(t.GetArgument(e)));var l=t.ParseArg(e),u=t.ParseArg(e),d=t.create("node","mfrac",[l,u]);if(""!==i&&a.default.setAttribute(d,"linethickness",i),(r||n)&&(a.default.setProperty(d,"withDelims",!0),d=o.default.fixedFence(t.configuration,r,d,n)),""!==s){var p=parseInt(s,10),m=["D","T","S","SS"][p];if(null==m)throw new c.default("BadMathStyleFor","Bad math style for %1",t.currentCS);d=t.create("node","mstyle",[d]),"D"===m?a.default.setProperties(d,{displaystyle:!0,scriptlevel:0}):a.default.setProperties(d,{displaystyle:!1,scriptlevel:p-1})}t.Push(d)},t.AmsMethods.HandleTag=function(t,e){if(!t.tags.currentTag.taggable&&t.tags.env)throw new c.default("CommandNotAllowedInEnv","%1 not allowed in %2 environment",t.currentCS,t.tags.env);if(t.tags.currentTag.tag)throw new c.default("MultipleCommand","Multiple %1",t.currentCS);var r=t.GetStar(),n=o.default.trimSpaces(t.GetArgument(e));t.tags.tag(n,r)},t.AmsMethods.HandleNoTag=d.default.HandleNoTag,t.AmsMethods.HandleRef=d.default.HandleRef,t.AmsMethods.Macro=d.default.Macro,t.AmsMethods.Accent=d.default.Accent,t.AmsMethods.Tilde=d.default.Tilde,t.AmsMethods.Array=d.default.Array,t.AmsMethods.Spacer=d.default.Spacer,t.AmsMethods.NamedOp=d.default.NamedOp,t.AmsMethods.EqnArray=d.default.EqnArray,t.AmsMethods.Equation=d.default.Equation}(AmsMethods),getDefaultExportFromCjs(AmsMethods);var AmsMappings={},__createBinding$5=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$5=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$5=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$5(e,t,r);return __setModuleDefault$5(e,t),e},__importDefault$v=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AmsMappings,"__esModule",{value:!0});var AmsMethods_js_1$2=AmsMethods,sm$3=__importStar$5(SymbolMap),TexConstants_js_1$7=TexConstants,ParseMethods_js_1$6=__importDefault$v(ParseMethods$1),ParseUtil_js_1$9=__importDefault$v(ParseUtil$1),MmlNode_js_1$6=MmlNode,lengths_js_1$1=lengths;new sm$3.CharacterMap("AMSmath-mathchar0mo",ParseMethods_js_1$6.default.mathchar0mo,{iiiint:["⨌",{texClass:MmlNode_js_1$6.TEXCLASS.OP}]}),new sm$3.RegExpMap("AMSmath-operatorLetter",AmsMethods_js_1$2.AmsMethods.operatorLetter,/[-*]/i),new sm$3.CommandMap("AMSmath-macros",{mathring:["Accent","02DA"],nobreakspace:"Tilde",negmedspace:["Spacer",lengths_js_1$1.MATHSPACE.negativemediummathspace],negthickspace:["Spacer",lengths_js_1$1.MATHSPACE.negativethickmathspace],idotsint:["MultiIntegral","\\int\\cdots\\int"],dddot:["Accent","20DB"],ddddot:["Accent","20DC"],sideset:"SideSet",boxed:["Macro","\\fbox{$\\displaystyle{#1}$}",1],tag:"HandleTag",notag:"HandleNoTag",eqref:["HandleRef",!0],substack:["Macro","\\begin{subarray}{c}#1\\end{subarray}",1],injlim:["NamedOp","inj&thinsp;lim"],projlim:["NamedOp","proj&thinsp;lim"],varliminf:["Macro","\\mathop{\\underline{\\mmlToken{mi}{lim}}}"],varlimsup:["Macro","\\mathop{\\overline{\\mmlToken{mi}{lim}}}"],varinjlim:["Macro","\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}"],varprojlim:["Macro","\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}"],DeclareMathOperator:"HandleDeclareOp",operatorname:"HandleOperatorName",genfrac:"Genfrac",frac:["Genfrac","","","",""],tfrac:["Genfrac","","","","1"],dfrac:["Genfrac","","","","0"],binom:["Genfrac","(",")","0",""],tbinom:["Genfrac","(",")","0","1"],dbinom:["Genfrac","(",")","0","0"],cfrac:"CFrac",shoveleft:["HandleShove",TexConstants_js_1$7.TexConstant.Align.LEFT],shoveright:["HandleShove",TexConstants_js_1$7.TexConstant.Align.RIGHT],xrightarrow:["xArrow",8594,5,10],xleftarrow:["xArrow",8592,10,5]},AmsMethods_js_1$2.AmsMethods),new sm$3.EnvironmentMap("AMSmath-environment",ParseMethods_js_1$6.default.environment,{"equation*":["Equation",null,!1],"eqnarray*":["EqnArray",null,!1,!0,"rcl",ParseUtil_js_1$9.default.cols(0,lengths_js_1$1.MATHSPACE.thickmathspace),".5em"],align:["EqnArray",null,!0,!0,"rl",ParseUtil_js_1$9.default.cols(0,2)],"align*":["EqnArray",null,!1,!0,"rl",ParseUtil_js_1$9.default.cols(0,2)],multline:["Multline",null,!0],"multline*":["Multline",null,!1],split:["EqnArray",null,!1,!1,"rl",ParseUtil_js_1$9.default.cols(0)],gather:["EqnArray",null,!0,!0,"c"],"gather*":["EqnArray",null,!1,!0,"c"],alignat:["AlignAt",null,!0,!0],"alignat*":["AlignAt",null,!1,!0],alignedat:["AlignAt",null,!1,!1],aligned:["AmsEqnArray",null,null,null,"rl",ParseUtil_js_1$9.default.cols(0,2),".5em","D"],gathered:["AmsEqnArray",null,null,null,"c",null,".5em","D"],xalignat:["XalignAt",null,!0,!0],"xalignat*":["XalignAt",null,!1,!0],xxalignat:["XalignAt",null,!1,!1],flalign:["FlalignArray",null,!0,!1,!0,"rlc","auto auto fit"],"flalign*":["FlalignArray",null,!1,!1,!0,"rlc","auto auto fit"],subarray:["Array",null,null,null,null,ParseUtil_js_1$9.default.cols(0),"0.1em","S",1],smallmatrix:["Array",null,null,null,"c",ParseUtil_js_1$9.default.cols(1/3),".2em","S",1],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"]},AmsMethods_js_1$2.AmsMethods),new sm$3.DelimiterMap("AMSmath-delimiter",ParseMethods_js_1$6.default.delimiter,{"\\lvert":["|",{texClass:MmlNode_js_1$6.TEXCLASS.OPEN}],"\\rvert":["|",{texClass:MmlNode_js_1$6.TEXCLASS.CLOSE}],"\\lVert":["‖",{texClass:MmlNode_js_1$6.TEXCLASS.OPEN}],"\\rVert":["‖",{texClass:MmlNode_js_1$6.TEXCLASS.CLOSE}]}),new sm$3.CharacterMap("AMSsymbols-mathchar0mi",ParseMethods_js_1$6.default.mathchar0mi,{digamma:"ϝ",varkappa:"ϰ",varGamma:["Γ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varDelta:["Δ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varTheta:["Θ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varLambda:["Λ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varXi:["Ξ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varPi:["Π",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varSigma:["Σ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varUpsilon:["Υ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varPhi:["Φ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varPsi:["Ψ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],varOmega:["Ω",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.ITALIC}],beth:"ℶ",gimel:"ℷ",daleth:"ℸ",backprime:["‵",{variantForm:!0}],hslash:"ℏ",varnothing:["∅",{variantForm:!0}],blacktriangle:"▴",triangledown:["▽",{variantForm:!0}],blacktriangledown:"▾",square:"◻",Box:"◻",blacksquare:"◼",lozenge:"◊",Diamond:"◊",blacklozenge:"⧫",circledS:["Ⓢ",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.NORMAL}],bigstar:"★",sphericalangle:"∢",measuredangle:"∡",nexists:"∄",complement:"∁",mho:"℧",eth:["ð",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.NORMAL}],Finv:"Ⅎ",diagup:"╱",Game:"⅁",diagdown:"╲",Bbbk:["k",{mathvariant:TexConstants_js_1$7.TexConstant.Variant.DOUBLESTRUCK}],yen:"¥",circledR:"®",checkmark:"✓",maltese:"✠"}),new sm$3.CharacterMap("AMSsymbols-mathchar0mo",ParseMethods_js_1$6.default.mathchar0mo,{dotplus:"∔",ltimes:"⋉",smallsetminus:["∖",{variantForm:!0}],rtimes:"⋊",Cap:"⋒",doublecap:"⋒",leftthreetimes:"⋋",Cup:"⋓",doublecup:"⋓",rightthreetimes:"⋌",barwedge:"⊼",curlywedge:"⋏",veebar:"⊻",curlyvee:"⋎",doublebarwedge:"⩞",boxminus:"⊟",circleddash:"⊝",boxtimes:"⊠",circledast:"⊛",boxdot:"⊡",circledcirc:"⊚",boxplus:"⊞",centerdot:["⋅",{variantForm:!0}],divideontimes:"⋇",intercal:"⊺",leqq:"≦",geqq:"≧",leqslant:"⩽",geqslant:"⩾",eqslantless:"⪕",eqslantgtr:"⪖",lesssim:"≲",gtrsim:"≳",lessapprox:"⪅",gtrapprox:"⪆",approxeq:"≊",lessdot:"⋖",gtrdot:"⋗",lll:"⋘",llless:"⋘",ggg:"⋙",gggtr:"⋙",lessgtr:"≶",gtrless:"≷",lesseqgtr:"⋚",gtreqless:"⋛",lesseqqgtr:"⪋",gtreqqless:"⪌",doteqdot:"≑",Doteq:"≑",eqcirc:"≖",risingdotseq:"≓",circeq:"≗",fallingdotseq:"≒",triangleq:"≜",backsim:"∽",thicksim:["∼",{variantForm:!0}],backsimeq:"⋍",thickapprox:["≈",{variantForm:!0}],subseteqq:"⫅",supseteqq:"⫆",Subset:"⋐",Supset:"⋑",sqsubset:"⊏",sqsupset:"⊐",preccurlyeq:"≼",succcurlyeq:"≽",curlyeqprec:"⋞",curlyeqsucc:"⋟",precsim:"≾",succsim:"≿",precapprox:"⪷",succapprox:"⪸",vartriangleleft:"⊲",lhd:"⊲",vartriangleright:"⊳",rhd:"⊳",trianglelefteq:"⊴",unlhd:"⊴",trianglerighteq:"⊵",unrhd:"⊵",vDash:["⊨",{variantForm:!0}],Vdash:"⊩",Vvdash:"⊪",smallsmile:["⌣",{variantForm:!0}],shortmid:["∣",{variantForm:!0}],smallfrown:["⌢",{variantForm:!0}],shortparallel:["∥",{variantForm:!0}],bumpeq:"≏",between:"≬",Bumpeq:"≎",pitchfork:"⋔",varpropto:["∝",{variantForm:!0}],backepsilon:"∍",blacktriangleleft:"◂",blacktriangleright:"▸",therefore:"∴",because:"∵",eqsim:"≂",vartriangle:["△",{variantForm:!0}],Join:"⋈",nless:"≮",ngtr:"≯",nleq:"≰",ngeq:"≱",nleqslant:["⪇",{variantForm:!0}],ngeqslant:["⪈",{variantForm:!0}],nleqq:["≰",{variantForm:!0}],ngeqq:["≱",{variantForm:!0}],lneq:"⪇",gneq:"⪈",lneqq:"≨",gneqq:"≩",lvertneqq:["≨",{variantForm:!0}],gvertneqq:["≩",{variantForm:!0}],lnsim:"⋦",gnsim:"⋧",lnapprox:"⪉",gnapprox:"⪊",nprec:"⊀",nsucc:"⊁",npreceq:["⋠",{variantForm:!0}],nsucceq:["⋡",{variantForm:!0}],precneqq:"⪵",succneqq:"⪶",precnsim:"⋨",succnsim:"⋩",precnapprox:"⪹",succnapprox:"⪺",nsim:"≁",ncong:"≇",nshortmid:["∤",{variantForm:!0}],nshortparallel:["∦",{variantForm:!0}],nmid:"∤",nparallel:"∦",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",ntriangleleft:"⋪",ntriangleright:"⋫",ntrianglelefteq:"⋬",ntrianglerighteq:"⋭",nsubseteq:"⊈",nsupseteq:"⊉",nsubseteqq:["⊈",{variantForm:!0}],nsupseteqq:["⊉",{variantForm:!0}],subsetneq:"⊊",supsetneq:"⊋",varsubsetneq:["⊊",{variantForm:!0}],varsupsetneq:["⊋",{variantForm:!0}],subsetneqq:"⫋",supsetneqq:"⫌",varsubsetneqq:["⫋",{variantForm:!0}],varsupsetneqq:["⫌",{variantForm:!0}],leftleftarrows:"⇇",rightrightarrows:"⇉",leftrightarrows:"⇆",rightleftarrows:"⇄",Lleftarrow:"⇚",Rrightarrow:"⇛",twoheadleftarrow:"↞",twoheadrightarrow:"↠",leftarrowtail:"↢",rightarrowtail:"↣",looparrowleft:"↫",looparrowright:"↬",leftrightharpoons:"⇋",rightleftharpoons:["⇌",{variantForm:!0}],curvearrowleft:"↶",curvearrowright:"↷",circlearrowleft:"↺",circlearrowright:"↻",Lsh:"↰",Rsh:"↱",upuparrows:"⇈",downdownarrows:"⇊",upharpoonleft:"↿",upharpoonright:"↾",downharpoonleft:"⇃",restriction:"↾",multimap:"⊸",downharpoonright:"⇂",leftrightsquigarrow:"↭",rightsquigarrow:"⇝",leadsto:"⇝",dashrightarrow:"⇢",dashleftarrow:"⇠",nleftarrow:"↚",nrightarrow:"↛",nLeftarrow:"⇍",nRightarrow:"⇏",nleftrightarrow:"↮",nLeftrightarrow:"⇎"}),new sm$3.DelimiterMap("AMSsymbols-delimiter",ParseMethods_js_1$6.default.delimiter,{"\\ulcorner":"⌜","\\urcorner":"⌝","\\llcorner":"⌞","\\lrcorner":"⌟"}),new sm$3.CommandMap("AMSsymbols-macros",{implies:["Macro","\\;\\Longrightarrow\\;"],impliedby:["Macro","\\;\\Longleftarrow\\;"]},AmsMethods_js_1$2.AmsMethods);var __extends$9=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_a$6;Object.defineProperty(AmsConfiguration,"__esModule",{value:!0}),AmsConfiguration.AmsConfiguration=AmsConfiguration.AmsTags=void 0;var Configuration_js_1$i=Configuration,AmsItems_js_1$1=AmsItems,Tags_js_1$3=Tags,AmsMethods_js_1$1=AmsMethods,SymbolMap_js_1$f=SymbolMap,AmsTags=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$9(e,t),e}(Tags_js_1$3.AbstractTags);AmsConfiguration.AmsTags=AmsTags;var init$1=function(t){new SymbolMap_js_1$f.CommandMap(AmsMethods_js_1$1.NEW_OPS,{},{}),t.append(Configuration_js_1$i.Configuration.local({handler:{macro:[AmsMethods_js_1$1.NEW_OPS]},priority:-1}))};AmsConfiguration.AmsConfiguration=Configuration_js_1$i.Configuration.create("ams",{handler:{character:["AMSmath-operatorLetter"],delimiter:["AMSsymbols-delimiter","AMSmath-delimiter"],macro:["AMSsymbols-mathchar0mi","AMSsymbols-mathchar0mo","AMSsymbols-delimiter","AMSsymbols-macros","AMSmath-mathchar0mo","AMSmath-macros","AMSmath-delimiter"],environment:["AMSmath-environment"]},items:(_a$6={},_a$6[AmsItems_js_1$1.MultlineItem.prototype.kind]=AmsItems_js_1$1.MultlineItem,_a$6[AmsItems_js_1$1.FlalignItem.prototype.kind]=AmsItems_js_1$1.FlalignItem,_a$6),tags:{ams:AmsTags},init:init$1,config:function(t,e){e.parseOptions.options.multlineWidth&&(e.parseOptions.options.ams.multlineWidth=e.parseOptions.options.multlineWidth),delete e.parseOptions.options.multlineWidth},options:{multlineWidth:"",ams:{multlineWidth:"100%",multlineIndent:"1em"}}});var AmsCdConfiguration={},AmsCdMappings={},AmsCdMethods$1={},__importDefault$u=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AmsCdMethods$1,"__esModule",{value:!0});var TexParser_js_1$7=__importDefault$u(TexParser$1),BaseConfiguration_js_1=BaseConfiguration,MmlNode_js_1$5=MmlNode,NodeUtil_js_1$6=__importDefault$u(NodeUtil$1),AmsCdMethods={CD:function(t,e){t.Push(e);var r=t.itemFactory.create("array"),n=t.configuration.options.amscd;return r.setProperties({minw:t.stack.env.CD_minw||n.harrowsize,minh:t.stack.env.CD_minh||n.varrowsize}),r.arraydef={columnalign:"center",columnspacing:n.colspace,rowspacing:n.rowspace,displaystyle:!0},r},arrow:function(t,e){var r=t.string.charAt(t.i);if(!r.match(/[><VA.|=]/))return(0,BaseConfiguration_js_1.Other)(t,e);t.i++;var n=t.stack.Top();n.isKind("array")&&!n.Size()||(AmsCdMethods.cell(t,e),n=t.stack.Top());for(var o,i=n,a=i.table.length%2==1,s=(i.row.length+(a?0:1))%2;s;)AmsCdMethods.cell(t,e),s--;var l={minsize:i.getProperty("minw"),stretchy:!0},c={minsize:i.getProperty("minh"),stretchy:!0,symmetric:!0,lspace:0,rspace:0};if("."===r);else if("|"===r)o=t.create("token","mo",c,"∥");else if("="===r)o=t.create("token","mo",l,"=");else{var u={">":"→","<":"←",V:"↓",A:"↑"}[r],d=t.GetUpTo(e+r,r),p=t.GetUpTo(e+r,r);if(">"===r||"<"===r){if(o=t.create("token","mo",l,u),d||(d="\\kern "+i.getProperty("minw")),d||p){var m={width:"+.67em",lspace:".33em"};if(o=t.create("node","munderover",[o]),d){var h=new TexParser_js_1$7.default(d,t.stack.env,t.configuration).mml(),f=t.create("node","mpadded",[h],m);NodeUtil_js_1$6.default.setAttribute(f,"voffset",".1em"),NodeUtil_js_1$6.default.setChild(o,o.over,f)}if(p){var _=new TexParser_js_1$7.default(p,t.stack.env,t.configuration).mml();NodeUtil_js_1$6.default.setChild(o,o.under,t.create("node","mpadded",[_],m))}t.configuration.options.amscd.hideHorizontalLabels&&(o=t.create("node","mpadded",o,{depth:0,height:".67em"}))}}else{var g=t.create("token","mo",c,u);o=g,(d||p)&&(o=t.create("node","mrow"),d&&NodeUtil_js_1$6.default.appendChildren(o,[new TexParser_js_1$7.default("\\scriptstyle\\llap{"+d+"}",t.stack.env,t.configuration).mml()]),g.texClass=MmlNode_js_1$5.TEXCLASS.ORD,NodeUtil_js_1$6.default.appendChildren(o,[g]),p&&NodeUtil_js_1$6.default.appendChildren(o,[new TexParser_js_1$7.default("\\scriptstyle\\rlap{"+p+"}",t.stack.env,t.configuration).mml()]))}}o&&t.Push(o),AmsCdMethods.cell(t,e)},cell:function(t,e){var r=t.stack.Top();(r.table||[]).length%2==0&&0===(r.row||[]).length&&t.Push(t.create("node","mpadded",[],{height:"8.5pt",depth:"2pt"})),t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}))},minCDarrowwidth:function(t,e){t.stack.env.CD_minw=t.GetDimen(e)},minCDarrowheight:function(t,e){t.stack.env.CD_minh=t.GetDimen(e)}};AmsCdMethods$1.default=AmsCdMethods;var __createBinding$4=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$4=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$4=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$4(e,t,r);return __setModuleDefault$4(e,t),e},__importDefault$t=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AmsCdMappings,"__esModule",{value:!0});var sm$2=__importStar$4(SymbolMap),ParseMethods_js_1$5=__importDefault$t(ParseMethods$1),AmsCdMethods_js_1=__importDefault$t(AmsCdMethods$1);new sm$2.EnvironmentMap("amscd_environment",ParseMethods_js_1$5.default.environment,{CD:"CD"},AmsCdMethods_js_1.default),new sm$2.CommandMap("amscd_macros",{minCDarrowwidth:"minCDarrowwidth",minCDarrowheight:"minCDarrowheight"},AmsCdMethods_js_1.default),new sm$2.MacroMap("amscd_special",{"@":"arrow"},AmsCdMethods_js_1.default),Object.defineProperty(AmsCdConfiguration,"__esModule",{value:!0}),AmsCdConfiguration.AmsCdConfiguration=void 0;var Configuration_js_1$h=Configuration;AmsCdConfiguration.AmsCdConfiguration=Configuration_js_1$h.Configuration.create("amscd",{handler:{character:["amscd_special"],macro:["amscd_macros"],environment:["amscd_environment"]},options:{amscd:{colspace:"5pt",rowspace:"5pt",harrowsize:"2.75em",varrowsize:"1.75em",hideHorizontalLabels:!1}}});var BboxConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.BboxConfiguration=t.BboxMethods=void 0;var r=Configuration,n=SymbolMap,o=e(TexError$1);t.BboxMethods={},t.BboxMethods.BBox=function(t,e){for(var r,n,s,l=t.GetBrackets(e,""),c=t.ParseArg(e),u=l.split(/,/),d=0,p=u.length;d<p;d++){var m=u[d].trim(),h=m.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(h){if(r)throw new o.default("MultipleBBoxProperty","%1 specified twice in %2","Padding",e);var f=a(h[1]+h[3]);f&&(r={height:"+"+f,depth:"+"+f,lspace:f,width:"+"+2*parseInt(h[1],10)+h[3]})}else if(m.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)){if(n)throw new o.default("MultipleBBoxProperty","%1 specified twice in %2","Background",e);n=m}else if(m.match(/^[-a-z]+:/i)){if(s)throw new o.default("MultipleBBoxProperty","%1 specified twice in %2","Style",e);s=i(m)}else if(""!==m)throw new o.default("InvalidBBoxProperty",'"%1" doesn\'t look like a color, a padding dimension, or a style',m)}r&&(c=t.create("node","mpadded",[c],r)),(n||s)&&(r={},n&&Object.assign(r,{mathbackground:n}),s&&Object.assign(r,{style:s}),c=t.create("node","mstyle",[c],r)),t.Push(c)};var i=function(t){return t},a=function(t){return t};new n.CommandMap("bbox",{bbox:"BBox"},t.BboxMethods),t.BboxConfiguration=r.Configuration.create("bbox",{handler:{macro:["bbox"]}})}(BboxConfiguration),getDefaultExportFromCjs(BboxConfiguration);var BoldsymbolConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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.")},r=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.BoldsymbolConfiguration=t.rewriteBoldTokens=t.createBoldToken=t.BoldsymbolMethods=void 0;var n=Configuration,o=r(NodeUtil$1),i=TexConstants,a=SymbolMap,s=NodeFactory$1,l={};function c(t,e,r,n){var i=s.NodeFactory.createToken(t,e,r,n);return"mtext"!==e&&t.configuration.parser.stack.env.boldsymbol&&(o.default.setProperty(i,"fixBold",!0),t.configuration.addNode("fixBold",i)),i}function u(t){var r,n;try{for(var a=e(t.data.getList("fixBold")),s=a.next();!s.done;s=a.next()){var c=s.value;if(o.default.getProperty(c,"fixBold")){var u=o.default.getAttribute(c,"mathvariant");null==u?o.default.setAttribute(c,"mathvariant",i.TexConstant.Variant.BOLD):o.default.setAttribute(c,"mathvariant",l[u]||u),o.default.removeProperties(c,"fixBold")}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}l[i.TexConstant.Variant.NORMAL]=i.TexConstant.Variant.BOLD,l[i.TexConstant.Variant.ITALIC]=i.TexConstant.Variant.BOLDITALIC,l[i.TexConstant.Variant.FRAKTUR]=i.TexConstant.Variant.BOLDFRAKTUR,l[i.TexConstant.Variant.SCRIPT]=i.TexConstant.Variant.BOLDSCRIPT,l[i.TexConstant.Variant.SANSSERIF]=i.TexConstant.Variant.BOLDSANSSERIF,l["-tex-calligraphic"]="-tex-bold-calligraphic",l["-tex-oldstyle"]="-tex-bold-oldstyle",l["-tex-mathit"]=i.TexConstant.Variant.BOLDITALIC,t.BoldsymbolMethods={},t.BoldsymbolMethods.Boldsymbol=function(t,e){var r=t.stack.env.boldsymbol;t.stack.env.boldsymbol=!0;var n=t.ParseArg(e);t.stack.env.boldsymbol=r,t.Push(n)},new a.CommandMap("boldsymbol",{boldsymbol:"Boldsymbol"},t.BoldsymbolMethods),t.createBoldToken=c,t.rewriteBoldTokens=u,t.BoldsymbolConfiguration=n.Configuration.create("boldsymbol",{handler:{macro:["boldsymbol"]},nodes:{token:c},postprocessors:[u]})}(BoldsymbolConfiguration),getDefaultExportFromCjs(BoldsymbolConfiguration);var BraketConfiguration={},BraketItems={},__extends$8=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault$s=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BraketItems,"__esModule",{value:!0}),BraketItems.BraketItem=void 0;var StackItem_js_1$3=StackItem,MmlNode_js_1$4=MmlNode,ParseUtil_js_1$8=__importDefault$s(ParseUtil$1),BraketItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$8(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"braket"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){return e.isKind("close")?[[this.factory.create("mml",this.toMml())],!0]:e.isKind("mml")?(this.Push(e.toMml()),this.getProperty("single")?[[this.toMml()],!0]:StackItem_js_1$3.BaseItem.fail):t.prototype.checkItem.call(this,e)},e.prototype.toMml=function(){var e=t.prototype.toMml.call(this),r=this.getProperty("open"),n=this.getProperty("close");if(this.getProperty("stretchy"))return ParseUtil_js_1$8.default.fenced(this.factory.configuration,r,e,n);var o={fence:!0,stretchy:!1,symmetric:!0,texClass:MmlNode_js_1$4.TEXCLASS.OPEN},i=this.create("token","mo",o,r);o.texClass=MmlNode_js_1$4.TEXCLASS.CLOSE;var a=this.create("token","mo",o,n);return this.create("node","mrow",[i,e,a],{open:r,close:n,texClass:MmlNode_js_1$4.TEXCLASS.INNER})},e}(StackItem_js_1$3.BaseItem);BraketItems.BraketItem=BraketItem;var BraketMappings={},BraketMethods$1={},__importDefault$r=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BraketMethods$1,"__esModule",{value:!0});var BaseMethods_js_1$5=__importDefault$r(BaseMethods$1),MmlNode_js_1$3=MmlNode,TexError_js_1$c=__importDefault$r(TexError$1),BraketMethods={};BraketMethods.Macro=BaseMethods_js_1$5.default.Macro,BraketMethods.Braket=function(t,e,r,n,o,i){var a=t.GetNext();if(""===a)throw new TexError_js_1$c.default("MissingArgFor","Missing argument for %1",t.currentCS);var s=!0;"{"===a&&(t.i++,s=!1),t.Push(t.itemFactory.create("braket").setProperties({barmax:i,barcount:0,open:r,close:n,stretchy:o,single:s}))},BraketMethods.Bar=function(t,e){var r="|"===e?"|":"∥",n=t.stack.Top();if("braket"!==n.kind||n.getProperty("barcount")>=n.getProperty("barmax")){var o=t.create("token","mo",{texClass:MmlNode_js_1$3.TEXCLASS.ORD,stretchy:!1},r);t.Push(o)}else{if("|"===r&&"|"===t.GetNext()&&(t.i++,r="∥"),n.getProperty("stretchy")){var i=t.create("node","TeXAtom",[],{texClass:MmlNode_js_1$3.TEXCLASS.CLOSE});t.Push(i),n.setProperty("barcount",n.getProperty("barcount")+1),i=t.create("token","mo",{stretchy:!0,braketbar:!0},r),t.Push(i),i=t.create("node","TeXAtom",[],{texClass:MmlNode_js_1$3.TEXCLASS.OPEN}),t.Push(i)}else{var a=t.create("token","mo",{stretchy:!1,braketbar:!0},r);t.Push(a)}}},BraketMethods$1.default=BraketMethods;var __importDefault$q=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BraketMappings,"__esModule",{value:!0});var SymbolMap_js_1$e=SymbolMap,BraketMethods_js_1=__importDefault$q(BraketMethods$1),_a$5;new SymbolMap_js_1$e.CommandMap("Braket-macros",{bra:["Macro","{\\langle {#1} \\vert}",1],ket:["Macro","{\\vert {#1} \\rangle}",1],braket:["Braket","⟨","⟩",!1,1/0],set:["Braket","{","}",!1,1],Bra:["Macro","{\\left\\langle {#1} \\right\\vert}",1],Ket:["Macro","{\\left\\vert {#1} \\right\\rangle}",1],Braket:["Braket","⟨","⟩",!0,1/0],Set:["Braket","{","}",!0,1],ketbra:["Macro","{\\vert {#1} \\rangle\\langle {#2} \\vert}",2],Ketbra:["Macro","{\\left\\vert {#1} \\right\\rangle\\left\\langle {#2} \\right\\vert}",2],"|":"Bar"},BraketMethods_js_1.default),new SymbolMap_js_1$e.MacroMap("Braket-characters",{"|":"Bar"},BraketMethods_js_1.default),Object.defineProperty(BraketConfiguration,"__esModule",{value:!0}),BraketConfiguration.BraketConfiguration=void 0;var Configuration_js_1$g=Configuration,BraketItems_js_1=BraketItems;BraketConfiguration.BraketConfiguration=Configuration_js_1$g.Configuration.create("braket",{handler:{character:["Braket-characters"],macro:["Braket-macros"]},items:(_a$5={},_a$5[BraketItems_js_1.BraketItem.prototype.kind]=BraketItems_js_1.BraketItem,_a$5)});var BussproofsConfiguration={},BussproofsItems={},BussproofsUtil$2={};!function(t){var e,r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.clearDocument=t.saveDocument=t.makeBsprAttributes=t.removeProperty=t.getProperty=t.setProperty=t.balanceRules=void 0;var i=o(NodeUtil$1),a=o(ParseUtil$1),s=null,l=null,c=function(t){return l.root=t,s.outputJax.getBBox(l,s).w},u=function(t){for(var e=0;t&&!i.default.isType(t,"mtable");){if(i.default.isType(t,"text"))return null;i.default.isType(t,"mrow")?(t=t.childNodes[0],e=0):(t=t.parent.childNodes[e],e++)}return t},d=function(t,e){return t.childNodes["up"===e?1:0].childNodes[0].childNodes[0].childNodes[0].childNodes[0]},p=function(t,e){return t.childNodes[e].childNodes[0].childNodes[0]},m=function(t){return p(t,0)},h=function(t){return p(t,t.childNodes.length-1)},f=function(t,e){return t.childNodes["up"===e?0:1].childNodes[0].childNodes[0].childNodes[0]},_=function(t){for(;t&&!i.default.isType(t,"mtd");)t=t.parent;return t},g=function(t){return t.parent.childNodes[t.parent.childNodes.indexOf(t)+1]},y=function(e){for(;e&&null==(0,t.getProperty)(e,"inference");)e=e.parent;return e},b=function(t,e,r){void 0===r&&(r=!1);var n=0;if(t===e)return n;if(t!==e.parent){var o=t.childNodes,a=r?o.length-1:0;i.default.isType(o[a],"mspace")&&(n+=c(o[a])),t=e.parent}if(t===e)return n;var s=t.childNodes,l=r?s.length-1:0;return s[l]!==e&&(n+=c(s[l])),n},v=function(e,r){void 0===r&&(r=!1);var n=u(e),o=f(n,(0,t.getProperty)(n,"inferenceRule"));return b(e,n,r)+(c(n)-c(o))/2},x=function(e,r,n,o){if(void 0===o&&(o=!1),(0,t.getProperty)(r,"inferenceRule")||(0,t.getProperty)(r,"labelledRule")){var s=e.nodeFactory.create("node","mrow");r.parent.replaceChild(s,r),s.setChildren([r]),M(r,s),r=s}var l=o?r.childNodes.length-1:0,c=r.childNodes[l];i.default.isType(c,"mspace")?i.default.setAttribute(c,"width",a.default.Em(a.default.dimen2em(i.default.getAttribute(c,"width"))+n)):(c=e.nodeFactory.create("node","mspace",[],{width:a.default.Em(n)}),o?r.appendChild(c):(c.parent=r,r.childNodes.unshift(c)))},M=function(e,r){["inference","proof","maxAdjust","labelledRule"].forEach((function(n){var o=(0,t.getProperty)(e,n);null!=o&&((0,t.setProperty)(r,n,o),(0,t.removeProperty)(e,n))}))},S=function(e,r,n,o,i){var s=e.nodeFactory.create("node","mspace",[],{width:a.default.Em(i)});if("left"===o){var l=r.childNodes[n].childNodes[0];s.parent=l,l.childNodes.unshift(s)}else r.childNodes[n].appendChild(s);(0,t.setProperty)(r.parent,"sequentAdjust_"+o,i)},E=function(e,n){for(var o=n.pop();n.length;){var i=n.pop(),a=r(C(o,i),2),s=a[0],l=a[1];(0,t.getProperty)(o.parent,"axiom")&&(S(e,s<0?o:i,0,"left",Math.abs(s)),S(e,l<0?o:i,2,"right",Math.abs(l))),o=i}},C=function(t,e){var r=c(t.childNodes[2]),n=c(e.childNodes[2]);return[c(t.childNodes[0])-c(e.childNodes[0]),r-n]};t.balanceRules=function(e){var r,o;l=new e.document.options.MathItem("",null,e.math.display);var i=e.data;!function(e){var r=e.nodeLists.sequent;if(r)for(var n=r.length-1,o=void 0;o=r[n];n--)if((0,t.getProperty)(o,"sequentProcessed"))(0,t.removeProperty)(o,"sequentProcessed");else{var i=[],a=y(o);if(1===(0,t.getProperty)(a,"inference")){for(i.push(o);1===(0,t.getProperty)(a,"inference");){a=u(a);var s=m(d(a,(0,t.getProperty)(a,"inferenceRule"))),l=(0,t.getProperty)(s,"inferenceRule")?f(s,(0,t.getProperty)(s,"inferenceRule")):s;(0,t.getProperty)(l,"sequent")&&(o=l.childNodes[0],i.push(o),(0,t.setProperty)(o,"sequentProcessed",!0)),a=s}E(e,i)}}}(i);var a=i.nodeLists.inference||[];try{for(var s=n(a),c=s.next();!c.done;c=s.next()){var p=c.value,M=(0,t.getProperty)(p,"proof"),S=u(p),C=d(S,(0,t.getProperty)(S,"inferenceRule")),$=m(C);if((0,t.getProperty)($,"inference")){var O=v($);if(O){x(i,$,-O);var A=b(p,S,!1);x(i,p,O-A)}}var j=h(C);if(null!=(0,t.getProperty)(j,"inference")){var T=v(j,!0);x(i,j,-T,!0);var N=b(p,S,!0),w=(0,t.getProperty)(p,"maxAdjust");null!=w&&(T=Math.max(T,w));var P=void 0;if(!M&&(P=_(p))){var L=g(P);if(L){var I=i.nodeFactory.create("node","mspace",[],{width:T-N+"em"});L.appendChild(I),p.removeProperty("maxAdjust")}else{var k=y(P);k&&(T=(0,t.getProperty)(k,"maxAdjust")?Math.max((0,t.getProperty)(k,"maxAdjust"),T):T,(0,t.setProperty)(k,"maxAdjust",T))}}else x(i,(0,t.getProperty)(p,"proof")?p:p.parent,T-N,!0)}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}};var $="bspr_",O=((e={}).bspr_maxAdjust=!0,e);t.setProperty=function(t,e,r){i.default.setProperty(t,$+e,r)};t.getProperty=function(t,e){return i.default.getProperty(t,$+e)};t.removeProperty=function(t,e){t.removeProperty($+e)};t.makeBsprAttributes=function(t){t.data.root.walkTree((function(t,e){var r=[];t.getPropertyNames().forEach((function(e){!O[e]&&e.match(RegExp("^bspr_"))&&r.push(e+":"+t.getProperty(e))})),r.length&&i.default.setAttribute(t,"semantics",r.join(";"))}))};t.saveDocument=function(t){if(!("getBBox"in(s=t.document).outputJax))throw Error("The bussproofs extension requires an output jax with a getBBox() method")};t.clearDocument=function(t){s=null}}(BussproofsUtil$2),getDefaultExportFromCjs(BussproofsUtil$2);var __extends$7=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__createBinding$3=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$3=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$3=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$3(e,t,r);return __setModuleDefault$3(e,t),e},__importDefault$p=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BussproofsItems,"__esModule",{value:!0}),BussproofsItems.ProofTreeItem=void 0;var TexError_js_1$b=__importDefault$p(TexError$1),StackItem_js_1$2=StackItem,Stack_js_1=__importDefault$p(Stack$1),BussproofsUtil$1=__importStar$3(BussproofsUtil$2),ProofTreeItem=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.leftLabel=null,e.rigthLabel=null,e.innerStack=new Stack_js_1.default(e.factory,{},!0),e}return __extends$7(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"proofTree"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(t){if(t.isKind("end")&&"prooftree"===t.getName()){var e=this.toMml();return BussproofsUtil$1.setProperty(e,"proof",!0),[[this.factory.create("mml",e),t],!0]}if(t.isKind("stop"))throw new TexError_js_1$b.default("EnvMissingEnd","Missing \\end{%1}",this.getName());return this.innerStack.Push(t),StackItem_js_1$2.BaseItem.fail},e.prototype.toMml=function(){var e=t.prototype.toMml.call(this),r=this.innerStack.Top();if(r.isKind("start")&&!r.Size())return e;this.innerStack.Push(this.factory.create("stop"));var n=this.innerStack.Top().toMml();return this.create("node","mrow",[n,e],{})},e}(StackItem_js_1$2.BaseItem);BussproofsItems.ProofTreeItem=ProofTreeItem;var BussproofsMappings={},BussproofsMethods$1={},__createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$2(e,t,r);return __setModuleDefault$2(e,t),e},__read$4=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray$1=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$o=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BussproofsMethods$1,"__esModule",{value:!0});var TexError_js_1$a=__importDefault$o(TexError$1),TexParser_js_1$6=__importDefault$o(TexParser$1),ParseUtil_js_1$7=__importDefault$o(ParseUtil$1),BussproofsUtil=__importStar$2(BussproofsUtil$2),BussproofsMethods={Prooftree:function(t,e){return t.Push(e),t.itemFactory.create("proofTree").setProperties({name:e.getName(),line:"solid",currentLine:"solid",rootAtTop:!1})},Axiom:function(t,e){var r=t.stack.Top();if("proofTree"!==r.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");var n=paddedContent(t,t.GetArgument(e));BussproofsUtil.setProperty(n,"axiom",!0),r.Push(n)}},paddedContent=function(t,e){var r=ParseUtil_js_1$7.default.internalMath(t,ParseUtil_js_1$7.default.trimSpaces(e),0);if(!r[0].childNodes[0].childNodes.length)return t.create("node","mrow",[]);var n=t.create("node","mspace",[],{width:".5ex"}),o=t.create("node","mspace",[],{width:".5ex"});return t.create("node","mrow",__spreadArray$1(__spreadArray$1([n],__read$4(r),!1),[o],!1))};function createRule(t,e,r,n,o,i,a){var s,l,c,u,d=t.create("node","mtr",[t.create("node","mtd",[e],{})],{}),p=t.create("node","mtr",[t.create("node","mtd",r,{})],{}),m=t.create("node","mtable",a?[p,d]:[d,p],{align:"top 2",rowlines:i,framespacing:"0 0"});if(BussproofsUtil.setProperty(m,"inferenceRule",a?"up":"down"),n&&(s=t.create("node","mpadded",[n],{height:"+.5em",width:"+.5em",voffset:"-.15em"}),BussproofsUtil.setProperty(s,"prooflabel","left")),o&&(l=t.create("node","mpadded",[o],{height:"+.5em",width:"+.5em",voffset:"-.15em"}),BussproofsUtil.setProperty(l,"prooflabel","right")),n&&o)c=[s,m,l],u="both";else if(n)c=[s,m],u="left";else{if(!o)return m;c=[m,l],u="right"}return m=t.create("node","mrow",c),BussproofsUtil.setProperty(m,"labelledRule",u),m}function parseFCenterLine(t,e){if("$"!==t.GetNext())throw new TexError_js_1$a.default("IllegalUseOfCommand","Use of %1 does not match it's definition.",e);t.i++;var r=t.GetUpTo(e,"$");if(-1===r.indexOf("\\fCenter"))throw new TexError_js_1$a.default("IllegalUseOfCommand","Missing \\fCenter in %1.",e);var n=__read$4(r.split("\\fCenter"),2),o=n[0],i=n[1],a=new TexParser_js_1$6.default(o,t.stack.env,t.configuration).mml(),s=new TexParser_js_1$6.default(i,t.stack.env,t.configuration).mml(),l=new TexParser_js_1$6.default("\\fCenter",t.stack.env,t.configuration).mml(),c=t.create("node","mtd",[a],{}),u=t.create("node","mtd",[l],{}),d=t.create("node","mtd",[s],{}),p=t.create("node","mtr",[c,u,d],{}),m=t.create("node","mtable",[p],{columnspacing:".5ex",columnalign:"center 2"});return BussproofsUtil.setProperty(m,"sequent",!0),t.configuration.addNode("sequent",p),m}BussproofsMethods.Inference=function(t,e,r){var n=t.stack.Top();if("proofTree"!==n.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");if(n.Size()<r)throw new TexError_js_1$a.default("BadProofTree","Proof tree badly specified.");var o=n.getProperty("rootAtTop"),i=1!==r||n.Peek()[0].childNodes.length?r:0,a=[];do{a.length&&a.unshift(t.create("node","mtd",[],{})),a.unshift(t.create("node","mtd",[n.Pop()],{rowalign:o?"top":"bottom"})),r--}while(r>0);var s=t.create("node","mtr",a,{}),l=t.create("node","mtable",[s],{framespacing:"0 0"}),c=paddedContent(t,t.GetArgument(e)),u=n.getProperty("currentLine");u!==n.getProperty("line")&&n.setProperty("currentLine",n.getProperty("line"));var d=createRule(t,l,[c],n.getProperty("left"),n.getProperty("right"),u,o);n.setProperty("left",null),n.setProperty("right",null),BussproofsUtil.setProperty(d,"inference",i),t.configuration.addNode("inference",d),n.Push(d)},BussproofsMethods.Label=function(t,e,r){var n=t.stack.Top();if("proofTree"!==n.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");var o=ParseUtil_js_1$7.default.internalMath(t,t.GetArgument(e),0),i=o.length>1?t.create("node","mrow",o,{}):o[0];n.setProperty(r,i)},BussproofsMethods.SetLine=function(t,e,r,n){var o=t.stack.Top();if("proofTree"!==o.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");o.setProperty("currentLine",r),n&&o.setProperty("line",r)},BussproofsMethods.RootAtTop=function(t,e,r){var n=t.stack.Top();if("proofTree"!==n.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");n.setProperty("rootAtTop",r)},BussproofsMethods.AxiomF=function(t,e){var r=t.stack.Top();if("proofTree"!==r.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");var n=parseFCenterLine(t,e);BussproofsUtil.setProperty(n,"axiom",!0),r.Push(n)},BussproofsMethods.FCenter=function(t,e){},BussproofsMethods.InferenceF=function(t,e,r){var n=t.stack.Top();if("proofTree"!==n.kind)throw new TexError_js_1$a.default("IllegalProofCommand","Proof commands only allowed in prooftree environment.");if(n.Size()<r)throw new TexError_js_1$a.default("BadProofTree","Proof tree badly specified.");var o=n.getProperty("rootAtTop"),i=1!==r||n.Peek()[0].childNodes.length?r:0,a=[];do{a.length&&a.unshift(t.create("node","mtd",[],{})),a.unshift(t.create("node","mtd",[n.Pop()],{rowalign:o?"top":"bottom"})),r--}while(r>0);var s=t.create("node","mtr",a,{}),l=t.create("node","mtable",[s],{framespacing:"0 0"}),c=parseFCenterLine(t,e),u=n.getProperty("currentLine");u!==n.getProperty("line")&&n.setProperty("currentLine",n.getProperty("line"));var d=createRule(t,l,[c],n.getProperty("left"),n.getProperty("right"),u,o);n.setProperty("left",null),n.setProperty("right",null),BussproofsUtil.setProperty(d,"inference",i),t.configuration.addNode("inference",d),n.Push(d)},BussproofsMethods$1.default=BussproofsMethods;var __importDefault$n=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BussproofsMappings,"__esModule",{value:!0});var BussproofsMethods_js_1=__importDefault$n(BussproofsMethods$1),ParseMethods_js_1$4=__importDefault$n(ParseMethods$1),SymbolMap_js_1$d=SymbolMap,_a$4;new SymbolMap_js_1$d.CommandMap("Bussproofs-macros",{AxiomC:"Axiom",UnaryInfC:["Inference",1],BinaryInfC:["Inference",2],TrinaryInfC:["Inference",3],QuaternaryInfC:["Inference",4],QuinaryInfC:["Inference",5],RightLabel:["Label","right"],LeftLabel:["Label","left"],AXC:"Axiom",UIC:["Inference",1],BIC:["Inference",2],TIC:["Inference",3],RL:["Label","right"],LL:["Label","left"],noLine:["SetLine","none",!1],singleLine:["SetLine","solid",!1],solidLine:["SetLine","solid",!1],dashedLine:["SetLine","dashed",!1],alwaysNoLine:["SetLine","none",!0],alwaysSingleLine:["SetLine","solid",!0],alwaysSolidLine:["SetLine","solid",!0],alwaysDashedLine:["SetLine","dashed",!0],rootAtTop:["RootAtTop",!0],alwaysRootAtTop:["RootAtTop",!0],rootAtBottom:["RootAtTop",!1],alwaysRootAtBottom:["RootAtTop",!1],fCenter:"FCenter",Axiom:"AxiomF",UnaryInf:["InferenceF",1],BinaryInf:["InferenceF",2],TrinaryInf:["InferenceF",3],QuaternaryInf:["InferenceF",4],QuinaryInf:["InferenceF",5]},BussproofsMethods_js_1.default),new SymbolMap_js_1$d.EnvironmentMap("Bussproofs-environments",ParseMethods_js_1$4.default.environment,{prooftree:["Prooftree",null,!1]},BussproofsMethods_js_1.default),Object.defineProperty(BussproofsConfiguration,"__esModule",{value:!0}),BussproofsConfiguration.BussproofsConfiguration=void 0;var Configuration_js_1$f=Configuration,BussproofsItems_js_1=BussproofsItems,BussproofsUtil_js_1=BussproofsUtil$2;BussproofsConfiguration.BussproofsConfiguration=Configuration_js_1$f.Configuration.create("bussproofs",{handler:{macro:["Bussproofs-macros"],environment:["Bussproofs-environments"]},items:(_a$4={},_a$4[BussproofsItems_js_1.ProofTreeItem.prototype.kind]=BussproofsItems_js_1.ProofTreeItem,_a$4),preprocessors:[[BussproofsUtil_js_1.saveDocument,1]],postprocessors:[[BussproofsUtil_js_1.clearDocument,3],[BussproofsUtil_js_1.makeBsprAttributes,2],[BussproofsUtil_js_1.balanceRules,1]]});var CancelConfiguration={},EncloseConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.EncloseConfiguration=t.EncloseMethods=t.ENCLOSE_OPTIONS=void 0;var r=Configuration,n=SymbolMap,o=e(ParseUtil$1);t.ENCLOSE_OPTIONS={"data-arrowhead":1,color:1,mathcolor:1,background:1,mathbackground:1,"data-padding":1,"data-thickness":1},t.EncloseMethods={},t.EncloseMethods.Enclose=function(e,r){var n=e.GetArgument(r).replace(/,/g," "),i=e.GetBrackets(r,""),a=e.ParseArg(r),s=o.default.keyvalOptions(i,t.ENCLOSE_OPTIONS);s.notation=n,e.Push(e.create("node","menclose",[a],s))},new n.CommandMap("enclose",{enclose:"Enclose"},t.EncloseMethods),t.EncloseConfiguration=r.Configuration.create("enclose",{handler:{macro:["enclose"]}})}(EncloseConfiguration),getDefaultExportFromCjs(EncloseConfiguration),function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancelConfiguration=t.CancelMethods=void 0;var r=Configuration,n=TexConstants,o=SymbolMap,i=e(ParseUtil$1),a=EncloseConfiguration;t.CancelMethods={},t.CancelMethods.Cancel=function(t,e,r){var n=t.GetBrackets(e,""),o=t.ParseArg(e),s=i.default.keyvalOptions(n,a.ENCLOSE_OPTIONS);s.notation=r,t.Push(t.create("node","menclose",[o],s))},t.CancelMethods.CancelTo=function(t,e){var r=t.GetBrackets(e,""),o=t.ParseArg(e),s=t.ParseArg(e),l=i.default.keyvalOptions(r,a.ENCLOSE_OPTIONS);l.notation=[n.TexConstant.Notation.UPDIAGONALSTRIKE,n.TexConstant.Notation.UPDIAGONALARROW,n.TexConstant.Notation.NORTHEASTARROW].join(" "),o=t.create("node","mpadded",[o],{depth:"-.1em",height:"+.1em",voffset:".1em"}),t.Push(t.create("node","msup",[t.create("node","menclose",[s],l),o]))},new o.CommandMap("cancel",{cancel:["Cancel",n.TexConstant.Notation.UPDIAGONALSTRIKE],bcancel:["Cancel",n.TexConstant.Notation.DOWNDIAGONALSTRIKE],xcancel:["Cancel",n.TexConstant.Notation.UPDIAGONALSTRIKE+" "+n.TexConstant.Notation.DOWNDIAGONALSTRIKE],cancelto:"CancelTo"},t.CancelMethods),t.CancelConfiguration=r.Configuration.create("cancel",{handler:{macro:["cancel"]}})}(CancelConfiguration),getDefaultExportFromCjs(CancelConfiguration);var CasesConfiguration={},EmpheqUtil={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},r=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},n=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.EmpheqUtil=void 0;var i=o(ParseUtil$1),a=o(TexParser$1);t.EmpheqUtil={environment:function(t,n,o,i){var a=i[0],s=t.itemFactory.create(a+"-begin").setProperties({name:n,end:a});t.Push(o.apply(void 0,r([t,s],e(i.slice(1)),!1)))},splitOptions:function(t,e){return void 0===e&&(e=null),i.default.keyvalOptions(t,e,!0)},columnCount:function(t){var e,r,o=0;try{for(var i=n(t.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value,l=s.childNodes.length-(s.isKind("mlabeledtr")?1:0);l>o&&(o=l)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o},cellBlock:function(t,e,r,o){var i,s,l=r.create("node","mpadded",[],{height:0,depth:0,voffset:"-1height"}),c=new a.default(t,r.stack.env,r.configuration),u=c.mml();o&&c.configuration.tags.label&&(c.configuration.tags.currentTag.env=o,c.configuration.tags.getTag(!0));try{for(var d=n(u.isInferred?u.childNodes:[u]),p=d.next();!p.done;p=d.next()){var m=p.value;l.appendChild(m)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}return l.appendChild(r.create("node","mphantom",[r.create("node","mpadded",[e],{width:0})])),l},topRowTable:function(t,e){var r=i.default.copyNode(t,e);return r.setChildren(r.childNodes.slice(0,1)),r.attributes.set("align","baseline 1"),t.factory.create("mphantom",{},[e.create("node","mpadded",[r],{width:0})])},rowspanCell:function(t,e,r,n,o){t.appendChild(n.create("node","mpadded",[this.cellBlock(e,i.default.copyNode(r,n),n,o),this.topRowTable(r,n)],{height:0,depth:0,voffset:"height"}))},left:function(t,e,r,o,i){var a,s,l;void 0===i&&(i=""),t.attributes.set("columnalign","right "+(t.attributes.get("columnalign")||"")),t.attributes.set("columnspacing","0em "+(t.attributes.get("columnspacing")||""));try{for(var c=n(t.childNodes.slice(0).reverse()),u=c.next();!u.done;u=c.next()){var d=u.value;l=o.create("node","mtd"),d.childNodes.unshift(l),l.parent=d,d.isKind("mlabeledtr")&&(d.childNodes[0]=d.childNodes[1],d.childNodes[1]=l)}}catch(t){a={error:t}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}this.rowspanCell(l,r,e,o,i)},right:function(e,r,n,o,i){void 0===i&&(i=""),0===e.childNodes.length&&e.appendChild(o.create("node","mtr"));for(var a=t.EmpheqUtil.columnCount(e),s=e.childNodes[0];s.childNodes.length<a;)s.appendChild(o.create("node","mtd"));var l=s.appendChild(o.create("node","mtd"));t.EmpheqUtil.rowspanCell(l,n,r,o,i),e.attributes.set("columnalign",(e.attributes.get("columnalign")||"").split(/ /).slice(0,a).join(" ")+" left"),e.attributes.set("columnspacing",(e.attributes.get("columnspacing")||"").split(/ /).slice(0,a-1).join(" ")+" 0em")},adjustTable:function(t,e){var r=t.getProperty("left"),n=t.getProperty("right");if(r||n){var o=t.Last,a=i.default.copyNode(o,e);r&&this.left(o,a,r,e),n&&this.right(o,a,n,e)}},allowEnv:{equation:!0,align:!0,gather:!0,flalign:!0,alignat:!0,multline:!0},checkEnv:function(t){return this.allowEnv.hasOwnProperty(t.replace(/\*$/,""))||!1}}}(EmpheqUtil),getDefaultExportFromCjs(EmpheqUtil),function(t){var e,r=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.CasesConfiguration=t.CasesMethods=t.CasesTags=t.CasesBeginItem=void 0;var o=Configuration,i=SymbolMap,a=n(ParseUtil$1),s=n(BaseMethods$1),l=n(TexError$1),c=AmsConfiguration,u=EmpheqUtil,d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"cases-begin"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){return e.isKind("end")&&e.getName()===this.getName()&&this.getProperty("end")?(this.setProperty("end",!1),[[],!0]):t.prototype.checkItem.call(this,e)},e}(BaseItems.BeginItem);t.CasesBeginItem=d;var p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.subcounter=0,e}return r(e,t),e.prototype.start=function(e,r,n){this.subcounter=0,t.prototype.start.call(this,e,r,n)},e.prototype.autoTag=function(){null==this.currentTag.tag&&("subnumcases"===this.currentTag.env?(0===this.subcounter&&this.counter++,this.subcounter++,this.tag(this.formatNumber(this.counter,this.subcounter),!1)):(0!==this.subcounter&&"numcases-left"===this.currentTag.env||this.counter++,this.tag(this.formatNumber(this.counter),!1)))},e.prototype.formatNumber=function(t,e){return void 0===e&&(e=null),t.toString()+(null===e?"":String.fromCharCode(96+e))},e}(c.AmsTags);t.CasesTags=p,t.CasesMethods={NumCases:function(t,e){if(t.stack.env.closing===e.getName()){delete t.stack.env.closing,t.Push(t.itemFactory.create("end").setProperty("name",e.getName()));var r=t.stack.Top(),n=r.Last,o=a.default.copyNode(n,t),i=r.getProperty("left");return u.EmpheqUtil.left(n,o,i+"\\empheqlbrace\\,",t,"numcases-left"),t.Push(t.itemFactory.create("end").setProperty("name",e.getName())),null}i=t.GetArgument("\\begin{"+e.getName()+"}");e.setProperty("left",i);var l=s.default.EqnArray(t,e,!0,!0,"ll");return l.arraydef.displaystyle=!1,l.arraydef.rowspacing=".2em",l.setProperty("numCases",!0),t.Push(e),l},Entry:function(t,e){if(!t.stack.Top().getProperty("numCases"))return s.default.Entry(t,e);t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}));for(var r=t.string,n=0,o=t.i,i=r.length;o<i;){var c=r.charAt(o);if("{"===c)n++,o++;else if("}"===c){if(0===n)break;n--,o++}else{if("&"===c&&0===n)throw new l.default("ExtraCasesAlignTab","Extra alignment tab in text for numcase environment");if("\\"===c&&0===n){var u=(r.slice(o+1).match(/^[a-z]+|./i)||[])[0];if("\\"===u||"cr"===u||"end"===u||"label"===u)break;o+=u.length}else o++}}var d=r.substr(t.i,o-t.i).replace(/^\s*/,"");t.PushAll(a.default.internalMath(t,d,0)),t.i=o}},new i.EnvironmentMap("cases-env",u.EmpheqUtil.environment,{numcases:["NumCases","cases"],subnumcases:["NumCases","cases"]},t.CasesMethods),new i.MacroMap("cases-macros",{"&":"Entry"},t.CasesMethods),t.CasesConfiguration=o.Configuration.create("cases",{handler:{environment:["cases-env"],character:["cases-macros"]},items:(e={},e[d.prototype.kind]=d,e),tags:{cases:p}})}(CasesConfiguration),getDefaultExportFromCjs(CasesConfiguration);var CenternotConfiguration={},__values$5=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$m=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CenternotConfiguration,"__esModule",{value:!0}),CenternotConfiguration.CenternotConfiguration=CenternotConfiguration.filterCenterOver=void 0;var Configuration_js_1$e=Configuration,TexParser_js_1$5=__importDefault$m(TexParser$1),NodeUtil_js_1$5=__importDefault$m(NodeUtil$1),SymbolMap_js_1$c=SymbolMap,BaseMethods_js_1$4=__importDefault$m(BaseMethods$1);function filterCenterOver(t){var e,r,n=t.data;try{for(var o=__values$5(n.getList("centerOver")),i=o.next();!i.done;i=o.next()){var a=i.value,s=NodeUtil_js_1$5.default.getTexClass(a.childNodes[0].childNodes[0]);null!==s&&NodeUtil_js_1$5.default.setProperties(a.parent.parent.parent.parent.parent.parent,{texClass:s})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}new SymbolMap_js_1$c.CommandMap("centernot",{centerOver:"CenterOver",centernot:["Macro","\\centerOver{#1}{{⧸}}",1]},{CenterOver:function(t,e){var r="{"+t.GetArgument(e)+"}",n=t.ParseArg(e),o=new TexParser_js_1$5.default(r,t.stack.env,t.configuration).mml(),i=t.create("node","TeXAtom",[new TexParser_js_1$5.default(r,t.stack.env,t.configuration).mml(),t.create("node","mpadded",[t.create("node","mpadded",[n],{width:0,lspace:"-.5width"}),t.create("node","mphantom",[o])],{width:0,lspace:"-.5width"})]);t.configuration.addNode("centerOver",o),t.Push(i)},Macro:BaseMethods_js_1$4.default.Macro}),CenternotConfiguration.filterCenterOver=filterCenterOver,CenternotConfiguration.CenternotConfiguration=Configuration_js_1$e.Configuration.create("centernot",{handler:{macro:["centernot"]},postprocessors:[filterCenterOver]});var ColorConfiguration={},ColorMethods={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.ColorMethods=void 0;var r=e(NodeUtil$1),n=e(ParseUtil$1);function o(t){var e="+".concat(t),r=t.replace(/^.*?([a-z]*)$/,"$1"),n=2*parseFloat(e);return{width:"+".concat(n).concat(r),height:e,depth:e,lspace:t}}t.ColorMethods={},t.ColorMethods.Color=function(t,e){var r=t.GetBrackets(e,""),n=t.GetArgument(e),o=t.configuration.packageData.get("color").model.getColor(r,n),i=t.itemFactory.create("style").setProperties({styles:{mathcolor:o}});t.stack.env.color=o,t.Push(i)},t.ColorMethods.TextColor=function(t,e){var r=t.GetBrackets(e,""),n=t.GetArgument(e),o=t.configuration.packageData.get("color").model.getColor(r,n),i=t.stack.env.color;t.stack.env.color=o;var a=t.ParseArg(e);i?t.stack.env.color=i:delete t.stack.env.color;var s=t.create("node","mstyle",[a],{mathcolor:o});t.Push(s)},t.ColorMethods.DefineColor=function(t,e){var r=t.GetArgument(e),n=t.GetArgument(e),o=t.GetArgument(e);t.configuration.packageData.get("color").model.defineColor(n,r,o)},t.ColorMethods.ColorBox=function(t,e){var i=t.GetArgument(e),a=n.default.internalMath(t,t.GetArgument(e)),s=t.configuration.packageData.get("color").model,l=t.create("node","mpadded",a,{mathbackground:s.getColor("named",i)});r.default.setProperties(l,o(t.options.color.padding)),t.Push(l)},t.ColorMethods.FColorBox=function(t,e){var i=t.GetArgument(e),a=t.GetArgument(e),s=n.default.internalMath(t,t.GetArgument(e)),l=t.options.color,c=t.configuration.packageData.get("color").model,u=t.create("node","mpadded",s,{mathbackground:c.getColor("named",a),style:"border: ".concat(l.borderWidth," solid ").concat(c.getColor("named",i))});r.default.setProperties(u,o(l.padding)),t.Push(u)}}(ColorMethods),getDefaultExportFromCjs(ColorMethods);var ColorUtil={},ColorConstants={};Object.defineProperty(ColorConstants,"__esModule",{value:!0}),ColorConstants.COLORS=void 0,ColorConstants.COLORS=new Map([["Apricot","#FBB982"],["Aquamarine","#00B5BE"],["Bittersweet","#C04F17"],["Black","#221E1F"],["Blue","#2D2F92"],["BlueGreen","#00B3B8"],["BlueViolet","#473992"],["BrickRed","#B6321C"],["Brown","#792500"],["BurntOrange","#F7921D"],["CadetBlue","#74729A"],["CarnationPink","#F282B4"],["Cerulean","#00A2E3"],["CornflowerBlue","#41B0E4"],["Cyan","#00AEEF"],["Dandelion","#FDBC42"],["DarkOrchid","#A4538A"],["Emerald","#00A99D"],["ForestGreen","#009B55"],["Fuchsia","#8C368C"],["Goldenrod","#FFDF42"],["Gray","#949698"],["Green","#00A64F"],["GreenYellow","#DFE674"],["JungleGreen","#00A99A"],["Lavender","#F49EC4"],["LimeGreen","#8DC73E"],["Magenta","#EC008C"],["Mahogany","#A9341F"],["Maroon","#AF3235"],["Melon","#F89E7B"],["MidnightBlue","#006795"],["Mulberry","#A93C93"],["NavyBlue","#006EB8"],["OliveGreen","#3C8031"],["Orange","#F58137"],["OrangeRed","#ED135A"],["Orchid","#AF72B0"],["Peach","#F7965A"],["Periwinkle","#7977B8"],["PineGreen","#008B72"],["Plum","#92268F"],["ProcessBlue","#00B0F0"],["Purple","#99479B"],["RawSienna","#974006"],["Red","#ED1B23"],["RedOrange","#F26035"],["RedViolet","#A1246B"],["Rhodamine","#EF559F"],["RoyalBlue","#0071BC"],["RoyalPurple","#613F99"],["RubineRed","#ED017D"],["Salmon","#F69289"],["SeaGreen","#3FBC9D"],["Sepia","#671800"],["SkyBlue","#46C5DD"],["SpringGreen","#C6DC67"],["Tan","#DA9D76"],["TealBlue","#00AEB3"],["Thistle","#D883B7"],["Turquoise","#00B4CE"],["Violet","#58429B"],["VioletRed","#EF58A0"],["White","#FFFFFF"],["WildStrawberry","#EE2967"],["Yellow","#FFF200"],["YellowGreen","#98CC70"],["YellowOrange","#FAA21A"]]);var __values$4=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$l=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ColorUtil,"__esModule",{value:!0}),ColorUtil.ColorModel=void 0;var TexError_js_1$9=__importDefault$l(TexError$1),ColorConstants_js_1=ColorConstants,ColorModelProcessors=new Map,ColorModel=function(){function t(){this.userColors=new Map}return t.prototype.normalizeColor=function(t,e){if(!t||"named"===t)return e;if(ColorModelProcessors.has(t))return ColorModelProcessors.get(t)(e);throw new TexError_js_1$9.default("UndefinedColorModel","Color model '%1' not defined",t)},t.prototype.getColor=function(t,e){return t&&"named"!==t?this.normalizeColor(t,e):this.getColorByName(e)},t.prototype.getColorByName=function(t){return this.userColors.has(t)?this.userColors.get(t):ColorConstants_js_1.COLORS.has(t)?ColorConstants_js_1.COLORS.get(t):t},t.prototype.defineColor=function(t,e,r){var n=this.normalizeColor(t,r);this.userColors.set(e,n)},t}();ColorUtil.ColorModel=ColorModel,ColorModelProcessors.set("rgb",(function(t){var e,r,n=t.trim().split(/\s*,\s*/),o="#";if(3!==n.length)throw new TexError_js_1$9.default("ModelArg1","Color values for the %1 model require 3 numbers","rgb");try{for(var i=__values$4(n),a=i.next();!a.done;a=i.next()){var s=a.value;if(!s.match(/^(\d+(\.\d*)?|\.\d+)$/))throw new TexError_js_1$9.default("InvalidDecimalNumber","Invalid decimal number");var l=parseFloat(s);if(l<0||l>1)throw new TexError_js_1$9.default("ModelArg2","Color values for the %1 model must be between %2 and %3","rgb","0","1");var c=Math.floor(255*l).toString(16);c.length<2&&(c="0"+c),o+=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o})),ColorModelProcessors.set("RGB",(function(t){var e,r,n=t.trim().split(/\s*,\s*/),o="#";if(3!==n.length)throw new TexError_js_1$9.default("ModelArg1","Color values for the %1 model require 3 numbers","RGB");try{for(var i=__values$4(n),a=i.next();!a.done;a=i.next()){var s=a.value;if(!s.match(/^\d+$/))throw new TexError_js_1$9.default("InvalidNumber","Invalid number");var l=parseInt(s);if(l>255)throw new TexError_js_1$9.default("ModelArg2","Color values for the %1 model must be between %2 and %3","RGB","0","255");var c=l.toString(16);c.length<2&&(c="0"+c),o+=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o})),ColorModelProcessors.set("gray",(function(t){if(!t.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/))throw new TexError_js_1$9.default("InvalidDecimalNumber","Invalid decimal number");var e=parseFloat(t);if(e<0||e>1)throw new TexError_js_1$9.default("ModelArg2","Color values for the %1 model must be between %2 and %3","gray","0","1");var r=Math.floor(255*e).toString(16);return r.length<2&&(r="0"+r),"#".concat(r).concat(r).concat(r)})),Object.defineProperty(ColorConfiguration,"__esModule",{value:!0}),ColorConfiguration.ColorConfiguration=void 0;var SymbolMap_js_1$b=SymbolMap,Configuration_js_1$d=Configuration,ColorMethods_js_1=ColorMethods,ColorUtil_js_1=ColorUtil;new SymbolMap_js_1$b.CommandMap("color",{color:"Color",textcolor:"TextColor",definecolor:"DefineColor",colorbox:"ColorBox",fcolorbox:"FColorBox"},ColorMethods_js_1.ColorMethods);var config$1=function(t,e){e.parseOptions.packageData.set("color",{model:new ColorUtil_js_1.ColorModel})};ColorConfiguration.ColorConfiguration=Configuration_js_1$d.Configuration.create("color",{handler:{macro:["color"]},options:{color:{padding:"5px",borderWidth:"2px"}},config:config$1});var ColorV2Configuration={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConfiguration=t.ColorV2Methods=void 0;var e=SymbolMap,r=Configuration;t.ColorV2Methods={Color:function(t,e){var r=t.GetArgument(e),n=t.stack.env.color;t.stack.env.color=r;var o=t.ParseArg(e);n?t.stack.env.color=n:delete t.stack.env.color;var i=t.create("node","mstyle",[o],{mathcolor:r});t.Push(i)}},new e.CommandMap("colorv2",{color:"Color"},t.ColorV2Methods),t.ColorConfiguration=r.Configuration.create("colorv2",{handler:{macro:["colorv2"]}})}(ColorV2Configuration),getDefaultExportFromCjs(ColorV2Configuration);var ColortblConfiguration={},__extends$6=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault$k=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ColortblConfiguration,"__esModule",{value:!0}),ColortblConfiguration.ColortblConfiguration=ColortblConfiguration.ColorArrayItem=void 0;var BaseItems_js_1$3=BaseItems,Configuration_js_1$c=Configuration,SymbolMap_js_1$a=SymbolMap,TexError_js_1$8=__importDefault$k(TexError$1),ColorArrayItem=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.color={cell:"",row:"",col:[]},e.hasColor=!1,e}return __extends$6(e,t),e.prototype.EndEntry=function(){t.prototype.EndEntry.call(this);var e=this.row[this.row.length-1],r=this.color.cell||this.color.row||this.color.col[this.row.length-1];r&&(e.attributes.set("mathbackground",r),this.color.cell="",this.hasColor=!0)},e.prototype.EndRow=function(){t.prototype.EndRow.call(this),this.color.row=""},e.prototype.createMml=function(){var e=t.prototype.createMml.call(this),r=e.isKind("mrow")?e.childNodes[1]:e;return r.isKind("menclose")&&(r=r.childNodes[0].childNodes[0]),this.hasColor&&"none"===r.attributes.get("frame")&&r.attributes.set("frame",""),e},e}(BaseItems_js_1$3.ArrayItem);ColortblConfiguration.ColorArrayItem=ColorArrayItem,new SymbolMap_js_1$a.CommandMap("colortbl",{cellcolor:["TableColor","cell"],rowcolor:["TableColor","row"],columncolor:["TableColor","col"]},{TableColor:function(t,e,r){var n=t.configuration.packageData.get("color").model,o=t.GetBrackets(e,""),i=n.getColor(o,t.GetArgument(e)),a=t.stack.Top();if(!(a instanceof ColorArrayItem))throw new TexError_js_1$8.default("UnsupportedTableColor","Unsupported use of %1",t.currentCS);if("col"===r){if(a.table.length)throw new TexError_js_1$8.default("ColumnColorNotTop","%1 must be in the top row",e);a.color.col[a.row.length]=i,t.GetBrackets(e,"")&&t.GetBrackets(e,"")}else if(a.color[r]=i,"row"===r&&(a.Size()||a.row.length))throw new TexError_js_1$8.default("RowColorNotFirst","%1 must be at the beginning of a row",e)}});var config=function(t,e){e.parseOptions.packageData.has("color")||Configuration_js_1$c.ConfigurationHandler.get("color").config(t,e)};ColortblConfiguration.ColortblConfiguration=Configuration_js_1$c.Configuration.create("colortbl",{handler:{macro:["colortbl"]},items:{array:ColorArrayItem},priority:10,config:[config,10]});var ConfigMacrosConfiguration={},NewcommandMethods$1={},NewcommandUtil$1={},__importDefault$j=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NewcommandUtil$1,"__esModule",{value:!0});var ParseUtil_js_1$6=__importDefault$j(ParseUtil$1),TexError_js_1$7=__importDefault$j(TexError$1),Symbol_js_1$2=_Symbol,NewcommandUtil;!function(t){function e(t,e){return t.string.substr(t.i,e.length)!==e||e.match(/\\[a-z]+$/i)&&t.string.charAt(t.i+e.length).match(/[a-z]/i)?0:(t.i+=e.length,1)}t.disassembleSymbol=function(t,e){var r=[t,e.char];if(e.attributes)for(var n in e.attributes)r.push(n),r.push(e.attributes[n]);return r},t.assembleSymbol=function(t){for(var e=t[0],r=t[1],n={},o=2;o<t.length;o+=2)n[t[o]]=t[o+1];return new Symbol_js_1$2.Symbol(e,r,n)},t.GetCSname=function(t,e){if("\\"!==t.GetNext())throw new TexError_js_1$7.default("MissingCS","%1 must be followed by a control sequence",e);return ParseUtil_js_1$6.default.trimSpaces(t.GetArgument(e)).substr(1)},t.GetCsNameArgument=function(t,e){var r=ParseUtil_js_1$6.default.trimSpaces(t.GetArgument(e));if("\\"===r.charAt(0)&&(r=r.substr(1)),!r.match(/^(.|[a-z]+)$/i))throw new TexError_js_1$7.default("IllegalControlSequenceName","Illegal control sequence name for %1",e);return r},t.GetArgCount=function(t,e){var r=t.GetBrackets(e);if(r&&!(r=ParseUtil_js_1$6.default.trimSpaces(r)).match(/^[0-9]+$/))throw new TexError_js_1$7.default("IllegalParamNumber","Illegal number of parameters specified in %1",e);return r},t.GetTemplate=function(t,e,r){for(var n=t.GetNext(),o=[],i=0,a=t.i;t.i<t.string.length;){if("#"===(n=t.GetNext())){if(a!==t.i&&(o[i]=t.string.substr(a,t.i-a)),!(n=t.string.charAt(++t.i)).match(/^[1-9]$/))throw new TexError_js_1$7.default("CantUseHash2","Illegal use of # in template for %1",r);if(parseInt(n)!==++i)throw new TexError_js_1$7.default("SequentialParam","Parameters for %1 must be numbered sequentially",r);a=t.i+1}else if("{"===n)return a!==t.i&&(o[i]=t.string.substr(a,t.i-a)),o.length>0?[i.toString()].concat(o):i;t.i++}throw new TexError_js_1$7.default("MissingReplacementString","Missing replacement string for definition of %1",e)},t.GetParameter=function(t,r,n){if(null==n)return t.GetArgument(r);for(var o=t.i,i=0,a=0;t.i<t.string.length;){var s=t.string.charAt(t.i);if("{"===s)t.i===o&&(a=1),t.GetArgument(r),i=t.i-o;else{if(e(t,n))return a&&(o++,i-=2),t.string.substr(o,i);if("\\"===s){t.i++,i++,a=0;var l=t.string.substr(t.i).match(/[a-z]+|./i);l&&(t.i+=l[0].length,i=t.i-o)}else t.i++,i++,a=0}}throw new TexError_js_1$7.default("RunawayArgument","Runaway argument for %1?",r)},t.MatchParam=e,t.addDelimiter=function(e,r,n,o){e.configuration.handlers.retrieve(t.NEW_DELIMITER).add(r,new Symbol_js_1$2.Symbol(r,n,o))},t.addMacro=function(e,r,n,o,i){void 0===i&&(i=""),e.configuration.handlers.retrieve(t.NEW_COMMAND).add(r,new Symbol_js_1$2.Macro(i||r,n,o))},t.addEnvironment=function(e,r,n,o){e.configuration.handlers.retrieve(t.NEW_ENVIRONMENT).add(r,new Symbol_js_1$2.Macro(r,n,o))},t.NEW_DELIMITER="new-Delimiter",t.NEW_COMMAND="new-Command",t.NEW_ENVIRONMENT="new-Environment"}(NewcommandUtil||(NewcommandUtil={})),NewcommandUtil$1.default=NewcommandUtil;var __createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding$1(e,t,r);return __setModuleDefault$1(e,t),e},__importDefault$i=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NewcommandMethods$1,"__esModule",{value:!0});var TexError_js_1$6=__importDefault$i(TexError$1),sm$1=__importStar$1(SymbolMap),BaseMethods_js_1$3=__importDefault$i(BaseMethods$1),ParseUtil_js_1$5=__importDefault$i(ParseUtil$1),NewcommandUtil_js_1$1=__importDefault$i(NewcommandUtil$1),NewcommandMethods={NewCommand:function(t,e){var r=NewcommandUtil_js_1$1.default.GetCsNameArgument(t,e),n=NewcommandUtil_js_1$1.default.GetArgCount(t,e),o=t.GetBrackets(e),i=t.GetArgument(e);NewcommandUtil_js_1$1.default.addMacro(t,r,NewcommandMethods.Macro,[i,n,o])},NewEnvironment:function(t,e){var r=ParseUtil_js_1$5.default.trimSpaces(t.GetArgument(e)),n=NewcommandUtil_js_1$1.default.GetArgCount(t,e),o=t.GetBrackets(e),i=t.GetArgument(e),a=t.GetArgument(e);NewcommandUtil_js_1$1.default.addEnvironment(t,r,NewcommandMethods.BeginEnv,[!0,i,a,n,o])},MacroDef:function(t,e){var r=NewcommandUtil_js_1$1.default.GetCSname(t,e),n=NewcommandUtil_js_1$1.default.GetTemplate(t,e,"\\"+r),o=t.GetArgument(e);n instanceof Array?NewcommandUtil_js_1$1.default.addMacro(t,r,NewcommandMethods.MacroWithTemplate,[o].concat(n)):NewcommandUtil_js_1$1.default.addMacro(t,r,NewcommandMethods.Macro,[o,n])},Let:function(t,e){var r=NewcommandUtil_js_1$1.default.GetCSname(t,e),n=t.GetNext();"="===n&&(t.i++,n=t.GetNext());var o=t.configuration.handlers;if("\\"!==n){t.i++;var i=o.get("delimiter").lookup(n);i?NewcommandUtil_js_1$1.default.addDelimiter(t,"\\"+r,i.char,i.attributes):NewcommandUtil_js_1$1.default.addMacro(t,r,NewcommandMethods.Macro,[n])}else{e=NewcommandUtil_js_1$1.default.GetCSname(t,e);var a=o.get("delimiter").lookup("\\"+e);if(a)return void NewcommandUtil_js_1$1.default.addDelimiter(t,"\\"+r,a.char,a.attributes);var s=o.get("macro").applicable(e);if(!s)return;if(s instanceof sm$1.MacroMap){var l=s.lookup(e);return void NewcommandUtil_js_1$1.default.addMacro(t,r,l.func,l.args,l.symbol)}a=s.lookup(e);var c=NewcommandUtil_js_1$1.default.disassembleSymbol(r,a);NewcommandUtil_js_1$1.default.addMacro(t,r,(function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=NewcommandUtil_js_1$1.default.assembleSymbol(r);return s.parser(t,o)}),c)}},MacroWithTemplate:function(t,e,r,n){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var a=parseInt(n,10);if(a){var s=[];if(t.GetNext(),o[0]&&!NewcommandUtil_js_1$1.default.MatchParam(t,o[0]))throw new TexError_js_1$6.default("MismatchUseDef","Use of %1 doesn't match its definition",e);for(var l=0;l<a;l++)s.push(NewcommandUtil_js_1$1.default.GetParameter(t,e,o[l+1]));r=ParseUtil_js_1$5.default.substituteArgs(t,s,r)}t.string=ParseUtil_js_1$5.default.addArgs(t,r,t.string.slice(t.i)),t.i=0,ParseUtil_js_1$5.default.checkMaxMacros(t)},BeginEnv:function(t,e,r,n,o,i){if(e.getProperty("end")&&t.stack.env.closing===e.getName()){delete t.stack.env.closing;var a=t.string.slice(t.i);return t.string=n,t.i=0,t.Parse(),t.string=a,t.i=0,t.itemFactory.create("end").setProperty("name",e.getName())}if(o){var s=[];if(null!=i){var l=t.GetBrackets("\\begin{"+e.getName()+"}");s.push(null==l?i:l)}for(var c=s.length;c<o;c++)s.push(t.GetArgument("\\begin{"+e.getName()+"}"));r=ParseUtil_js_1$5.default.substituteArgs(t,s,r),n=ParseUtil_js_1$5.default.substituteArgs(t,[],n)}return t.string=ParseUtil_js_1$5.default.addArgs(t,r,t.string.slice(t.i)),t.i=0,t.itemFactory.create("beginEnv").setProperty("name",e.getName())}};NewcommandMethods.Macro=BaseMethods_js_1$3.default.Macro,NewcommandMethods$1.default=NewcommandMethods;var NewcommandItems={},__extends$5=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault$h=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NewcommandItems,"__esModule",{value:!0}),NewcommandItems.BeginEnvItem=void 0;var TexError_js_1$5=__importDefault$h(TexError$1),StackItem_js_1$1=StackItem,BeginEnvItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$5(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"beginEnv"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){if(e.isKind("end")){if(e.getName()!==this.getName())throw new TexError_js_1$5.default("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),e.getName());return[[this.factory.create("mml",this.toMml())],!0]}if(e.isKind("stop"))throw new TexError_js_1$5.default("EnvMissingEnd","Missing \\end{%1}",this.getName());return t.prototype.checkItem.call(this,e)},e}(StackItem_js_1$1.BaseItem);NewcommandItems.BeginEnvItem=BeginEnvItem;var __values$3=commonjsGlobal&&commonjsGlobal.__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.")},__importDefault$g=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_a$3;Object.defineProperty(ConfigMacrosConfiguration,"__esModule",{value:!0}),ConfigMacrosConfiguration.ConfigMacrosConfiguration=void 0;var Configuration_js_1$b=Configuration,Options_js_1$1=Options,SymbolMap_js_1$9=SymbolMap,ParseMethods_js_1$3=__importDefault$g(ParseMethods$1),Symbol_js_1$1=_Symbol,NewcommandMethods_js_1$1=__importDefault$g(NewcommandMethods$1),NewcommandItems_js_1$1=NewcommandItems,MACROSMAP="configmacros-map",ENVIRONMENTMAP="configmacros-env-map";function configmacrosInit(t){new SymbolMap_js_1$9.CommandMap(MACROSMAP,{},{}),new SymbolMap_js_1$9.EnvironmentMap(ENVIRONMENTMAP,ParseMethods_js_1$3.default.environment,{},{}),t.append(Configuration_js_1$b.Configuration.local({handler:{macro:[MACROSMAP],environment:[ENVIRONMENTMAP]},priority:3}))}function configmacrosConfig(t,e){configMacros(e),configEnvironments(e)}function configMacros(t){var e,r,n=t.parseOptions.handlers.retrieve(MACROSMAP),o=t.parseOptions.options.macros;try{for(var i=__values$3(Object.keys(o)),a=i.next();!a.done;a=i.next()){var s=a.value,l="string"==typeof o[s]?[o[s]]:o[s],c=Array.isArray(l[2])?new Symbol_js_1$1.Macro(s,NewcommandMethods_js_1$1.default.MacroWithTemplate,l.slice(0,2).concat(l[2])):new Symbol_js_1$1.Macro(s,NewcommandMethods_js_1$1.default.Macro,l);n.add(s,c)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}function configEnvironments(t){var e,r,n=t.parseOptions.handlers.retrieve(ENVIRONMENTMAP),o=t.parseOptions.options.environments;try{for(var i=__values$3(Object.keys(o)),a=i.next();!a.done;a=i.next()){var s=a.value;n.add(s,new Symbol_js_1$1.Macro(s,NewcommandMethods_js_1$1.default.BeginEnv,[!0].concat(o[s])))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}ConfigMacrosConfiguration.ConfigMacrosConfiguration=Configuration_js_1$b.Configuration.create("configmacros",{init:configmacrosInit,config:configmacrosConfig,items:(_a$3={},_a$3[NewcommandItems_js_1$1.BeginEnvItem.prototype.kind]=NewcommandItems_js_1$1.BeginEnvItem,_a$3),options:{macros:(0,Options_js_1$1.expandable)({}),environments:(0,Options_js_1$1.expandable)({})}});var EmpheqConfiguration={};!function(t){var e,r=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},o=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.EmpheqConfiguration=t.EmpheqMethods=t.EmpheqBeginItem=void 0;var i=Configuration,a=SymbolMap,s=o(ParseUtil$1),l=o(TexError$1),c=EmpheqUtil,u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"empheq-begin"},enumerable:!1,configurable:!0}),e.prototype.checkItem=function(e){return e.isKind("end")&&e.getName()===this.getName()&&this.setProperty("end",!1),t.prototype.checkItem.call(this,e)},e}(BaseItems.BeginItem);t.EmpheqBeginItem=u,t.EmpheqMethods={Empheq:function(t,e){if(t.stack.env.closing===e.getName()){delete t.stack.env.closing,t.Push(t.itemFactory.create("end").setProperty("name",t.stack.global.empheq)),t.stack.global.empheq="";var r=t.stack.Top();c.EmpheqUtil.adjustTable(r,t),t.Push(t.itemFactory.create("end").setProperty("name","empheq"))}else{s.default.checkEqnEnv(t),delete t.stack.global.eqnenv;var o=t.GetBrackets("\\begin{"+e.getName()+"}")||"",i=n((t.GetArgument("\\begin{"+e.getName()+"}")||"").split(/=/),2),a=i[0],u=i[1];if(!c.EmpheqUtil.checkEnv(a))throw new l.default("UnknownEnv",'Unknown environment "%1"',a);o&&e.setProperties(c.EmpheqUtil.splitOptions(o,{left:1,right:1})),t.stack.global.empheq=a,t.string="\\begin{"+a+"}"+(u?"{"+u+"}":"")+t.string.slice(t.i),t.i=0,t.Push(e)}},EmpheqMO:function(t,e,r){t.Push(t.create("token","mo",{},r))},EmpheqDelim:function(t,e){var r=t.GetDelimiter(e);t.Push(t.create("token","mo",{stretchy:!0,symmetric:!0},r))}},new a.EnvironmentMap("empheq-env",c.EmpheqUtil.environment,{empheq:["Empheq","empheq"]},t.EmpheqMethods),new a.CommandMap("empheq-macros",{empheqlbrace:["EmpheqMO","{"],empheqrbrace:["EmpheqMO","}"],empheqlbrack:["EmpheqMO","["],empheqrbrack:["EmpheqMO","]"],empheqlangle:["EmpheqMO","⟨"],empheqrangle:["EmpheqMO","⟩"],empheqlparen:["EmpheqMO","("],empheqrparen:["EmpheqMO",")"],empheqlvert:["EmpheqMO","|"],empheqrvert:["EmpheqMO","|"],empheqlVert:["EmpheqMO","‖"],empheqrVert:["EmpheqMO","‖"],empheqlfloor:["EmpheqMO","⌊"],empheqrfloor:["EmpheqMO","⌋"],empheqlceil:["EmpheqMO","⌈"],empheqrceil:["EmpheqMO","⌉"],empheqbiglbrace:["EmpheqMO","{"],empheqbigrbrace:["EmpheqMO","}"],empheqbiglbrack:["EmpheqMO","["],empheqbigrbrack:["EmpheqMO","]"],empheqbiglangle:["EmpheqMO","⟨"],empheqbigrangle:["EmpheqMO","⟩"],empheqbiglparen:["EmpheqMO","("],empheqbigrparen:["EmpheqMO",")"],empheqbiglvert:["EmpheqMO","|"],empheqbigrvert:["EmpheqMO","|"],empheqbiglVert:["EmpheqMO","‖"],empheqbigrVert:["EmpheqMO","‖"],empheqbiglfloor:["EmpheqMO","⌊"],empheqbigrfloor:["EmpheqMO","⌋"],empheqbiglceil:["EmpheqMO","⌈"],empheqbigrceil:["EmpheqMO","⌉"],empheql:"EmpheqDelim",empheqr:"EmpheqDelim",empheqbigl:"EmpheqDelim",empheqbigr:"EmpheqDelim"},t.EmpheqMethods),t.EmpheqConfiguration=i.Configuration.create("empheq",{handler:{macro:["empheq-macros"],environment:["empheq-env"]},items:(e={},e[u.prototype.kind]=u,e)})}(EmpheqConfiguration),getDefaultExportFromCjs(EmpheqConfiguration);var ExtpfeilConfiguration={},NewcommandConfiguration={},NewcommandMappings={},__importDefault$f=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NewcommandMappings,"__esModule",{value:!0});var NewcommandMethods_js_1=__importDefault$f(NewcommandMethods$1),SymbolMap_js_1$8=SymbolMap;new SymbolMap_js_1$8.CommandMap("Newcommand-macros",{newcommand:"NewCommand",renewcommand:"NewCommand",newenvironment:"NewEnvironment",renewenvironment:"NewEnvironment",def:"MacroDef",let:"Let"},NewcommandMethods_js_1.default);var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&__createBinding(e,t,r);return __setModuleDefault(e,t),e},__importDefault$e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_a$2;Object.defineProperty(NewcommandConfiguration,"__esModule",{value:!0}),NewcommandConfiguration.NewcommandConfiguration=void 0;var Configuration_js_1$a=Configuration,NewcommandItems_js_1=NewcommandItems,NewcommandUtil_js_1=__importDefault$e(NewcommandUtil$1),ParseMethods_js_1$2=__importDefault$e(ParseMethods$1),sm=__importStar(SymbolMap),init=function(t){new sm.DelimiterMap(NewcommandUtil_js_1.default.NEW_DELIMITER,ParseMethods_js_1$2.default.delimiter,{}),new sm.CommandMap(NewcommandUtil_js_1.default.NEW_COMMAND,{},{}),new sm.EnvironmentMap(NewcommandUtil_js_1.default.NEW_ENVIRONMENT,ParseMethods_js_1$2.default.environment,{},{}),t.append(Configuration_js_1$a.Configuration.local({handler:{character:[],delimiter:[NewcommandUtil_js_1.default.NEW_DELIMITER],macro:[NewcommandUtil_js_1.default.NEW_DELIMITER,NewcommandUtil_js_1.default.NEW_COMMAND],environment:[NewcommandUtil_js_1.default.NEW_ENVIRONMENT]},priority:-1}))};NewcommandConfiguration.NewcommandConfiguration=Configuration_js_1$a.Configuration.create("newcommand",{handler:{macro:["Newcommand-macros"]},items:(_a$2={},_a$2[NewcommandItems_js_1.BeginEnvItem.prototype.kind]=NewcommandItems_js_1.BeginEnvItem,_a$2),options:{maxMacros:1e3},init:init}),function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtpfeilConfiguration=t.ExtpfeilMethods=void 0;var r=Configuration,n=SymbolMap,o=AmsMethods,i=e(NewcommandUtil$1),a=NewcommandConfiguration,s=e(TexError$1);t.ExtpfeilMethods={},t.ExtpfeilMethods.xArrow=o.AmsMethods.xArrow,t.ExtpfeilMethods.NewExtArrow=function(e,r){var n=e.GetArgument(r),o=e.GetArgument(r),a=e.GetArgument(r);if(!n.match(/^\\([a-z]+|.)$/i))throw new s.default("NewextarrowArg1","First argument to %1 must be a control sequence name",r);if(!o.match(/^(\d+),(\d+)$/))throw new s.default("NewextarrowArg2","Second argument to %1 must be two integers separated by a comma",r);if(!a.match(/^(\d+|0x[0-9A-F]+)$/i))throw new s.default("NewextarrowArg3","Third argument to %1 must be a unicode character number",r);n=n.substr(1);var l=o.split(",");i.default.addMacro(e,n,t.ExtpfeilMethods.xArrow,[parseInt(a),parseInt(l[0]),parseInt(l[1])])},new n.CommandMap("extpfeil",{xtwoheadrightarrow:["xArrow",8608,12,16],xtwoheadleftarrow:["xArrow",8606,17,13],xmapsto:["xArrow",8614,6,7],xlongequal:["xArrow",61,7,7],xtofrom:["xArrow",8644,12,12],Newextarrow:"NewExtArrow"},t.ExtpfeilMethods);t.ExtpfeilConfiguration=r.Configuration.create("extpfeil",{handler:{macro:["extpfeil"]},init:function(t){a.NewcommandConfiguration.init(t)}})}(ExtpfeilConfiguration),getDefaultExportFromCjs(ExtpfeilConfiguration);var GensymbConfiguration={};Object.defineProperty(GensymbConfiguration,"__esModule",{value:!0}),GensymbConfiguration.GensymbConfiguration=void 0;var Configuration_js_1$9=Configuration,TexConstants_js_1$6=TexConstants,SymbolMap_js_1$7=SymbolMap;function mathcharUnit(t,e){var r=e.attributes||{};r.mathvariant=TexConstants_js_1$6.TexConstant.Variant.NORMAL,r.class="MathML-Unit";var n=t.create("token","mi",r,e.char);t.Push(n)}new SymbolMap_js_1$7.CharacterMap("gensymb-symbols",mathcharUnit,{ohm:"Ω",degree:"°",celsius:"℃",perthousand:"‰",micro:"µ"}),GensymbConfiguration.GensymbConfiguration=Configuration_js_1$9.Configuration.create("gensymb",{handler:{macro:["gensymb-symbols"]}});var HtmlConfiguration={},HtmlMethods$1={},__importDefault$d=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(HtmlMethods$1,"__esModule",{value:!0});var NodeUtil_js_1$4=__importDefault$d(NodeUtil$1),HtmlMethods={Href:function(t,e){var r=t.GetArgument(e),n=GetArgumentMML(t,e);NodeUtil_js_1$4.default.setAttribute(n,"href",r),t.Push(n)},Class:function(t,e){var r=t.GetArgument(e),n=GetArgumentMML(t,e),o=NodeUtil_js_1$4.default.getAttribute(n,"class");o&&(r=o+" "+r),NodeUtil_js_1$4.default.setAttribute(n,"class",r),t.Push(n)},Style:function(t,e){var r=t.GetArgument(e),n=GetArgumentMML(t,e),o=NodeUtil_js_1$4.default.getAttribute(n,"style");o&&(";"!==r.charAt(r.length-1)&&(r+=";"),r=o+" "+r),NodeUtil_js_1$4.default.setAttribute(n,"style",r),t.Push(n)},Id:function(t,e){var r=t.GetArgument(e),n=GetArgumentMML(t,e);NodeUtil_js_1$4.default.setAttribute(n,"id",r),t.Push(n)}},GetArgumentMML=function(t,e){var r=t.ParseArg(e);if(!NodeUtil_js_1$4.default.isInferred(r))return r;var n=NodeUtil_js_1$4.default.getChildren(r);if(1===n.length)return n[0];var o=t.create("node","mrow");return NodeUtil_js_1$4.default.copyChildren(r,o),NodeUtil_js_1$4.default.copyAttributes(r,o),o};HtmlMethods$1.default=HtmlMethods;var __importDefault$c=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(HtmlConfiguration,"__esModule",{value:!0}),HtmlConfiguration.HtmlConfiguration=void 0;var Configuration_js_1$8=Configuration,SymbolMap_js_1$6=SymbolMap,HtmlMethods_js_1=__importDefault$c(HtmlMethods$1);new SymbolMap_js_1$6.CommandMap("html_macros",{href:"Href",class:"Class",style:"Style",cssId:"Id"},HtmlMethods_js_1.default),HtmlConfiguration.HtmlConfiguration=Configuration_js_1$8.Configuration.create("html",{handler:{macro:["html_macros"]}});var MathtoolsConfiguration={},MathtoolsMappings={},MathtoolsMethods={},MathtoolsUtil={},__read$3=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__importDefault$b=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MathtoolsUtil,"__esModule",{value:!0}),MathtoolsUtil.MathtoolsUtil=void 0;var BaseItems_js_1$2=BaseItems,ParseUtil_js_1$4=__importDefault$b(ParseUtil$1),TexParser_js_1$4=__importDefault$b(TexParser$1),TexError_js_1$4=__importDefault$b(TexError$1),Symbol_js_1=_Symbol,Options_js_1=Options,MathtoolsMethods_js_1$1=MathtoolsMethods,MathtoolsConfiguration_js_1=MathtoolsConfiguration;MathtoolsUtil.MathtoolsUtil={setDisplayLevel:function(t,e){if(e){var r=__read$3((0,Options_js_1.lookup)(e,{"\\displaystyle":[!0,0],"\\textstyle":[!1,0],"\\scriptstyle":[!1,1],"\\scriptscriptstyle":[!1,2]},[null,null]),2),n=r[0],o=r[1];null!==n&&(t.attributes.set("displaystyle",n),t.attributes.set("scriptlevel",o))}},checkAlignment:function(t,e){var r=t.stack.Top();if(r.kind!==BaseItems_js_1$2.EqnArrayItem.prototype.kind)throw new TexError_js_1$4.default("NotInAlignment","%1 can only be used in aligment environments",e);return r},addPairedDelims:function(t,e,r){t.handlers.retrieve(MathtoolsConfiguration_js_1.PAIREDDELIMS).add(e,new Symbol_js_1.Macro(e,MathtoolsMethods_js_1$1.MathtoolsMethods.PairedDelimiters,r))},spreadLines:function(t,e){if(t.isKind("mtable")){var r=t.attributes.get("rowspacing");if(r){var n=ParseUtil_js_1$4.default.dimen2em(e);r=r.split(/ /).map((function(t){return ParseUtil_js_1$4.default.Em(Math.max(0,ParseUtil_js_1$4.default.dimen2em(t)+n))})).join(" ")}else r=e;t.attributes.set("rowspacing",r)}},plusOrMinus:function(t,e){if(!(e=e.trim()).match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)$/))throw new TexError_js_1$4.default("NotANumber","Argument to %1 is not a number",t);return e.match(/^[-+]/)?e:"+"+e},getScript:function(t,e,r){var n=ParseUtil_js_1$4.default.trimSpaces(t.GetArgument(e));if(""===n)return t.create("node","none");var o=t.options.mathtools["prescript-".concat(r,"-format")];return o&&(n="".concat(o,"{").concat(n,"}")),new TexParser_js_1$4.default(n,t.stack.env,t.configuration).mml()}},function(t){var e=commonjsGlobal&&commonjsGlobal.__assign||function(){return e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)},r=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},n=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.MathtoolsMethods=void 0;var i=o(ParseUtil$1),a=AmsMethods,s=o(BaseMethods$1),l=o(TexParser$1),c=o(TexError$1),u=o(NodeUtil$1),d=MmlNode,p=lengths,m=Options,h=o(NewcommandUtil$1),f=o(NewcommandMethods$1),_=MathtoolsUtil;t.MathtoolsMethods={MtMatrix:function(e,r,n,o){var i=e.GetBrackets("\\begin{".concat(r.getName(),"}"),"c");return t.MathtoolsMethods.Array(e,r,n,o,i)},MtSmallMatrix:function(e,r,n,o,a){return a||(a=e.GetBrackets("\\begin{".concat(r.getName(),"}"),e.options.mathtools["smallmatrix-align"])),t.MathtoolsMethods.Array(e,r,n,o,a,i.default.Em(1/3),".2em","S",1)},MtMultlined:function(t,e){var n,o="\\begin{".concat(e.getName(),"}"),a=t.GetBrackets(o,t.options.mathtools["multlined-pos"]||"c"),s=a?t.GetBrackets(o,""):"";a&&!a.match(/^[cbt]$/)&&(s=(n=r([a,s],2))[0],a=n[1]),t.Push(e);var l=t.itemFactory.create("multlined",t,e);return l.arraydef={displaystyle:!0,rowspacing:".5em",width:s||"auto",columnwidth:"100%"},i.default.setArrayAlign(l,a||"c")},HandleShove:function(t,e,r){var n=t.stack.Top();if("multline"!==n.kind&&"multlined"!==n.kind)throw new c.default("CommandInMultlined","%1 can only appear within the multline or multlined environments",e);if(n.Size())throw new c.default("CommandAtTheBeginingOfLine","%1 must come at the beginning of the line",e);n.setProperty("shove",r);var o=t.GetBrackets(e),i=t.ParseArg(e);if(o){var a=t.create("node","mrow",[]),s=t.create("node","mspace",[],{width:o});"left"===r?(a.appendChild(s),a.appendChild(i)):(a.appendChild(i),a.appendChild(s)),i=a}t.Push(i)},SpreadLines:function(t,e){var r,o;if(t.stack.env.closing===e.getName()){delete t.stack.env.closing;var i=t.stack.Pop(),a=i.toMml(),s=i.getProperty("spread");if(a.isInferred)try{for(var l=n(u.default.getChildren(a)),c=l.next();!c.done;c=l.next()){var d=c.value;_.MathtoolsUtil.spreadLines(d,s)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}else _.MathtoolsUtil.spreadLines(a,s);t.Push(a)}else{s=t.GetDimen("\\begin{".concat(e.getName(),"}"));e.setProperty("spread",s),t.Push(e)}},Cases:function(t,e,r,n,o){var i=t.itemFactory.create("array").setProperty("casesEnv",e.getName());return i.arraydef={rowspacing:".2em",columnspacing:"1em",columnalign:"left"},"D"===o&&(i.arraydef.displaystyle=!0),i.setProperties({open:r,close:n}),t.Push(e),i},MathLap:function(t,r,n,o){var i=t.GetBrackets(r,"").trim(),a=t.create("node","mstyle",[t.create("node","mpadded",[t.ParseArg(r)],e({width:0},"r"===n?{}:{lspace:"l"===n?"-1width":"-.5width"}))],{"data-cramped":o});_.MathtoolsUtil.setDisplayLevel(a,i),t.Push(t.create("node","TeXAtom",[a]))},Cramped:function(t,e){var r=t.GetBrackets(e,"").trim(),n=t.ParseArg(e),o=t.create("node","mstyle",[n],{"data-cramped":!0});_.MathtoolsUtil.setDisplayLevel(o,r),t.Push(o)},MtLap:function(t,e,r){var n=i.default.internalMath(t,t.GetArgument(e),0),o=t.create("node","mpadded",n,{width:0});"r"!==r&&u.default.setAttribute(o,"lspace","l"===r?"-1width":"-.5width"),t.Push(o)},MathMakeBox:function(t,e){var r=t.GetBrackets(e),n=t.GetBrackets(e,"c"),o=t.create("node","mpadded",[t.ParseArg(e)]);r&&u.default.setAttribute(o,"width",r);var i=(0,m.lookup)(n,{c:"center",r:"right"},"");i&&u.default.setAttribute(o,"data-align",i),t.Push(o)},MathMBox:function(t,e){t.Push(t.create("node","mrow",[t.ParseArg(e)]))},UnderOverBracket:function(t,e){var n=(0,p.length2em)(t.GetBrackets(e,".1em"),.1),o=t.GetBrackets(e,".2em"),a=t.GetArgument(e),s=r("o"===e.charAt(1)?["over","accent","bottom"]:["under","accentunder","top"],3),c=s[0],d=s[1],m=s[2],h=(0,p.em)(n),f=new l.default(a,t.stack.env,t.configuration).mml(),_=new l.default(a,t.stack.env,t.configuration).mml(),g=t.create("node","mpadded",[t.create("node","mphantom",[_])],{style:"border: ".concat(h," solid; border-").concat(m,": none"),height:o,depth:0}),y=i.default.underOver(t,f,g,c,!0),b=u.default.getChildAt(u.default.getChildAt(y,0),0);u.default.setAttribute(b,d,!0),t.Push(y)},Aboxed:function(t,e){var r=_.MathtoolsUtil.checkAlignment(t,e);r.row.length%2==1&&r.row.push(t.create("node","mtd",[]));var n=t.GetArgument(e),o=t.string.substr(t.i);t.string=n+"&&\\endAboxed",t.i=0;var a=t.GetUpTo(e,"&"),s=t.GetUpTo(e,"&");t.GetUpTo(e,"\\endAboxed");var l=i.default.substituteArgs(t,[a,s],"\\rlap{\\boxed{#1{}#2}}\\kern.267em\\phantom{#1}&\\phantom{{}#2}\\kern.267em");t.string=l+o,t.i=0},ArrowBetweenLines:function(t,e){var r=_.MathtoolsUtil.checkAlignment(t,e);if(r.Size()||r.row.length)throw new c.default("BetweenLines","%1 must be on a row by itself",e);var n=t.GetStar(),o=t.GetBrackets(e,"\\Updownarrow");n&&(r.EndEntry(),r.EndEntry());var i=n?"\\quad"+o:o+"\\quad",a=new l.default(i,t.stack.env,t.configuration).mml();t.Push(a),r.EndEntry(),r.EndRow()},VDotsWithin:function(t,r){var n=t.stack.Top(),o=n.getProperty("flushspaceabove")===n.table.length,i="\\mmlToken{mi}{}"+t.GetArgument(r)+"\\mmlToken{mi}{}",a=new l.default(i,t.stack.env,t.configuration).mml(),s=t.create("node","mpadded",[t.create("node","mpadded",[t.create("node","mo",[t.create("text","⋮")])],e({width:0,lspace:"-.5width"},o?{height:"-.6em",voffset:"-.18em"}:{})),t.create("node","mphantom",[a])],{lspace:".5width"});t.Push(s)},ShortVDotsWithin:function(e,r){var n=e.stack.Top(),o=e.GetStar();t.MathtoolsMethods.FlushSpaceAbove(e,"\\MTFlushSpaceAbove"),!o&&n.EndEntry(),t.MathtoolsMethods.VDotsWithin(e,"\\vdotswithin"),o&&n.EndEntry(),t.MathtoolsMethods.FlushSpaceBelow(e,"\\MTFlushSpaceBelow")},FlushSpaceAbove:function(t,e){var r=_.MathtoolsUtil.checkAlignment(t,e);r.setProperty("flushspaceabove",r.table.length),r.addRowSpacing("-"+t.options.mathtools.shortvdotsadjustabove)},FlushSpaceBelow:function(t,e){var r=_.MathtoolsUtil.checkAlignment(t,e);r.Size()&&r.EndEntry(),r.EndRow(),r.addRowSpacing("-"+t.options.mathtools.shortvdotsadjustbelow)},PairedDelimiters:function(t,e,n,o,a,s,l,c){void 0===a&&(a="#1"),void 0===s&&(s=1),void 0===l&&(l=""),void 0===c&&(c="");var u=t.GetStar(),d=u?"":t.GetBrackets(e),p=r(u?["\\left","\\right"]:d?[d+"l",d+"r"]:["",""],2),m=p[0],h=p[1],f=u?"\\middle":d||"";if(s){for(var _=[],g=_.length;g<s;g++)_.push(t.GetArgument(e));l=i.default.substituteArgs(t,_,l),a=i.default.substituteArgs(t,_,a),c=i.default.substituteArgs(t,_,c)}a=a.replace(/\\delimsize/g,f),t.string=[l,m,n,a,h,o,c,t.string.substr(t.i)].reduce((function(e,r){return i.default.addArgs(t,e,r)}),""),t.i=0,i.default.checkMaxMacros(t)},DeclarePairedDelimiter:function(t,e){var r=h.default.GetCsNameArgument(t,e),n=t.GetArgument(e),o=t.GetArgument(e);_.MathtoolsUtil.addPairedDelims(t.configuration,r,[n,o])},DeclarePairedDelimiterX:function(t,e){var r=h.default.GetCsNameArgument(t,e),n=h.default.GetArgCount(t,e),o=t.GetArgument(e),i=t.GetArgument(e),a=t.GetArgument(e);_.MathtoolsUtil.addPairedDelims(t.configuration,r,[o,i,a,n])},DeclarePairedDelimiterXPP:function(t,e){var r=h.default.GetCsNameArgument(t,e),n=h.default.GetArgCount(t,e),o=t.GetArgument(e),i=t.GetArgument(e),a=t.GetArgument(e),s=t.GetArgument(e),l=t.GetArgument(e);_.MathtoolsUtil.addPairedDelims(t.configuration,r,[i,a,l,n,o,s])},CenterColon:function(t,r,n,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=t.options.mathtools,s=t.create("token","mo",{},":");if(n&&(a.centercolon||o)){var l=a["centercolon-offset"];s=t.create("node","mpadded",[s],e({voffset:l,height:"+".concat(l),depth:"-".concat(l)},i?{width:a["thincolon-dw"],lspace:a["thincolon-dx"]}:{}))}t.Push(s)},Relation:function(t,e,r,n){t.options.mathtools["use-unicode"]&&n?t.Push(t.create("token","mo",{texClass:d.TEXCLASS.REL},n)):(r="\\mathrel{"+r.replace(/:/g,"\\MTThinColon").replace(/-/g,"\\mathrel{-}")+"}",t.string=i.default.addArgs(t,r,t.string.substr(t.i)),t.i=0)},NArrow:function(t,e,r,n){t.Push(t.create("node","TeXAtom",[t.create("token","mtext",{},r),t.create("node","mpadded",[t.create("node","mpadded",[t.create("node","menclose",[t.create("node","mspace",[],{height:".2em",depth:0,width:".4em"})],{notation:"updiagonalstrike","data-thickness":".05em","data-padding":0})],{width:0,lspace:"-.5width",voffset:n}),t.create("node","mphantom",[t.create("token","mtext",{},r)])],{width:0,lspace:"-.5width"})],{texClass:d.TEXCLASS.REL}))},SplitFrac:function(t,e,r){var n=t.ParseArg(e),o=t.ParseArg(e);t.Push(t.create("node","mstyle",[t.create("node","mfrac",[t.create("node","mstyle",[n,t.create("token","mi"),t.create("token","mspace",{width:"1em"})],{scriptlevel:0}),t.create("node","mstyle",[t.create("token","mspace",{width:"1em"}),t.create("token","mi"),o],{scriptlevel:0})],{linethickness:0,numalign:"left",denomalign:"right"})],{displaystyle:r,scriptlevel:0}))},XMathStrut:function(t,e){var r=t.GetBrackets(e),n=t.GetArgument(e);n=_.MathtoolsUtil.plusOrMinus(e,n),r=_.MathtoolsUtil.plusOrMinus(e,r||n),t.Push(t.create("node","TeXAtom",[t.create("node","mpadded",[t.create("node","mphantom",[t.create("token","mo",{stretchy:!1},"(")])],{width:0,height:n+"height",depth:r+"depth"})],{texClass:d.TEXCLASS.ORD}))},Prescript:function(t,e){var r=_.MathtoolsUtil.getScript(t,e,"sup"),n=_.MathtoolsUtil.getScript(t,e,"sub"),o=_.MathtoolsUtil.getScript(t,e,"arg");if(u.default.isType(r,"none")&&u.default.isType(n,"none"))t.Push(o);else{var i=t.create("node","mmultiscripts",[o]);u.default.getChildren(i).push(null,null),u.default.appendChildren(i,[t.create("node","mprescripts"),n,r]),i.setProperty("fixPrescript",!0),t.Push(i)}},NewTagForm:function(t,e,r){void 0===r&&(r=!1);var n=t.tags;if(!("mtFormats"in n))throw new c.default("TagsNotMT","%1 can only be used with ams or mathtools tags",e);var o=t.GetArgument(e).trim();if(!o)throw new c.default("InvalidTagFormID","Tag form name can't be empty");var i=t.GetBrackets(e,""),a=t.GetArgument(e),s=t.GetArgument(e);if(!r&&n.mtFormats.has(o))throw new c.default("DuplicateTagForm","Duplicate tag form: %1",o);n.mtFormats.set(o,[a,s,i])},UseTagForm:function(t,e){var r=t.tags;if(!("mtFormats"in r))throw new c.default("TagsNotMT","%1 can only be used with ams or mathtools tags",e);var n=t.GetArgument(e).trim();if(n){if(!r.mtFormats.has(n))throw new c.default("UndefinedTagForm","Undefined tag form: %1",n);r.mtCurrent=r.mtFormats.get(n)}else r.mtCurrent=null},SetOptions:function(t,e){var r,o,a=t.options.mathtools;if(!a["allow-mathtoolsset"])throw new c.default("ForbiddenMathtoolsSet","%1 is disabled",e);var s={};Object.keys(a).forEach((function(t){"pariedDelimiters"!==t&&"tagforms"!==t&&"allow-mathtoolsset"!==t&&(s[t]=1)}));var l=t.GetArgument(e),u=i.default.keyvalOptions(l,s,!0);try{for(var d=n(Object.keys(u)),p=d.next();!p.done;p=d.next()){var m=p.value;a[m]=u[m]}}catch(t){r={error:t}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},Array:s.default.Array,Macro:s.default.Macro,xArrow:a.AmsMethods.xArrow,HandleRef:a.AmsMethods.HandleRef,AmsEqnArray:a.AmsMethods.AmsEqnArray,MacroWithTemplate:f.default.MacroWithTemplate}}(MathtoolsMethods),getDefaultExportFromCjs(MathtoolsMethods);var __importDefault$a=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MathtoolsMappings,"__esModule",{value:!0});var ParseMethods_js_1$1=__importDefault$a(ParseMethods$1),SymbolMap_js_1$5=SymbolMap,TexConstants_js_1$5=TexConstants,MathtoolsMethods_js_1=MathtoolsMethods;new SymbolMap_js_1$5.CommandMap("mathtools-macros",{shoveleft:["HandleShove",TexConstants_js_1$5.TexConstant.Align.LEFT],shoveright:["HandleShove",TexConstants_js_1$5.TexConstant.Align.RIGHT],xleftrightarrow:["xArrow",8596,10,10],xLeftarrow:["xArrow",8656,12,7],xRightarrow:["xArrow",8658,7,12],xLeftrightarrow:["xArrow",8660,12,12],xhookleftarrow:["xArrow",8617,10,5],xhookrightarrow:["xArrow",8618,5,10],xmapsto:["xArrow",8614,10,10],xrightharpoondown:["xArrow",8641,5,10],xleftharpoondown:["xArrow",8637,10,5],xrightleftharpoons:["xArrow",8652,10,10],xrightharpoonup:["xArrow",8640,5,10],xleftharpoonup:["xArrow",8636,10,5],xleftrightharpoons:["xArrow",8651,10,10],mathllap:["MathLap","l",!1],mathrlap:["MathLap","r",!1],mathclap:["MathLap","c",!1],clap:["MtLap","c"],textllap:["MtLap","l"],textrlap:["MtLap","r"],textclap:["MtLap","c"],cramped:"Cramped",crampedllap:["MathLap","l",!0],crampedrlap:["MathLap","r",!0],crampedclap:["MathLap","c",!0],crampedsubstack:["Macro","\\begin{crampedsubarray}{c}#1\\end{crampedsubarray}",1],mathmbox:"MathMBox",mathmakebox:"MathMakeBox",overbracket:"UnderOverBracket",underbracket:"UnderOverBracket",refeq:"HandleRef",MoveEqLeft:["Macro","\\hspace{#1em}&\\hspace{-#1em}",1,"2"],Aboxed:"Aboxed",ArrowBetweenLines:"ArrowBetweenLines",vdotswithin:"VDotsWithin",shortvdotswithin:"ShortVDotsWithin",MTFlushSpaceAbove:"FlushSpaceAbove",MTFlushSpaceBelow:"FlushSpaceBelow",DeclarePairedDelimiter:"DeclarePairedDelimiter",DeclarePairedDelimiterX:"DeclarePairedDelimiterX",DeclarePairedDelimiterXPP:"DeclarePairedDelimiterXPP",DeclarePairedDelimiters:"DeclarePairedDelimiter",DeclarePairedDelimitersX:"DeclarePairedDelimiterX",DeclarePairedDelimitersXPP:"DeclarePairedDelimiterXPP",centercolon:["CenterColon",!0,!0],ordinarycolon:["CenterColon",!1],MTThinColon:["CenterColon",!0,!0,!0],coloneqq:["Relation",":=","≔"],Coloneqq:["Relation","::=","⩴"],coloneq:["Relation",":-"],Coloneq:["Relation","::-"],eqqcolon:["Relation","=:","≕"],Eqqcolon:["Relation","=::"],eqcolon:["Relation","-:","∹"],Eqcolon:["Relation","-::"],colonapprox:["Relation",":\\approx"],Colonapprox:["Relation","::\\approx"],colonsim:["Relation",":\\sim"],Colonsim:["Relation","::\\sim"],dblcolon:["Relation","::","∷"],nuparrow:["NArrow","↑",".06em"],ndownarrow:["NArrow","↓",".25em"],bigtimes:["Macro","\\mathop{\\Large\\kern-.1em\\boldsymbol{\\times}\\kern-.1em}"],splitfrac:["SplitFrac",!1],splitdfrac:["SplitFrac",!0],xmathstrut:"XMathStrut",prescript:"Prescript",newtagform:["NewTagForm",!1],renewtagform:["NewTagForm",!0],usetagform:"UseTagForm",adjustlimits:["MacroWithTemplate","\\mathop{{#1}\\vphantom{{#3}}}_{{#2}\\vphantom{{#4}}}\\mathop{{#3}\\vphantom{{#1}}}_{{#4}\\vphantom{{#2}}}",4,,"_",,"_"],mathtoolsset:"SetOptions"},MathtoolsMethods_js_1.MathtoolsMethods),new SymbolMap_js_1$5.EnvironmentMap("mathtools-environments",ParseMethods_js_1$1.default.environment,{dcases:["Array",null,"\\{","","ll",null,".2em","D"],rcases:["Array",null,"","\\}","ll",null,".2em"],drcases:["Array",null,"","\\}","ll",null,".2em","D"],"dcases*":["Cases",null,"{","","D"],"rcases*":["Cases",null,"","}"],"drcases*":["Cases",null,"","}","D"],"cases*":["Cases",null,"{",""],"matrix*":["MtMatrix",null,null,null],"pmatrix*":["MtMatrix",null,"(",")"],"bmatrix*":["MtMatrix",null,"[","]"],"Bmatrix*":["MtMatrix",null,"\\{","\\}"],"vmatrix*":["MtMatrix",null,"\\vert","\\vert"],"Vmatrix*":["MtMatrix",null,"\\Vert","\\Vert"],"smallmatrix*":["MtSmallMatrix",null,null,null],psmallmatrix:["MtSmallMatrix",null,"(",")","c"],"psmallmatrix*":["MtSmallMatrix",null,"(",")"],bsmallmatrix:["MtSmallMatrix",null,"[","]","c"],"bsmallmatrix*":["MtSmallMatrix",null,"[","]"],Bsmallmatrix:["MtSmallMatrix",null,"\\{","\\}","c"],"Bsmallmatrix*":["MtSmallMatrix",null,"\\{","\\}"],vsmallmatrix:["MtSmallMatrix",null,"\\vert","\\vert","c"],"vsmallmatrix*":["MtSmallMatrix",null,"\\vert","\\vert"],Vsmallmatrix:["MtSmallMatrix",null,"\\Vert","\\Vert","c"],"Vsmallmatrix*":["MtSmallMatrix",null,"\\Vert","\\Vert"],crampedsubarray:["Array",null,null,null,null,"0em","0.1em","S'",1],multlined:"MtMultlined",spreadlines:["SpreadLines",!0],lgathered:["AmsEqnArray",null,null,null,"l",null,".5em","D"],rgathered:["AmsEqnArray",null,null,null,"r",null,".5em","D"]},MathtoolsMethods_js_1.MathtoolsMethods),new SymbolMap_js_1$5.DelimiterMap("mathtools-delimiters",ParseMethods_js_1$1.default.delimiter,{"\\lparen":"(","\\rparen":")"}),new SymbolMap_js_1$5.CommandMap("mathtools-characters",{":":["CenterColon",!0]},MathtoolsMethods_js_1.MathtoolsMethods);var MathtoolsTags={},__extends$4=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values$2=commonjsGlobal&&commonjsGlobal.__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.")},__read$2=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__importDefault$9=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MathtoolsTags,"__esModule",{value:!0}),MathtoolsTags.MathtoolsTagFormat=void 0;var TexError_js_1$3=__importDefault$9(TexError$1),Tags_js_1$2=Tags,tagID$1=0;function MathtoolsTagFormat(t,e){var r=e.parseOptions.options.tags;"base"!==r&&t.tags.hasOwnProperty(r)&&Tags_js_1$2.TagsFactory.add(r,t.tags[r]);var n=function(t){function r(){var r,n,o=t.call(this)||this;o.mtFormats=new Map,o.mtCurrent=null;var i=e.parseOptions.options.mathtools.tagforms;try{for(var a=__values$2(Object.keys(i)),s=a.next();!s.done;s=a.next()){var l=s.value;if(!Array.isArray(i[l])||3!==i[l].length)throw new TexError_js_1$3.default("InvalidTagFormDef",'The tag form definition for "%1" should be an array fo three strings',l);o.mtFormats.set(l,i[l])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}return __extends$4(r,t),r.prototype.formatTag=function(e){if(this.mtCurrent){var r=__read$2(this.mtCurrent,3),n=r[0],o=r[1],i=r[2];return i?"".concat(n).concat(i,"{").concat(e,"}").concat(o):"".concat(n).concat(e).concat(o)}return t.prototype.formatTag.call(this,e)},r}(Tags_js_1$2.TagsFactory.create(e.parseOptions.options.tags).constructor),o="MathtoolsTags-"+ ++tagID$1;Tags_js_1$2.TagsFactory.add(o,n),e.parseOptions.options.tags=o}MathtoolsTags.MathtoolsTagFormat=MathtoolsTagFormat;var MathtoolsItems={},__extends$3=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault$8=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MathtoolsItems,"__esModule",{value:!0}),MathtoolsItems.MultlinedItem=void 0;var AmsItems_js_1=AmsItems,NodeUtil_js_1$3=__importDefault$8(NodeUtil$1),TexConstants_js_1$4=TexConstants,MultlinedItem=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$3(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"multlined"},enumerable:!1,configurable:!0}),e.prototype.EndTable=function(){if((this.Size()||this.row.length)&&(this.EndEntry(),this.EndRow()),this.table.length>1){var e=this.factory.configuration.options.mathtools,r=e.multlinegap,n=e["firstline-afterskip"]||r,o=e["lastline-preskip"]||r,i=NodeUtil_js_1$3.default.getChildren(this.table[0])[0];NodeUtil_js_1$3.default.getAttribute(i,"columnalign")!==TexConstants_js_1$4.TexConstant.Align.RIGHT&&i.appendChild(this.create("node","mspace",[],{width:n}));var a=NodeUtil_js_1$3.default.getChildren(this.table[this.table.length-1])[0];if(NodeUtil_js_1$3.default.getAttribute(a,"columnalign")!==TexConstants_js_1$4.TexConstant.Align.LEFT){var s=NodeUtil_js_1$3.default.getChildren(a)[0];s.childNodes.unshift(null);var l=this.create("node","mspace",[],{width:o});NodeUtil_js_1$3.default.setChild(s,0,l)}}t.prototype.EndTable.call(this)},e}(AmsItems_js_1.MultlineItem);MathtoolsItems.MultlinedItem=MultlinedItem,function(t){var e,r=commonjsGlobal&&commonjsGlobal.__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=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.MathtoolsConfiguration=t.fixPrescripts=t.PAIREDDELIMS=void 0;var o=Configuration,i=SymbolMap,a=n(NodeUtil$1),s=Options,l=MathtoolsUtil,c=MathtoolsTags,u=MathtoolsItems;function d(t){var e,n,o,i,s,l,c=t.data;try{for(var u=r(c.getList("mmultiscripts")),d=u.next();!d.done;d=u.next()){var p=d.value;if(p.getProperty("fixPrescript")){var m=a.default.getChildren(p),h=0;try{for(var f=(o=void 0,r([1,2])),_=f.next();!_.done;_=f.next()){m[b=_.value]||(a.default.setChild(p,b,c.nodeFactory.create("node","none")),h++)}}catch(t){o={error:t}}finally{try{_&&!_.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=(s=void 0,r([4,5])),y=g.next();!y.done;y=g.next()){var b=y.value;a.default.isType(m[b],"mrow")&&0===a.default.getChildren(m[b]).length&&a.default.setChild(p,b,c.nodeFactory.create("node","none"))}}catch(t){s={error:t}}finally{try{y&&!y.done&&(l=g.return)&&l.call(g)}finally{if(s)throw s.error}}2===h&&m.splice(1,2)}}}catch(t){e={error:t}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}}t.PAIREDDELIMS="mathtools-paired-delims",t.fixPrescripts=d,t.MathtoolsConfiguration=o.Configuration.create("mathtools",{handler:{macro:["mathtools-macros","mathtools-delimiters"],environment:["mathtools-environments"],delimiter:["mathtools-delimiters"],character:["mathtools-characters"]},items:(e={},e[u.MultlinedItem.prototype.kind]=u.MultlinedItem,e),init:function(e){new i.CommandMap(t.PAIREDDELIMS,{},{}),e.append(o.Configuration.local({handler:{macro:[t.PAIREDDELIMS]},priority:-5}))},config:function(t,e){var n,o,i=e.parseOptions,a=i.options.mathtools.pairedDelimiters;try{for(var s=r(Object.keys(a)),u=s.next();!u.done;u=s.next()){var d=u.value;l.MathtoolsUtil.addPairedDelims(i,d,a[d])}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}(0,c.MathtoolsTagFormat)(t,e)},postprocessors:[[d,-6]],options:{mathtools:{multlinegap:"1em","multlined-pos":"c","firstline-afterskip":"","lastline-preskip":"","smallmatrix-align":"c",shortvdotsadjustabove:".2em",shortvdotsadjustbelow:".2em",centercolon:!1,"centercolon-offset":".04em","thincolon-dx":"-.04em","thincolon-dw":"-.08em","use-unicode":!1,"prescript-sub-format":"","prescript-sup-format":"","prescript-arg-format":"","allow-mathtoolsset":!0,pairedDelimiters:(0,s.expandable)({}),tagforms:(0,s.expandable)({})}}})}(MathtoolsConfiguration),getDefaultExportFromCjs(MathtoolsConfiguration);var MhchemConfiguration={},mhchemParser$1={};Object.defineProperty(mhchemParser$1,"__esModule",{value:!0}),mhchemParser$1.mhchemParser=void 0;var mhchemParser=function(){function t(){}return t.toTex=function(t,e){return _mhchemTexify.go(_mhchemParser.go(t,e),"tex"!==e)},t}();function _mhchemCreateTransitions(t){var e,r,n={};for(e in t)for(r in t[e]){var o=r.split("|");t[e][r].stateArray=o;for(var i=0;i<o.length;i++)n[o[i]]=[]}for(e in t)for(r in t[e])for(o=t[e][r].stateArray||[],i=0;i<o.length;i++){var a=t[e][r];a.action_=[].concat(a.action_);for(var s=0;s<a.action_.length;s++)"string"==typeof a.action_[s]&&(a.action_[s]={type_:a.action_[s]});for(var l=e.split("|"),c=0;c<l.length;c++)if("*"===o[i]){var u=void 0;for(u in n)n[u].push({pattern:l[c],task:a})}else n[o[i]].push({pattern:l[c],task:a})}return n}mhchemParser$1.mhchemParser=mhchemParser;var _mhchemParser={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var r,n="0",o={};o.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var i=10,a=[];;){r!==t?(i=10,r=t):i--;var s=_mhchemParser.stateMachines[e],l=s.transitions[n]||s.transitions["*"];t:for(var c=0;c<l.length;c++){var u=_mhchemParser.patterns.match_(l[c].pattern,t);if(u){for(var d=l[c].task,p=0;p<d.action_.length;p++){var m=void 0;if(s.actions[d.action_[p].type_])m=s.actions[d.action_[p].type_](o,u.match_,d.action_[p].option);else{if(!_mhchemParser.actions[d.action_[p].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[p].type_+")"];m=_mhchemParser.actions[d.action_[p].type_](o,u.match_,d.action_[p].option)}_mhchemParser.concatArray(a,m)}if(n=d.nextState||n,!(t.length>0))return a;if(d.revisit||(t=u.remainder),!d.toContinue)break t}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.slice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/,"state of aggregation $":function(t){var e=_mhchemParser.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var r=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:t.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". __* ":/^([.\u22C5\u00B7\u2022]|[*])\s*/,"...":/^\.\.\.(?=$|[^.])/,"^{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return _mhchemParser.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return _mhchemParser.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}^":/^\{\}(?=\^)/,"{}":/^\{\}/,"{...}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return _mhchemParser.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$__$(...)$":function(t){return _mhchemParser.patterns.findObserveGroups(t,"${","","","}$")||_mhchemParser.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return _mhchemParser.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")||_mhchemParser.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\ce{","","","}")},"\\pu{(...)}":function(t){return _mhchemParser.patterns.findObserveGroups(t,"\\pu{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var r=_mhchemParser.patterns.findObserveGroups(t,"","$","$","");return r&&(e=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,r,n,o,i,a,s,l,c){var u=function(t,e){if("string"==typeof e)return 0!==t.indexOf(e)?null:e;var r=t.match(e);return r?r[0]:null},d=u(t,e);if(null===d)return null;if(t=t.substr(d.length),null===(d=u(t,r)))return null;var p=function(t,e,r){for(var n=0;e<t.length;){var o=t.charAt(e),i=u(t.substr(e),r);if(null!==i&&0===n)return{endMatchBegin:e,endMatchEnd:e+i.length};if("{"===o)n++;else if("}"===o){if(0===n)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];n--}e++}return null}(t,d.length,n||o);if(null===p)return null;var m=t.substring(0,n?p.endMatchEnd:p.endMatchBegin);if(i||a){var h=this.findObserveGroups(t.substr(p.endMatchEnd),i,a,s,l);if(null===h)return null;var f=[m,h.match_];return{match_:c?f.join(""):f,remainder:h.remainder}}return{match_:m,remainder:t.substr(p.endMatchEnd)}},match_:function(t,e){var r=_mhchemParser.patterns.patterns[t];if(void 0===r)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if("function"==typeof r)return _mhchemParser.patterns.patterns[t](e);var n=e.match(r);return n?n.length>2?{match_:n.slice(1),remainder:e.substr(n[0].length)}:{match_:n[1]||n[0],remainder:e.substr(n[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,r){return{type_:r}},"insert+p1":function(t,e,r){return{type_:r,p1:e}},"insert+p1+p2":function(t,e,r){return{type_:r,p1:e[0],p2:e[1]}},copy:function(t,e){return e},write:function(t,e,r){return r},rm:function(t,e){return{type_:"rm",p1:e}},text:function(t,e){return _mhchemParser.go(e,"text")},"tex-math":function(t,e){return _mhchemParser.go(e,"tex-math")},"tex-math tight":function(t,e){return _mhchemParser.go(e,"tex-math tight")},bond:function(t,e,r){return{type_:"bond",kind_:r||e}},"color0-output":function(t,e){return{type_:"color0",color:e}},ce:function(t,e){return _mhchemParser.go(e,"ce")},pu:function(t,e){return _mhchemParser.go(e,"pu")},"1/2":function(t,e){var r=[];e.match(/^[+\-]/)&&(r.push(e.substr(0,1)),e=e.substr(1));var n=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),r.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:n[3]})),r},"9,9":function(t,e){return _mhchemParser.go(e,"9,9")}},stateMachines:{tex:{transitions:_mhchemCreateTransitions({empty:{0:{action_:"copy"}},"\\ce{(...)}":{0:{action_:[{type_:"write",option:"{"},"ce",{type_:"write",option:"}"}]}},"\\pu{(...)}":{0:{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},else:{0:{action_:"copy"}}}),actions:{}},ce:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{action_:[]}},space:{a:{action_:[],nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". __* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{action_:[]}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}^":{"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"tinySkip"}],nextState:"1"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}],nextState:"3"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var r;if((t.d||"").match(/^[1-9][0-9]*$/)){var n=t.d;t.d=void 0,(r=this.output(t)).push({type_:"tinySkip"}),t.b=n}else r=this.output(t);return _mhchemParser.actions["o="](t,e),r},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var r=[];return _mhchemParser.concatArray(r,this.output(t)),_mhchemParser.concatArray(r,_mhchemParser.actions.bond(t,e,"-")),r}t.d=e},"- after o/d":function(t,e,r){var n=_mhchemParser.patterns.match_("orbital",t.o||""),o=_mhchemParser.patterns.match_("one lowercase greek letter $",t.o||""),i=_mhchemParser.patterns.match_("one lowercase latin letter $",t.o||""),a=_mhchemParser.patterns.match_("$one lowercase latin letter$ $",t.o||""),s="-"===e&&(n&&""===n.remainder||o||i||a);!s||t.a||t.b||t.p||t.d||t.q||n||!i||(t.o="$"+t.o+"$");var l=[];return s?(_mhchemParser.concatArray(l,this.output(t)),l.push({type_:"hyphen"})):(n=_mhchemParser.patterns.match_("digits",t.d||""),r&&n&&""===n.remainder?(_mhchemParser.concatArray(l,_mhchemParser.actions["d="](t,e)),_mhchemParser.concatArray(l,this.output(t))):(_mhchemParser.concatArray(l,this.output(t)),_mhchemParser.concatArray(l,_mhchemParser.actions.bond(t,e,"-")))),l},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:_mhchemParser.go(e,"o")}},comma:function(t,e){var r=e.replace(/\s*$/,"");return r!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(t,e,r){var n;if(t.r){var o=void 0;o="M"===t.rdt?_mhchemParser.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:_mhchemParser.go(t.rd,"ce");var i=void 0;i="M"===t.rqt?_mhchemParser.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:_mhchemParser.go(t.rq,"ce"),n={type_:"arrow",r:t.r,rd:o,rq:i}}else n=[],(t.a||t.b||t.p||t.o||t.q||t.d||r)&&(t.sb&&n.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===r?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&_mhchemParser.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),n.push({type_:"chemfive",a:_mhchemParser.go(t.a,"a"),b:_mhchemParser.go(t.b,"bd"),p:_mhchemParser.go(t.p,"pq"),o:_mhchemParser.go(t.o,"o"),q:_mhchemParser.go(t.q,"pq"),d:_mhchemParser.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType}));for(var a in t)"parenthesisLevel"!==a&&"beginsWithBond"!==a&&delete t[a];return n},"oxidation-output":function(t,e){var r=["{"];return _mhchemParser.concatArray(r,_mhchemParser.go(e,"oxidation")),r.push("}"),r},"frac-output":function(t,e){return{type_:"frac-ce",p1:_mhchemParser.go(e[0],"ce"),p2:_mhchemParser.go(e[1],"ce")}},"overset-output":function(t,e){return{type_:"overset",p1:_mhchemParser.go(e[0],"ce"),p2:_mhchemParser.go(e[1],"ce")}},"underset-output":function(t,e){return{type_:"underset",p1:_mhchemParser.go(e[0],"ce"),p2:_mhchemParser.go(e[1],"ce")}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:_mhchemParser.go(e[0],"ce"),p2:_mhchemParser.go(e[1],"ce")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:_mhchemParser.go(e[1],"ce")}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,r){return{type_:"operator",kind_:r||e}}}},a:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:[]}},"1/2$":{0:{action_:"1/2"}},else:{0:{action_:[],nextState:"1",revisit:!0}},"${(...)}$__$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:[]}},"1/2$":{0:{action_:"1/2"}},else:{0:{action_:[],nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\pu{(...)}":{"*":{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:[{type_:"write",option:"{"},"text",{type_:"write",option:"}"}]}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var r in t)delete t[r];return e}}}},pq:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:[]}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{action_:[],nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{action_:[],nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{action_:[],nextState:"!f",revisit:!0}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}":{"*":{action_:"color-output"}},"\\color{(...)}":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\pu{(...)}":{"*":{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:_mhchemParser.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:_mhchemParser.go(e[1],"pq")}}}},bd:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:[]}},x$:{0:{action_:[],nextState:"!f",revisit:!0}},formula$:{0:{action_:[],nextState:"f",revisit:!0}},else:{0:{action_:[],nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}":{"*":{action_:"color-output"}},"\\color{(...)}":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\pu{(...)}":{"*":{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:_mhchemParser.go(e[1],"bd")}}}},oxidation:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:[]}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e}}}},"tex-math":{transitions:_mhchemCreateTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var r in t)delete t[r];return e}}}},"tex-math tight":{transitions:_mhchemCreateTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var r in t)delete t[r];return e}}}},"9,9":{transitions:_mhchemCreateTransitions({empty:{"*":{action_:[]}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:_mhchemCreateTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{action_:[]}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var r=[];return"+-"===e[0]||"+/-"===e[0]?r.push("\\pm "):e[0]&&r.push(e[0]),e[1]&&(_mhchemParser.concatArray(r,_mhchemParser.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?_mhchemParser.concatArray(r,_mhchemParser.go(e[2],"pu-9,9")):r.push(e[2])),(e[3]||e[4])&&("e"===e[3]||"*"===e[4]?r.push({type_:"cdot"}):r.push({type_:"times"}))),e[5]&&r.push("10^{"+e[5]+"}"),r},"number^":function(t,e){var r=[];return"+-"===e[0]||"+/-"===e[0]?r.push("\\pm "):e[0]&&r.push(e[0]),_mhchemParser.concatArray(r,_mhchemParser.go(e[1],"pu-9,9")),r.push("^{"+e[2]+"}"),r},operator:function(t,e,r){return{type_:"operator",kind_:r||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,r=_mhchemParser.patterns.match_("{(...)}",t.d||"");r&&""===r.remainder&&(t.d=r.match_);var n=_mhchemParser.patterns.match_("{(...)}",t.q||"");if(n&&""===n.remainder&&(t.q=n.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var o={d:_mhchemParser.go(t.d,"pu"),q:_mhchemParser.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:o.d,p2:o.q}:(e=o.d,o.d.length>1||o.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),_mhchemParser.concatArray(e,o.q))}else e=_mhchemParser.go(t.d,"pu-2");for(var i in t)delete t[i];return e}}},"pu-2":{transitions:_mhchemCreateTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var r=_mhchemParser.patterns.match_("{(...)}",t.rm||"");e=r&&""===r.remainder?_mhchemParser.go(r.match_,"pu"):{type_:"rm",p1:t.rm}}for(var n in t)delete t[n];return e}}},"pu-9,9":{transitions:_mhchemCreateTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var r=t.text_.length%3;0===r&&(r=3);for(var n=t.text_.length-3;n>0;n-=3)e.push(t.text_.substr(n,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,r)),e.reverse()}else e.push(t.text_);for(var o in t)delete t[o];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var r=t.text_.length-3,n=void 0;for(n=0;n<r;n+=3)e.push(t.text_.substr(n,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(n))}else e.push(t.text_);for(var o in t)delete t[o];return e}}}}},_mhchemTexify={go:function(t,e){if(!t)return"";for(var r="",n=!1,o=0;o<t.length;o++){var i=t[o];"string"==typeof i?r+=i:(r+=_mhchemTexify._go2(i),"1st-level escape"===i.type_&&(n=!0))}return e&&!n&&r&&(r="{"+r+"}"),r},_goInner:function(t){return _mhchemTexify.go(t,!1)},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var r={a:_mhchemTexify._goInner(t.a),b:_mhchemTexify._goInner(t.b),p:_mhchemTexify._goInner(t.p),o:_mhchemTexify._goInner(t.o),q:_mhchemTexify._goInner(t.q),d:_mhchemTexify._goInner(t.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),e+=r.a+"\\,"),(r.b||r.p)&&(e+="{\\vphantom{A}}",e+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",e+="\\mkern-1.5mu",e+="{\\vphantom{A}}",e+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(r.b||"")+"}}",e+="_{\\vphantom{2}\\llap{\\smash[t]{"+(r.p||"")+"}}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),e+=r.o),"kv"===t.dType?((r.d||r.q)&&(e+="{\\vphantom{A}}"),r.d&&(e+="^{"+r.d+"}"),r.q&&(e+="_{\\smash[t]{"+r.q+"}}")):"oxidation"===t.dType?(r.d&&(e+="{\\vphantom{A}}",e+="^{"+r.d+"}"),r.q&&(e+="{\\vphantom{A}}",e+="_{\\smash[t]{"+r.q+"}}")):(r.q&&(e+="{\\vphantom{A}}",e+="_{\\smash[t]{"+r.q+"}}"),r.d&&(e+="{\\vphantom{A}}",e+="^{"+r.d+"}"));break;case"rm":case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+_mhchemTexify._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+_mhchemTexify._goInner(t.p1);break;case"bond":if(!(e=_mhchemTexify._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var n="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var o="\\frac{"+_mhchemTexify._goInner(t.p1)+"}{"+_mhchemTexify._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":case"1st-level escape":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+_mhchemTexify._goInner(t.p1)+"}{"+_mhchemTexify._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+_mhchemTexify._goInner(t.p1)+"}{"+_mhchemTexify._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+_mhchemTexify._goInner(t.p1)+"}{"+_mhchemTexify._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+_mhchemTexify._goInner(t.p1)+"}_{"+_mhchemTexify._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+_mhchemTexify._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var i={rd:_mhchemTexify._goInner(t.rd),rq:_mhchemTexify._goInner(t.rq)},a=_mhchemTexify._getArrow(t.r);i.rd||i.rq?"<=>"===t.r||"<=>>"===t.r||"<<=>"===t.r||"<--\x3e"===t.r?(a="\\long"+a,i.rd&&(a="\\overset{"+i.rd+"}{"+a+"}"),i.rq&&(a="<--\x3e"===t.r?"\\underset{\\lower2mu{"+i.rq+"}}{"+a+"}":"\\underset{\\lower6mu{"+i.rq+"}}{"+a+"}"),a=" {}\\mathrel{"+a+"}{} "):(i.rq&&(a+="[{"+i.rq+"}]"),a=" {}\\mathrel{\\x"+(a+="{"+i.rd+"}")+"}{} "):a=" {}\\mathrel{\\long"+a+"}{} ",e=a;break;case"operator":e=_mhchemTexify._getOperator(t.kind_);break;case"space":e=" ";break;case"tinySkip":e="\\mkern2mu";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"leftrightarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}},__importDefault$7=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MhchemConfiguration,"__esModule",{value:!0}),MhchemConfiguration.MhchemConfiguration=void 0;var Configuration_js_1$7=Configuration,SymbolMap_js_1$4=SymbolMap,TexError_js_1$2=__importDefault$7(TexError$1),BaseMethods_js_1$2=__importDefault$7(BaseMethods$1),AmsMethods_js_1=AmsMethods,mhchemParser_js_1=mhchemParser$1,MhchemMethods={};MhchemMethods.Macro=BaseMethods_js_1$2.default.Macro,MhchemMethods.xArrow=AmsMethods_js_1.AmsMethods.xArrow,MhchemMethods.Machine=function(t,e,r){var n,o=t.GetArgument(e);try{n=mhchemParser_js_1.mhchemParser.toTex(o,r)}catch(t){throw new TexError_js_1$2.default(t[0],t[1])}t.string=n+t.string.substr(t.i),t.i=0},new SymbolMap_js_1$4.CommandMap("mhchem",{ce:["Machine","ce"],pu:["Machine","pu"],longrightleftharpoons:["Macro","\\stackrel{\\textstyle{-}\\!\\!{\\rightharpoonup}}{\\smash{{\\leftharpoondown}\\!\\!{-}}}"],longRightleftharpoons:["Macro","\\stackrel{\\textstyle{-}\\!\\!{\\rightharpoonup}}{\\smash{\\leftharpoondown}}"],longLeftrightharpoons:["Macro","\\stackrel{\\textstyle\\vphantom{{-}}{\\rightharpoonup}}{\\smash{{\\leftharpoondown}\\!\\!{-}}}"],longleftrightarrows:["Macro","\\stackrel{\\longrightarrow}{\\smash{\\longleftarrow}\\Rule{0px}{.25em}{0px}}"],tripledash:["Macro","\\vphantom{-}\\raise2mu{\\kern2mu\\tiny\\text{-}\\kern1mu\\text{-}\\kern1mu\\text{-}\\kern2mu}"],xleftrightarrow:["xArrow",8596,6,6],xrightleftharpoons:["xArrow",8652,5,7],xRightleftharpoons:["xArrow",8652,5,7],xLeftrightharpoons:["xArrow",8652,5,7]},MhchemMethods),MhchemConfiguration.MhchemConfiguration=Configuration_js_1$7.Configuration.create("mhchem",{handler:{macro:["mhchem"]}});var NoErrorsConfiguration={};Object.defineProperty(NoErrorsConfiguration,"__esModule",{value:!0}),NoErrorsConfiguration.NoErrorsConfiguration=void 0;var Configuration_js_1$6=Configuration;function noErrors(t,e,r,n){var o=t.create("token","mtext",{},n.replace(/\n/g," "));return t.create("node","merror",[o],{"data-mjx-error":e,title:e})}NoErrorsConfiguration.NoErrorsConfiguration=Configuration_js_1$6.Configuration.create("noerrors",{nodes:{error:noErrors}});var NoUndefinedConfiguration={},__values$1=commonjsGlobal&&commonjsGlobal.__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(NoUndefinedConfiguration,"__esModule",{value:!0}),NoUndefinedConfiguration.NoUndefinedConfiguration=void 0;var Configuration_js_1$5=Configuration;function noUndefined(t,e){var r,n,o=t.create("text","\\"+e),i=t.options.noundefined||{},a={};try{for(var s=__values$1(["color","background","size"]),l=s.next();!l.done;l=s.next()){var c=l.value;i[c]&&(a["math"+c]=i[c])}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}t.Push(t.create("node","mtext",[],a,o))}NoUndefinedConfiguration.NoUndefinedConfiguration=Configuration_js_1$5.Configuration.create("noundefined",{fallback:{macro:noUndefined},options:{noundefined:{color:"red",background:"",size:""}},priority:3});var PhysicsConfiguration={},PhysicsItems={},__extends$2=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__importDefault$6=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PhysicsItems,"__esModule",{value:!0}),PhysicsItems.AutoOpen=void 0;var StackItem_js_1=StackItem,ParseUtil_js_1$3=__importDefault$6(ParseUtil$1),NodeUtil_js_1$2=__importDefault$6(NodeUtil$1),TexParser_js_1$3=__importDefault$6(TexParser$1),AutoOpen=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.openCount=0,e}return __extends$2(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"auto open"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.toMml=function(){var e=this.factory.configuration.parser,r=this.getProperty("right");if(this.getProperty("smash")){var n=t.prototype.toMml.call(this),o=e.create("node","mpadded",[n],{height:0,depth:0});this.Clear(),this.Push(e.create("node","TeXAtom",[o]))}r&&this.Push(new TexParser_js_1$3.default(r,e.stack.env,e.configuration).mml());var i=ParseUtil_js_1$3.default.fenced(this.factory.configuration,this.getProperty("open"),t.prototype.toMml.call(this),this.getProperty("close"),this.getProperty("big"));return NodeUtil_js_1$2.default.removeProperties(i,"open","close","texClass"),i},e.prototype.checkItem=function(e){if(e.isKind("mml")&&1===e.Size()){var r=e.toMml();r.isKind("mo")&&r.getText()===this.getProperty("open")&&this.openCount++}var n=e.getProperty("autoclose");return n&&n===this.getProperty("close")&&!this.openCount--?this.getProperty("ignore")?(this.Clear(),[[],!0]):[[this.toMml()],!0]:t.prototype.checkItem.call(this,e)},e.errors=Object.assign(Object.create(StackItem_js_1.BaseItem.errors),{stop:["ExtraOrMissingDelims","Extra open or missing close delimiter"]}),e}(StackItem_js_1.BaseItem);PhysicsItems.AutoOpen=AutoOpen;var PhysicsMappings={},PhysicsMethods$1={},__read$1=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__importDefault$5=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PhysicsMethods$1,"__esModule",{value:!0});var BaseMethods_js_1$1=__importDefault$5(BaseMethods$1),TexParser_js_1$2=__importDefault$5(TexParser$1),TexError_js_1$1=__importDefault$5(TexError$1),MmlNode_js_1$2=MmlNode,ParseUtil_js_1$2=__importDefault$5(ParseUtil$1),NodeUtil_js_1$1=__importDefault$5(NodeUtil$1),NodeFactory_js_1=NodeFactory$1,PhysicsMethods={},pairs={"(":")","[":"]","{":"}","|":"|"},biggs=/^(b|B)i(g{1,2})$/;PhysicsMethods.Quantity=function(t,e,r,n,o,i,a){void 0===r&&(r="("),void 0===n&&(n=")"),void 0===o&&(o=!1),void 0===i&&(i=""),void 0===a&&(a="");var s=!!o&&t.GetStar(),l=t.GetNext(),c=t.i,u=null;if("\\"===l){if(t.i++,!(u=t.GetCS()).match(biggs)){var d=t.create("node","mrow");return t.Push(ParseUtil_js_1$2.default.fenced(t.configuration,r,d,n)),void(t.i=c)}l=t.GetNext()}var p=pairs[l];if(o&&"{"!==l)throw new TexError_js_1$1.default("MissingArgFor","Missing argument for %1",t.currentCS);if(!p){d=t.create("node","mrow");return t.Push(ParseUtil_js_1$2.default.fenced(t.configuration,r,d,n)),void(t.i=c)}if(i){var m=t.create("token","mi",{texClass:MmlNode_js_1$2.TEXCLASS.OP},i);a&&NodeUtil_js_1$1.default.setAttribute(m,"mathvariant",a),t.Push(t.itemFactory.create("fn",m))}if("{"===l){var h=t.GetArgument(e);return l=o?r:"\\{",p=o?n:"\\}",h=s?l+" "+h+" "+p:u?"\\"+u+"l"+l+" "+h+" \\"+u+"r"+p:"\\left"+l+" "+h+" \\right"+p,void t.Push(new TexParser_js_1$2.default(h,t.stack.env,t.configuration).mml())}o&&(l=r,p=n),t.i++,t.Push(t.itemFactory.create("auto open").setProperties({open:l,close:p,big:u}))},PhysicsMethods.Eval=function(t,e){var r=t.GetStar(),n=t.GetNext();if("{"!==n){if("("===n||"["===n)return t.i++,void t.Push(t.itemFactory.create("auto open").setProperties({open:n,close:"|",smash:r,right:"\\vphantom{\\int}"}));throw new TexError_js_1$1.default("MissingArgFor","Missing argument for %1",t.currentCS)}var o=t.GetArgument(e),i="\\left. "+(r?"\\smash{"+o+"}":o)+" \\vphantom{\\int}\\right|";t.string=t.string.slice(0,t.i)+i+t.string.slice(t.i)},PhysicsMethods.Commutator=function(t,e,r,n){void 0===r&&(r="["),void 0===n&&(n="]");var o=t.GetStar(),i=t.GetNext(),a=null;if("\\"===i){if(t.i++,!(a=t.GetCS()).match(biggs))throw new TexError_js_1$1.default("MissingArgFor","Missing argument for %1",t.currentCS);i=t.GetNext()}if("{"!==i)throw new TexError_js_1$1.default("MissingArgFor","Missing argument for %1",t.currentCS);var s=t.GetArgument(e)+","+t.GetArgument(e);s=o?r+" "+s+" "+n:a?"\\"+a+"l"+r+" "+s+" \\"+a+"r"+n:"\\left"+r+" "+s+" \\right"+n,t.Push(new TexParser_js_1$2.default(s,t.stack.env,t.configuration).mml())};var latinCap=[65,90],latinSmall=[97,122],greekCap=[913,937],greekSmall=[945,969],digits=[48,57];function inRange(t,e){return t>=e[0]&&t<=e[1]}function createVectorToken(t,e,r,n){var o=t.configuration.parser,i=NodeFactory_js_1.NodeFactory.createToken(t,e,r,n),a=n.codePointAt(0);return 1===n.length&&!o.stack.env.font&&o.stack.env.vectorFont&&(inRange(a,latinCap)||inRange(a,latinSmall)||inRange(a,greekCap)||inRange(a,digits)||inRange(a,greekSmall)&&o.stack.env.vectorStar||NodeUtil_js_1$1.default.getAttribute(i,"accent"))&&NodeUtil_js_1$1.default.setAttribute(i,"mathvariant",o.stack.env.vectorFont),i}PhysicsMethods.VectorBold=function(t,e){var r=t.GetStar(),n=t.GetArgument(e),o=t.configuration.nodeFactory.get("token"),i=t.stack.env.font;delete t.stack.env.font,t.configuration.nodeFactory.set("token",createVectorToken),t.stack.env.vectorFont=r?"bold-italic":"bold",t.stack.env.vectorStar=r;var a=new TexParser_js_1$2.default(n,t.stack.env,t.configuration).mml();i&&(t.stack.env.font=i),delete t.stack.env.vectorFont,delete t.stack.env.vectorStar,t.configuration.nodeFactory.set("token",o),t.Push(a)},PhysicsMethods.StarMacro=function(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];var i=t.GetStar(),a=[];if(r)for(var s=a.length;s<r;s++)a.push(t.GetArgument(e));var l=n.join(i?"*":"");l=ParseUtil_js_1$2.default.substituteArgs(t,a,l),t.string=ParseUtil_js_1$2.default.addArgs(t,l,t.string.slice(t.i)),t.i=0,ParseUtil_js_1$2.default.checkMaxMacros(t)};var vectorApplication=function(t,e,r,n,o){var i=new TexParser_js_1$2.default(n,t.stack.env,t.configuration).mml();t.Push(t.itemFactory.create(e,i));var a=t.GetNext(),s=pairs[a];if(s){var l=-1!==o.indexOf(a);if("{"===a){var c=(l?"\\left\\{":"")+" "+t.GetArgument(r)+" "+(l?"\\right\\}":"");return t.string=c+t.string.slice(t.i),void(t.i=0)}l&&(t.i++,t.Push(t.itemFactory.create("auto open").setProperties({open:a,close:s})))}};function outputBraket(t,e,r){var n=__read$1(t,3),o=n[0],i=n[1],a=n[2];return e&&r?"\\left\\langle{".concat(o,"}\\middle\\vert{").concat(i,"}\\middle\\vert{").concat(a,"}\\right\\rangle"):e?"\\langle{".concat(o,"}\\vert{").concat(i,"}\\vert{").concat(a,"}\\rangle"):"\\left\\langle{".concat(o,"}\\right\\vert{").concat(i,"}\\left\\vert{").concat(a,"}\\right\\rangle")}function makeDiagMatrix(t,e){for(var r=t.length,n=[],o=0;o<r;o++)n.push(Array(e?r-o:o+1).join("&")+"\\mqty{"+t[o]+"}");return n.join("\\\\ ")}PhysicsMethods.OperatorApplication=function(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];vectorApplication(t,"fn",e,r,n)},PhysicsMethods.VectorOperator=function(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];vectorApplication(t,"mml",e,r,n)},PhysicsMethods.Expression=function(t,e,r,n){void 0===r&&(r=!0),void 0===n&&(n=""),n=n||e.slice(1);var o=r?t.GetBrackets(e):null,i=t.create("token","mi",{texClass:MmlNode_js_1$2.TEXCLASS.OP},n);if(o){var a=new TexParser_js_1$2.default(o,t.stack.env,t.configuration).mml();i=t.create("node","msup",[i,a])}t.Push(t.itemFactory.create("fn",i)),"("===t.GetNext()&&(t.i++,t.Push(t.itemFactory.create("auto open").setProperties({open:"(",close:")"})))},PhysicsMethods.Qqtext=function(t,e,r){var n=(t.GetStar()?"":"\\quad")+"\\text{"+(r||t.GetArgument(e))+"}\\quad ";t.string=t.string.slice(0,t.i)+n+t.string.slice(t.i)},PhysicsMethods.Differential=function(t,e,r){var n=t.GetBrackets(e),o=null!=n?"^{"+n+"}":" ",i="("===t.GetNext(),a="{"===t.GetNext(),s=r+o;if(i||a)if(a){s+=t.GetArgument(e);l=new TexParser_js_1$2.default(s,t.stack.env,t.configuration).mml();t.Push(t.create("node","TeXAtom",[l],{texClass:MmlNode_js_1$2.TEXCLASS.OP}))}else t.Push(new TexParser_js_1$2.default(s,t.stack.env,t.configuration).mml()),t.i++,t.Push(t.itemFactory.create("auto open").setProperties({open:"(",close:")"}));else{s+=t.GetArgument(e,!0)||"";var l=new TexParser_js_1$2.default(s,t.stack.env,t.configuration).mml();t.Push(l)}},PhysicsMethods.Derivative=function(t,e,r,n){var o=t.GetStar(),i=t.GetBrackets(e),a=1,s=[];for(s.push(t.GetArgument(e));"{"===t.GetNext()&&a<r;)s.push(t.GetArgument(e)),a++;var l=!1,c=" ",u=" ";r>2&&s.length>2?(c="^{"+(s.length-1)+"}",l=!0):null!=i&&(r>2&&s.length>1&&(l=!0),u=c="^{"+i+"}");for(var d=o?"\\flatfrac":"\\frac",p=s.length>1?s[0]:"",m=s.length>1?s[1]:s[0],h="",f=2,_=void 0;_=s[f];f++)h+=n+" "+_;var g=d+"{"+n+c+p+"}{"+n+" "+m+u+" "+h+"}";t.Push(new TexParser_js_1$2.default(g,t.stack.env,t.configuration).mml()),"("===t.GetNext()&&(t.i++,t.Push(t.itemFactory.create("auto open").setProperties({open:"(",close:")",ignore:l})))},PhysicsMethods.Bra=function(t,e){var r=t.GetStar(),n=t.GetArgument(e),o="",i=!1,a=!1;if("\\"===t.GetNext()){var s=t.i;t.i++;var l=t.GetCS(),c=t.lookup("macro",l);c&&"ket"===c.symbol?(i=!0,s=t.i,a=t.GetStar(),"{"===t.GetNext()?o=t.GetArgument(l,!0):(t.i=s,a=!1)):t.i=s}var u="";u=i?r||a?"\\langle{".concat(n,"}\\vert{").concat(o,"}\\rangle"):"\\left\\langle{".concat(n,"}\\middle\\vert{").concat(o,"}\\right\\rangle"):r||a?"\\langle{".concat(n,"}\\vert"):"\\left\\langle{".concat(n,"}\\right\\vert{").concat(o,"}"),t.Push(new TexParser_js_1$2.default(u,t.stack.env,t.configuration).mml())},PhysicsMethods.Ket=function(t,e){var r=t.GetStar(),n=t.GetArgument(e),o=r?"\\vert{".concat(n,"}\\rangle"):"\\left\\vert{".concat(n,"}\\right\\rangle");t.Push(new TexParser_js_1$2.default(o,t.stack.env,t.configuration).mml())},PhysicsMethods.BraKet=function(t,e){var r=t.GetStar(),n=t.GetArgument(e),o=null;"{"===t.GetNext()&&(o=t.GetArgument(e,!0));var i="";i=null==o?r?"\\langle{".concat(n,"}\\vert{").concat(n,"}\\rangle"):"\\left\\langle{".concat(n,"}\\middle\\vert{").concat(n,"}\\right\\rangle"):r?"\\langle{".concat(n,"}\\vert{").concat(o,"}\\rangle"):"\\left\\langle{".concat(n,"}\\middle\\vert{").concat(o,"}\\right\\rangle"),t.Push(new TexParser_js_1$2.default(i,t.stack.env,t.configuration).mml())},PhysicsMethods.KetBra=function(t,e){var r=t.GetStar(),n=t.GetArgument(e),o=null;"{"===t.GetNext()&&(o=t.GetArgument(e,!0));var i="";i=null==o?r?"\\vert{".concat(n,"}\\rangle\\!\\langle{").concat(n,"}\\vert"):"\\left\\vert{".concat(n,"}\\middle\\rangle\\!\\middle\\langle{").concat(n,"}\\right\\vert"):r?"\\vert{".concat(n,"}\\rangle\\!\\langle{").concat(o,"}\\vert"):"\\left\\vert{".concat(n,"}\\middle\\rangle\\!\\middle\\langle{").concat(o,"}\\right\\vert"),t.Push(new TexParser_js_1$2.default(i,t.stack.env,t.configuration).mml())},PhysicsMethods.Expectation=function(t,e){var r=t.GetStar(),n=r&&t.GetStar(),o=t.GetArgument(e),i=null;"{"===t.GetNext()&&(i=t.GetArgument(e,!0));var a=o&&i?outputBraket([i,o,i],r,n):r?"\\langle {".concat(o,"} \\rangle"):"\\left\\langle {".concat(o,"} \\right\\rangle");t.Push(new TexParser_js_1$2.default(a,t.stack.env,t.configuration).mml())},PhysicsMethods.MatrixElement=function(t,e){var r=t.GetStar(),n=r&&t.GetStar(),o=outputBraket([t.GetArgument(e),t.GetArgument(e),t.GetArgument(e)],r,n);t.Push(new TexParser_js_1$2.default(o,t.stack.env,t.configuration).mml())},PhysicsMethods.MatrixQuantity=function(t,e,r){var n=t.GetStar(),o=r?"smallmatrix":"array",i="",a="",s="";switch(t.GetNext()){case"{":i=t.GetArgument(e);break;case"(":t.i++,a=n?"\\lgroup":"(",s=n?"\\rgroup":")",i=t.GetUpTo(e,")");break;case"[":t.i++,a="[",s="]",i=t.GetUpTo(e,"]");break;case"|":t.i++,a="|",s="|",i=t.GetUpTo(e,"|");break;default:a="(",s=")"}var l=(a?"\\left":"")+a+"\\begin{"+o+"}{} "+i+"\\end{"+o+"}"+(a?"\\right":"")+s;t.Push(new TexParser_js_1$2.default(l,t.stack.env,t.configuration).mml())},PhysicsMethods.IdentityMatrix=function(t,e){var r=t.GetArgument(e),n=parseInt(r,10);if(isNaN(n))throw new TexError_js_1$1.default("InvalidNumber","Invalid number");if(n<=1)return t.string="1"+t.string.slice(t.i),void(t.i=0);for(var o=Array(n).fill("0"),i=[],a=0;a<n;a++){var s=o.slice();s[a]="1",i.push(s.join(" & "))}t.string=i.join("\\\\ ")+t.string.slice(t.i),t.i=0},PhysicsMethods.XMatrix=function(t,e){var r=t.GetStar(),n=t.GetArgument(e),o=t.GetArgument(e),i=t.GetArgument(e),a=parseInt(o,10),s=parseInt(i,10);if(isNaN(a)||isNaN(s)||s.toString()!==i||a.toString()!==o)throw new TexError_js_1$1.default("InvalidNumber","Invalid number");if(a=a<1?1:a,s=s<1?1:s,!r){var l=Array(s).fill(n).join(" & "),c=Array(a).fill(l).join("\\\\ ");return t.string=c+t.string.slice(t.i),void(t.i=0)}var u="";if(1===a&&1===s)u=n;else if(1===a){l=[];for(var d=1;d<=s;d++)l.push("".concat(n,"_{").concat(d,"}"));u=l.join(" & ")}else if(1===s){for(l=[],d=1;d<=a;d++)l.push("".concat(n,"_{").concat(d,"}"));u=l.join("\\\\ ")}else{var p=[];for(d=1;d<=a;d++){l=[];for(var m=1;m<=s;m++)l.push("".concat(n,"_{{").concat(d,"}{").concat(m,"}}"));p.push(l.join(" & "))}u=p.join("\\\\ ")}t.string=u+t.string.slice(t.i),t.i=0},PhysicsMethods.PauliMatrix=function(t,e){var r=t.GetArgument(e),n=r.slice(1);switch(r[0]){case"0":n+=" 1 & 0\\\\ 0 & 1";break;case"1":case"x":n+=" 0 & 1\\\\ 1 & 0";break;case"2":case"y":n+=" 0 & -i\\\\ i & 0";break;case"3":case"z":n+=" 1 & 0\\\\ 0 & -1"}t.string=n+t.string.slice(t.i),t.i=0},PhysicsMethods.DiagonalMatrix=function(t,e,r){if("{"===t.GetNext()){var n=t.i;t.GetArgument(e);var o=t.i;t.i=n+1;for(var i=[],a="",s=t.i;s<o;){try{a=t.GetUpTo(e,",")}catch(e){t.i=o,i.push(t.string.slice(s,o-1));break}if(t.i>=o){i.push(t.string.slice(s,o));break}s=t.i,i.push(a)}t.string=makeDiagMatrix(i,r)+t.string.slice(o),t.i=0}},PhysicsMethods.AutoClose=function(t,e,r){var n=t.create("token","mo",{stretchy:!1},e),o=t.itemFactory.create("mml",n).setProperties({autoclose:e});t.Push(o)},PhysicsMethods.Vnabla=function(t,e){var r=t.options.physics.arrowdel?"\\vec{\\gradientnabla}":"{\\gradientnabla}";return t.Push(new TexParser_js_1$2.default(r,t.stack.env,t.configuration).mml())},PhysicsMethods.DiffD=function(t,e){var r=t.options.physics.italicdiff?"d":"{\\rm d}";return t.Push(new TexParser_js_1$2.default(r,t.stack.env,t.configuration).mml())},PhysicsMethods.Macro=BaseMethods_js_1$1.default.Macro,PhysicsMethods.NamedFn=BaseMethods_js_1$1.default.NamedFn,PhysicsMethods.Array=BaseMethods_js_1$1.default.Array,PhysicsMethods$1.default=PhysicsMethods;var __importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PhysicsMappings,"__esModule",{value:!0});var SymbolMap_js_1$3=SymbolMap,PhysicsMethods_js_1=__importDefault$4(PhysicsMethods$1),TexConstants_js_1$3=TexConstants,ParseMethods_js_1=__importDefault$4(ParseMethods$1),MmlNode_js_1$1=MmlNode,_a$1;new SymbolMap_js_1$3.CommandMap("Physics-automatic-bracing-macros",{quantity:"Quantity",qty:"Quantity",pqty:["Quantity","(",")",!0],bqty:["Quantity","[","]",!0],vqty:["Quantity","|","|",!0],Bqty:["Quantity","\\{","\\}",!0],absolutevalue:["Quantity","|","|",!0],abs:["Quantity","|","|",!0],norm:["Quantity","\\|","\\|",!0],evaluated:"Eval",eval:"Eval",order:["Quantity","(",")",!0,"O",TexConstants_js_1$3.TexConstant.Variant.CALLIGRAPHIC],commutator:"Commutator",comm:"Commutator",anticommutator:["Commutator","\\{","\\}"],acomm:["Commutator","\\{","\\}"],poissonbracket:["Commutator","\\{","\\}"],pb:["Commutator","\\{","\\}"]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.CharacterMap("Physics-vector-mo",ParseMethods_js_1.default.mathchar0mo,{dotproduct:["⋅",{mathvariant:TexConstants_js_1$3.TexConstant.Variant.BOLD}],vdot:["⋅",{mathvariant:TexConstants_js_1$3.TexConstant.Variant.BOLD}],crossproduct:"×",cross:"×",cp:"×",gradientnabla:["∇",{mathvariant:TexConstants_js_1$3.TexConstant.Variant.BOLD}]}),new SymbolMap_js_1$3.CharacterMap("Physics-vector-mi",ParseMethods_js_1.default.mathchar0mi,{real:["ℜ",{mathvariant:TexConstants_js_1$3.TexConstant.Variant.NORMAL}],imaginary:["ℑ",{mathvariant:TexConstants_js_1$3.TexConstant.Variant.NORMAL}]}),new SymbolMap_js_1$3.CommandMap("Physics-vector-macros",{vnabla:"Vnabla",vectorbold:"VectorBold",vb:"VectorBold",vectorarrow:["StarMacro",1,"\\vec{\\vb","{#1}}"],va:["StarMacro",1,"\\vec{\\vb","{#1}}"],vectorunit:["StarMacro",1,"\\hat{\\vb","{#1}}"],vu:["StarMacro",1,"\\hat{\\vb","{#1}}"],gradient:["OperatorApplication","\\vnabla","(","["],grad:["OperatorApplication","\\vnabla","(","["],divergence:["VectorOperator","\\vnabla\\vdot","(","["],div:["VectorOperator","\\vnabla\\vdot","(","["],curl:["VectorOperator","\\vnabla\\crossproduct","(","["],laplacian:["OperatorApplication","\\nabla^2","(","["]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.CommandMap("Physics-expressions-macros",{sin:"Expression",sinh:"Expression",arcsin:"Expression",asin:"Expression",cos:"Expression",cosh:"Expression",arccos:"Expression",acos:"Expression",tan:"Expression",tanh:"Expression",arctan:"Expression",atan:"Expression",csc:"Expression",csch:"Expression",arccsc:"Expression",acsc:"Expression",sec:"Expression",sech:"Expression",arcsec:"Expression",asec:"Expression",cot:"Expression",coth:"Expression",arccot:"Expression",acot:"Expression",exp:["Expression",!1],log:"Expression",ln:"Expression",det:["Expression",!1],Pr:["Expression",!1],tr:["Expression",!1],trace:["Expression",!1,"tr"],Tr:["Expression",!1],Trace:["Expression",!1,"Tr"],rank:"NamedFn",erf:["Expression",!1],Residue:["Macro","\\mathrm{Res}"],Res:["OperatorApplication","\\Residue","(","[","{"],principalvalue:["OperatorApplication","{\\cal P}"],pv:["OperatorApplication","{\\cal P}"],PV:["OperatorApplication","{\\rm P.V.}"],Re:["OperatorApplication","\\mathrm{Re}","{"],Im:["OperatorApplication","\\mathrm{Im}","{"],sine:["NamedFn","sin"],hypsine:["NamedFn","sinh"],arcsine:["NamedFn","arcsin"],asine:["NamedFn","asin"],cosine:["NamedFn","cos"],hypcosine:["NamedFn","cosh"],arccosine:["NamedFn","arccos"],acosine:["NamedFn","acos"],tangent:["NamedFn","tan"],hyptangent:["NamedFn","tanh"],arctangent:["NamedFn","arctan"],atangent:["NamedFn","atan"],cosecant:["NamedFn","csc"],hypcosecant:["NamedFn","csch"],arccosecant:["NamedFn","arccsc"],acosecant:["NamedFn","acsc"],secant:["NamedFn","sec"],hypsecant:["NamedFn","sech"],arcsecant:["NamedFn","arcsec"],asecant:["NamedFn","asec"],cotangent:["NamedFn","cot"],hypcotangent:["NamedFn","coth"],arccotangent:["NamedFn","arccot"],acotangent:["NamedFn","acot"],exponential:["NamedFn","exp"],logarithm:["NamedFn","log"],naturallogarithm:["NamedFn","ln"],determinant:["NamedFn","det"],Probability:["NamedFn","Pr"]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.CommandMap("Physics-quick-quad-macros",{qqtext:"Qqtext",qq:"Qqtext",qcomma:["Macro","\\qqtext*{,}"],qc:["Macro","\\qqtext*{,}"],qcc:["Qqtext","c.c."],qif:["Qqtext","if"],qthen:["Qqtext","then"],qelse:["Qqtext","else"],qotherwise:["Qqtext","otherwise"],qunless:["Qqtext","unless"],qgiven:["Qqtext","given"],qusing:["Qqtext","using"],qassume:["Qqtext","assume"],qsince:["Qqtext","since"],qlet:["Qqtext","let"],qfor:["Qqtext","for"],qall:["Qqtext","all"],qeven:["Qqtext","even"],qodd:["Qqtext","odd"],qinteger:["Qqtext","integer"],qand:["Qqtext","and"],qor:["Qqtext","or"],qas:["Qqtext","as"],qin:["Qqtext","in"]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.CommandMap("Physics-derivative-macros",{diffd:"DiffD",flatfrac:["Macro","\\left.#1\\middle/#2\\right.",2],differential:["Differential","\\diffd"],dd:["Differential","\\diffd"],variation:["Differential","\\delta"],var:["Differential","\\delta"],derivative:["Derivative",2,"\\diffd"],dv:["Derivative",2,"\\diffd"],partialderivative:["Derivative",3,"\\partial"],pderivative:["Derivative",3,"\\partial"],pdv:["Derivative",3,"\\partial"],functionalderivative:["Derivative",2,"\\delta"],fderivative:["Derivative",2,"\\delta"],fdv:["Derivative",2,"\\delta"]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.CommandMap("Physics-bra-ket-macros",{bra:"Bra",ket:"Ket",innerproduct:"BraKet",ip:"BraKet",braket:"BraKet",outerproduct:"KetBra",dyad:"KetBra",ketbra:"KetBra",op:"KetBra",expectationvalue:"Expectation",expval:"Expectation",ev:"Expectation",matrixelement:"MatrixElement",matrixel:"MatrixElement",mel:"MatrixElement"},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.CommandMap("Physics-matrix-macros",{matrixquantity:"MatrixQuantity",mqty:"MatrixQuantity",pmqty:["Macro","\\mqty(#1)",1],Pmqty:["Macro","\\mqty*(#1)",1],bmqty:["Macro","\\mqty[#1]",1],vmqty:["Macro","\\mqty|#1|",1],smallmatrixquantity:["MatrixQuantity",!0],smqty:["MatrixQuantity",!0],spmqty:["Macro","\\smqty(#1)",1],sPmqty:["Macro","\\smqty*(#1)",1],sbmqty:["Macro","\\smqty[#1]",1],svmqty:["Macro","\\smqty|#1|",1],matrixdeterminant:["Macro","\\vmqty{#1}",1],mdet:["Macro","\\vmqty{#1}",1],smdet:["Macro","\\svmqty{#1}",1],identitymatrix:"IdentityMatrix",imat:"IdentityMatrix",xmatrix:"XMatrix",xmat:"XMatrix",zeromatrix:["Macro","\\xmat{0}{#1}{#2}",2],zmat:["Macro","\\xmat{0}{#1}{#2}",2],paulimatrix:"PauliMatrix",pmat:"PauliMatrix",diagonalmatrix:"DiagonalMatrix",dmat:"DiagonalMatrix",antidiagonalmatrix:["DiagonalMatrix",!0],admat:["DiagonalMatrix",!0]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.EnvironmentMap("Physics-aux-envs",ParseMethods_js_1.default.environment,{smallmatrix:["Array",null,null,null,"c","0.333em",".2em","S",1]},PhysicsMethods_js_1.default),new SymbolMap_js_1$3.MacroMap("Physics-characters",{"|":["AutoClose",MmlNode_js_1$1.TEXCLASS.ORD],")":"AutoClose","]":"AutoClose"},PhysicsMethods_js_1.default),Object.defineProperty(PhysicsConfiguration,"__esModule",{value:!0}),PhysicsConfiguration.PhysicsConfiguration=void 0;var Configuration_js_1$4=Configuration,PhysicsItems_js_1=PhysicsItems;PhysicsConfiguration.PhysicsConfiguration=Configuration_js_1$4.Configuration.create("physics",{handler:{macro:["Physics-automatic-bracing-macros","Physics-vector-macros","Physics-vector-mo","Physics-vector-mi","Physics-derivative-macros","Physics-expressions-macros","Physics-quick-quad-macros","Physics-bra-ket-macros","Physics-matrix-macros"],character:["Physics-characters"],environment:["Physics-aux-envs"]},items:(_a$1={},_a$1[PhysicsItems_js_1.AutoOpen.prototype.kind]=PhysicsItems_js_1.AutoOpen,_a$1),options:{physics:{italicdiff:!1,arrowdel:!1}}});var SetOptionsConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__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.")},r=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.SetOptionsConfiguration=t.SetOptionsUtil=void 0;var n=Configuration,o=SymbolMap,i=r(TexError$1),a=r(ParseUtil$1),s=_Symbol,l=r(BaseMethods$1),c=Options;t.SetOptionsUtil={filterPackage:function(t,e){if("tex"!==e&&!n.ConfigurationHandler.get(e))throw new i.default("NotAPackage","Not a defined package: %1",e);var r=t.options.setoptions,o=r.allowOptions[e];if(void 0===o&&!r.allowPackageDefault||!1===o)throw new i.default("PackageNotSettable",'Options can\'t be set for package "%1"',e);return!0},filterOption:function(t,e,r){var n,o=t.options.setoptions,a=o.allowOptions[e]||{},s=a.hasOwnProperty(r)&&!(0,c.isObject)(a[r])?a[r]:null;if(!1===s||null===s&&!o.allowOptionsDefault)throw new i.default("OptionNotSettable",'Option "%1" is not allowed to be set',r);if(!(null===(n="tex"===e?t.options:t.options[e])||void 0===n?void 0:n.hasOwnProperty(r)))throw"tex"===e?new i.default("InvalidTexOption",'Invalid TeX option "%1"',r):new i.default("InvalidOptionKey",'Invalid option "%1" for package "%2"',r,e);return!0},filterValue:function(t,e,r,n){return n}};var u=new o.CommandMap("setoptions",{setOptions:"SetOptions"},{SetOptions:function(t,r){var n,o,i=t.GetBrackets(r)||"tex",s=a.default.keyvalOptions(t.GetArgument(r)),l=t.options.setoptions;if(l.filterPackage(t,i))try{for(var c=e(Object.keys(s)),u=c.next();!u.done;u=c.next()){var d=u.value;l.filterOption(t,i,d)&&(("tex"===i?t.options:t.options[i])[d]=l.filterValue(t,i,d,s[d]))}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}}});t.SetOptionsConfiguration=n.Configuration.create("setoptions",{handler:{macro:["setoptions"]},config:function(t,e){var r=e.parseOptions.handlers.get("macro").lookup("require");r&&(u.add("Require",new s.Macro("Require",r._func)),u.add("require",new s.Macro("require",l.default.Macro,["\\Require{#2}\\setOptions[#2]{#1}",2,""])))},priority:3,options:{setoptions:{filterPackage:t.SetOptionsUtil.filterPackage,filterOption:t.SetOptionsUtil.filterOption,filterValue:t.SetOptionsUtil.filterValue,allowPackageDefault:!0,allowOptionsDefault:!0,allowOptions:(0,c.expandable)({tex:{FindTeX:!1,formatError:!1,package:!1,baseURL:!1,tags:!1,maxBuffer:!1,maxMaxros:!1,macros:!1,environments:!1},setoptions:!1,autoload:!1,require:!1,configmacros:!1,tagformat:!1})}}})}(SetOptionsConfiguration),getDefaultExportFromCjs(SetOptionsConfiguration);var TagFormatConfiguration={},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(TagFormatConfiguration,"__esModule",{value:!0}),TagFormatConfiguration.TagFormatConfiguration=TagFormatConfiguration.tagformatConfig=void 0;var Configuration_js_1$3=Configuration,Tags_js_1$1=Tags,tagID=0;function tagformatConfig(t,e){var r=e.parseOptions.options.tags;"base"!==r&&t.tags.hasOwnProperty(r)&&Tags_js_1$1.TagsFactory.add(r,t.tags[r]);var n=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return __extends$1(r,t),r.prototype.formatNumber=function(t){return e.parseOptions.options.tagformat.number(t)},r.prototype.formatTag=function(t){return e.parseOptions.options.tagformat.tag(t)},r.prototype.formatId=function(t){return e.parseOptions.options.tagformat.id(t)},r.prototype.formatUrl=function(t,r){return e.parseOptions.options.tagformat.url(t,r)},r}(Tags_js_1$1.TagsFactory.create(e.parseOptions.options.tags).constructor),o="configTags-"+ ++tagID;Tags_js_1$1.TagsFactory.add(o,n),e.parseOptions.options.tags=o}TagFormatConfiguration.tagformatConfig=tagformatConfig,TagFormatConfiguration.TagFormatConfiguration=Configuration_js_1$3.Configuration.create("tagformat",{config:[tagformatConfig,10],options:{tagformat:{number:function(t){return t.toString()},tag:function(t){return"("+t+")"},id:function(t){return"mjx-eqn:"+t.replace(/\s/g,"_")},url:function(t,e){return e+"#"+encodeURIComponent(t)}}}});var TextcompConfiguration={},TextcompMappings={},TextMacrosMethods={},__importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TextMacrosMethods,"__esModule",{value:!0}),TextMacrosMethods.TextMacrosMethods=void 0;var TexParser_js_1$1=__importDefault$3(TexParser$1),Retries_js_1=Retries,BaseMethods_js_1=__importDefault$3(BaseMethods$1);TextMacrosMethods.TextMacrosMethods={Comment:function(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++;t.i++},Math:function(t,e){t.saveText();for(var r,n,o=t.i,i=0;n=t.GetNext();)switch(r=t.i++,n){case"\\":")"===t.GetCS()&&(n="\\(");case"$":if(0===i&&e===n){var a=t.texParser.configuration,s=new TexParser_js_1$1.default(t.string.substr(o,r-o),t.stack.env,a).mml();return void t.PushMath(s)}break;case"{":i++;break;case"}":0===i&&t.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace"),i--}t.Error("MathNotTerminated","Math-mode is not properly terminated")},MathModeOnly:function(t,e){t.Error("MathModeOnly","'%1' allowed only in math mode",e)},Misplaced:function(t,e){t.Error("Misplaced","'%1' can not be used here",e)},OpenBrace:function(t,e){var r=t.stack.env;t.envStack.push(r),t.stack.env=Object.assign({},r)},CloseBrace:function(t,e){t.envStack.length?(t.saveText(),t.stack.env=t.envStack.pop()):t.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace")},OpenQuote:function(t,e){t.string.charAt(t.i)===e?(t.text+="“",t.i++):t.text+="‘"},CloseQuote:function(t,e){t.string.charAt(t.i)===e?(t.text+="”",t.i++):t.text+="’"},Tilde:function(t,e){t.text+=" "},Space:function(t,e){for(t.text+=" ";t.GetNext().match(/\s/);)t.i++},SelfQuote:function(t,e){t.text+=e.substr(1)},Insert:function(t,e,r){t.text+=r},Accent:function(t,e,r){var n=t.ParseArg(e),o=t.create("token","mo",{},r);t.addAttributes(o),t.Push(t.create("node","mover",[n,o]))},Emph:function(t,e){var r="-tex-mathit"===t.stack.env.mathvariant?"normal":"-tex-mathit";t.Push(t.ParseTextArg(e,{mathvariant:r}))},SetFont:function(t,e,r){t.saveText(),t.stack.env.mathvariant=r},SetSize:function(t,e,r){t.saveText(),t.stack.env.mathsize=r},CheckAutoload:function(t,e){var r=t.configuration.packageData.get("autoload"),n=t.texParser;e=e.slice(1);var o=n.lookup("macro",e);if(!o||r&&o._func===r.Autoload){if(n.parse("macro",[n,e]),!o)return;(0,Retries_js_1.retryAfter)(Promise.resolve())}n.parse("macro",[t,e])},Macro:BaseMethods_js_1.default.Macro,Spacer:BaseMethods_js_1.default.Spacer,Hskip:BaseMethods_js_1.default.Hskip,rule:BaseMethods_js_1.default.rule,Rule:BaseMethods_js_1.default.Rule,HandleRef:BaseMethods_js_1.default.HandleRef};var TextParser$1={},__extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__values=commonjsGlobal&&commonjsGlobal.__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.")},__read=commonjsGlobal&&commonjsGlobal.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.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 a},__spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},__importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TextParser$1,"__esModule",{value:!0}),TextParser$1.TextParser=void 0;var TexParser_js_1=__importDefault$2(TexParser$1),TexError_js_1=__importDefault$2(TexError$1),ParseUtil_js_1$1=__importDefault$2(ParseUtil$1),MmlNode_js_1=MmlNode,NodeUtil_js_1=__importDefault$2(NodeUtil$1),BaseItems_js_1$1=BaseItems,TextParser=function(t){function e(e,r,n,o){var i=t.call(this,e,r,n)||this;return i.level=o,i}return __extends(e,t),Object.defineProperty(e.prototype,"texParser",{get:function(){return this.configuration.packageData.get("textmacros").texParser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tags",{get:function(){return this.texParser.tags},enumerable:!1,configurable:!0}),e.prototype.mml=function(){return null!=this.level?this.create("node","mstyle",this.nodes,{displaystyle:!1,scriptlevel:this.level}):1===this.nodes.length?this.nodes[0]:this.create("node","mrow",this.nodes)},e.prototype.Parse=function(){this.text="",this.nodes=[],this.envStack=[],t.prototype.Parse.call(this)},e.prototype.saveText=function(){if(this.text){var t=this.stack.env.mathvariant,e=ParseUtil_js_1$1.default.internalText(this,this.text,t?{mathvariant:t}:{});this.text="",this.Push(e)}},e.prototype.Push=function(e){if(this.text&&this.saveText(),e instanceof BaseItems_js_1$1.StopItem)return t.prototype.Push.call(this,e);e instanceof BaseItems_js_1$1.StyleItem?this.stack.env.mathcolor=this.stack.env.color:e instanceof MmlNode_js_1.AbstractMmlNode&&(this.addAttributes(e),this.nodes.push(e))},e.prototype.PushMath=function(t){var e,r,n=this.stack.env;t.isKind("TeXAtom")||(t=this.create("node","TeXAtom",[t]));try{for(var o=__values(["mathsize","mathcolor"]),i=o.next();!i.done;i=o.next()){var a=i.value;n[a]&&!t.attributes.getExplicit(a)&&(t.isToken||t.isKind("mstyle")||(t=this.create("node","mstyle",[t])),NodeUtil_js_1.default.setAttribute(t,a,n[a]))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}t.isInferred&&(t=this.create("node","mrow",t.childNodes)),this.nodes.push(t)},e.prototype.addAttributes=function(t){var e,r,n=this.stack.env;if(t.isToken)try{for(var o=__values(["mathsize","mathcolor","mathvariant"]),i=o.next();!i.done;i=o.next()){var a=i.value;n[a]&&!t.attributes.getExplicit(a)&&NodeUtil_js_1.default.setAttribute(t,a,n[a])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},e.prototype.ParseTextArg=function(t,r){return new e(this.GetArgument(t),r=Object.assign(Object.assign({},this.stack.env),r),this.configuration).mml()},e.prototype.ParseArg=function(t){return new e(this.GetArgument(t),this.stack.env,this.configuration).mml()},e.prototype.Error=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];throw new(TexError_js_1.default.bind.apply(TexError_js_1.default,__spreadArray([void 0,t,e],__read(r),!1)))},e}(TexParser_js_1.default);TextParser$1.TextParser=TextParser;var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TextcompMappings,"__esModule",{value:!0});var SymbolMap_js_1$2=SymbolMap,TexConstants_js_1$2=TexConstants,TextMacrosMethods_js_1$2=TextMacrosMethods,ParseUtil_js_1=__importDefault$1(ParseUtil$1),TextParser_js_1$1=TextParser$1;new SymbolMap_js_1$2.CommandMap("textcomp-macros",{textasciicircum:["Insert","^"],textasciitilde:["Insert","~"],textasteriskcentered:["Insert","*"],textbackslash:["Insert","\\"],textbar:["Insert","|"],textbraceleft:["Insert","{"],textbraceright:["Insert","}"],textbullet:["Insert","•"],textdagger:["Insert","†"],textdaggerdbl:["Insert","‡"],textellipsis:["Insert","…"],textemdash:["Insert","—"],textendash:["Insert","–"],textexclamdown:["Insert","¡"],textgreater:["Insert",">"],textless:["Insert","<"],textordfeminine:["Insert","ª"],textordmasculine:["Insert","º"],textparagraph:["Insert","¶"],textperiodcentered:["Insert","·"],textquestiondown:["Insert","¿"],textquotedblleft:["Insert","“"],textquotedblright:["Insert","”"],textquoteleft:["Insert","‘"],textquoteright:["Insert","’"],textsection:["Insert","§"],textunderscore:["Insert","_"],textvisiblespace:["Insert","␣"],textacutedbl:["Insert","˝"],textasciiacute:["Insert","´"],textasciibreve:["Insert","˘"],textasciicaron:["Insert","ˇ"],textasciidieresis:["Insert","¨"],textasciimacron:["Insert","¯"],textgravedbl:["Insert","˵"],texttildelow:["Insert","˷"],textbaht:["Insert","฿"],textcent:["Insert","¢"],textcolonmonetary:["Insert","₡"],textcurrency:["Insert","¤"],textdollar:["Insert","$"],textdong:["Insert","₫"],texteuro:["Insert","€"],textflorin:["Insert","ƒ"],textguarani:["Insert","₲"],textlira:["Insert","₤"],textnaira:["Insert","₦"],textpeso:["Insert","₱"],textsterling:["Insert","£"],textwon:["Insert","₩"],textyen:["Insert","¥"],textcircledP:["Insert","℗"],textcompwordmark:["Insert","‌"],textcopyleft:["Insert","🄯"],textcopyright:["Insert","©"],textregistered:["Insert","®"],textservicemark:["Insert","℠"],texttrademark:["Insert","™"],textbardbl:["Insert","‖"],textbigcircle:["Insert","◯"],textblank:["Insert","␢"],textbrokenbar:["Insert","¦"],textdiscount:["Insert","⁒"],textestimated:["Insert","℮"],textinterrobang:["Insert","‽"],textinterrobangdown:["Insert","⸘"],textmusicalnote:["Insert","♪"],textnumero:["Insert","№"],textopenbullet:["Insert","◦"],textpertenthousand:["Insert","‱"],textperthousand:["Insert","‰"],textrecipe:["Insert","℞"],textreferencemark:["Insert","※"],textlangle:["Insert","〈"],textrangle:["Insert","〉"],textlbrackdbl:["Insert","⟦"],textrbrackdbl:["Insert","⟧"],textlquill:["Insert","⁅"],textrquill:["Insert","⁆"],textcelsius:["Insert","℃"],textdegree:["Insert","°"],textdiv:["Insert","÷"],textdownarrow:["Insert","↓"],textfractionsolidus:["Insert","⁄"],textleftarrow:["Insert","←"],textlnot:["Insert","¬"],textmho:["Insert","℧"],textminus:["Insert","−"],textmu:["Insert","µ"],textohm:["Insert","Ω"],textonehalf:["Insert","½"],textonequarter:["Insert","¼"],textonesuperior:["Insert","¹"],textpm:["Insert","±"],textrightarrow:["Insert","→"],textsurd:["Insert","√"],textthreequarters:["Insert","¾"],textthreesuperior:["Insert","³"],texttimes:["Insert","×"],texttwosuperior:["Insert","²"],textuparrow:["Insert","↑"],textborn:["Insert","*"],textdied:["Insert","†"],textdivorced:["Insert","⚮"],textmarried:["Insert","⚭"],textcentoldstyle:["Insert","¢",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textdollaroldstyle:["Insert","$",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textzerooldstyle:["Insert","0",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textoneoldstyle:["Insert","1",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],texttwooldstyle:["Insert","2",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textthreeoldstyle:["Insert","3",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textfouroldstyle:["Insert","4",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textfiveoldstyle:["Insert","5",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textsixoldstyle:["Insert","6",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textsevenoldstyle:["Insert","7",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],texteightoldstyle:["Insert","8",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE],textnineoldstyle:["Insert","9",TexConstants_js_1$2.TexConstant.Variant.OLDSTYLE]},{Insert:function(t,e,r,n){if(t instanceof TextParser_js_1$1.TextParser){if(!n)return void TextMacrosMethods_js_1$2.TextMacrosMethods.Insert(t,e,r);t.saveText()}t.Push(ParseUtil_js_1.default.internalText(t,r,n?{mathvariant:n}:{}))}}),Object.defineProperty(TextcompConfiguration,"__esModule",{value:!0}),TextcompConfiguration.TextcompConfiguration=void 0;var Configuration_js_1$2=Configuration;TextcompConfiguration.TextcompConfiguration=Configuration_js_1$2.Configuration.create("textcomp",{handler:{macro:["textcomp-macros"]}});var TextMacrosConfiguration={},TextMacrosMappings={};Object.defineProperty(TextMacrosMappings,"__esModule",{value:!0});var SymbolMap_js_1$1=SymbolMap,TexConstants_js_1$1=TexConstants,TextMacrosMethods_js_1$1=TextMacrosMethods,lengths_js_1=lengths;new SymbolMap_js_1$1.MacroMap("text-special",{$:"Math","%":"Comment","^":"MathModeOnly",_:"MathModeOnly","&":"Misplaced","#":"Misplaced","~":"Tilde"," ":"Space","\t":"Space","\r":"Space","\n":"Space"," ":"Tilde","{":"OpenBrace","}":"CloseBrace","`":"OpenQuote","'":"CloseQuote"},TextMacrosMethods_js_1$1.TextMacrosMethods),new SymbolMap_js_1$1.CommandMap("text-macros",{"(":"Math",$:"SelfQuote",_:"SelfQuote","%":"SelfQuote","{":"SelfQuote","}":"SelfQuote"," ":"SelfQuote","&":"SelfQuote","#":"SelfQuote","\\":"SelfQuote","'":["Accent","´"],"’":["Accent","´"],"`":["Accent","`"],"‘":["Accent","`"],"^":["Accent","^"],'"':["Accent","¨"],"~":["Accent","~"],"=":["Accent","¯"],".":["Accent","˙"],u:["Accent","˘"],v:["Accent","ˇ"],emph:"Emph",rm:["SetFont",TexConstants_js_1$1.TexConstant.Variant.NORMAL],mit:["SetFont",TexConstants_js_1$1.TexConstant.Variant.ITALIC],oldstyle:["SetFont",TexConstants_js_1$1.TexConstant.Variant.OLDSTYLE],cal:["SetFont",TexConstants_js_1$1.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",TexConstants_js_1$1.TexConstant.Variant.BOLD],bbFont:["SetFont",TexConstants_js_1$1.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",TexConstants_js_1$1.TexConstant.Variant.SCRIPT],frak:["SetFont",TexConstants_js_1$1.TexConstant.Variant.FRAKTUR],sf:["SetFont",TexConstants_js_1$1.TexConstant.Variant.SANSSERIF],tt:["SetFont",TexConstants_js_1$1.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],Bbb:["Macro","{\\bbFont #1}",1],textnormal:["Macro","{\\rm #1}",1],textup:["Macro","{\\rm #1}",1],textrm:["Macro","{\\rm #1}",1],textit:["Macro","{\\it #1}",1],textbf:["Macro","{\\bf #1}",1],textsf:["Macro","{\\sf #1}",1],texttt:["Macro","{\\tt #1}",1],dagger:["Insert","†"],ddagger:["Insert","‡"],S:["Insert","§"],",":["Spacer",lengths_js_1.MATHSPACE.thinmathspace],":":["Spacer",lengths_js_1.MATHSPACE.mediummathspace],">":["Spacer",lengths_js_1.MATHSPACE.mediummathspace],";":["Spacer",lengths_js_1.MATHSPACE.thickmathspace],"!":["Spacer",lengths_js_1.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",lengths_js_1.MATHSPACE.thinmathspace],negthinspace:["Spacer",lengths_js_1.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],color:"CheckAutoload",textcolor:"CheckAutoload",colorbox:"CheckAutoload",fcolorbox:"CheckAutoload",href:"CheckAutoload",style:"CheckAutoload",class:"CheckAutoload",cssId:"CheckAutoload",unicode:"CheckAutoload",ref:["HandleRef",!1],eqref:["HandleRef",!0]},TextMacrosMethods_js_1$1.TextMacrosMethods);var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_a;Object.defineProperty(TextMacrosConfiguration,"__esModule",{value:!0}),TextMacrosConfiguration.TextMacrosConfiguration=TextMacrosConfiguration.TextBaseConfiguration=void 0;var Configuration_js_1$1=Configuration,ParseOptions_js_1=__importDefault(ParseOptions$1),Tags_js_1=Tags,BaseItems_js_1=BaseItems,TextParser_js_1=TextParser$1,TextMacrosMethods_js_1=TextMacrosMethods;function internalMath(t,e,r,n){var o=t.configuration.packageData.get("textmacros");return t instanceof TextParser_js_1.TextParser||(o.texParser=t),[new TextParser_js_1.TextParser(e,n?{mathvariant:n}:{},o.parseOptions,r).mml()]}TextMacrosConfiguration.TextBaseConfiguration=Configuration_js_1$1.Configuration.create("text-base",{parser:"text",handler:{character:["command","text-special"],macro:["text-macros"]},fallback:{character:function(t,e){t.text+=e},macro:function(t,e){var r=t.texParser,n=r.lookup("macro",e);n&&n._func!==TextMacrosMethods_js_1.TextMacrosMethods.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),r.parse("macro",[t,e])}},items:(_a={},_a[BaseItems_js_1.StartItem.prototype.kind]=BaseItems_js_1.StartItem,_a[BaseItems_js_1.StopItem.prototype.kind]=BaseItems_js_1.StopItem,_a[BaseItems_js_1.MmlItem.prototype.kind]=BaseItems_js_1.MmlItem,_a[BaseItems_js_1.StyleItem.prototype.kind]=BaseItems_js_1.StyleItem,_a)}),TextMacrosConfiguration.TextMacrosConfiguration=Configuration_js_1$1.Configuration.create("textmacros",{config:function(t,e){var r=new Configuration_js_1$1.ParserConfiguration(e.parseOptions.options.textmacros.packages,["tex","text"]);r.init();var n=new ParseOptions_js_1.default(r,[]);n.options=e.parseOptions.options,r.config(e),Tags_js_1.TagsFactory.addTags(r.tags),n.tags=Tags_js_1.TagsFactory.getDefault(),n.tags.configuration=n,n.packageData=e.parseOptions.packageData,n.packageData.set("textmacros",{parseOptions:n,jax:e,texParser:null}),n.options.internalMath=internalMath},preprocessors:[function(t){var e=t.data.packageData.get("textmacros");e.parseOptions.nodeFactory.setMmlFactory(e.jax.mmlFactory)}],options:{textmacros:{packages:["text-base"]}}});var UpgreekConfiguration={};Object.defineProperty(UpgreekConfiguration,"__esModule",{value:!0}),UpgreekConfiguration.UpgreekConfiguration=void 0;var Configuration_js_1=Configuration,SymbolMap_js_1=SymbolMap,TexConstants_js_1=TexConstants;function mathchar0miNormal(t,e){var r=e.attributes||{};r.mathvariant=TexConstants_js_1.TexConstant.Variant.NORMAL;var n=t.create("token","mi",r,e.char);t.Push(n)}new SymbolMap_js_1.CharacterMap("upgreek",mathchar0miNormal,{upalpha:"α",upbeta:"β",upgamma:"γ",updelta:"δ",upepsilon:"ϵ",upzeta:"ζ",upeta:"η",uptheta:"θ",upiota:"ι",upkappa:"κ",uplambda:"λ",upmu:"μ",upnu:"ν",upxi:"ξ",upomicron:"ο",uppi:"π",uprho:"ρ",upsigma:"σ",uptau:"τ",upupsilon:"υ",upphi:"ϕ",upchi:"χ",uppsi:"ψ",upomega:"ω",upvarepsilon:"ε",upvartheta:"ϑ",upvarpi:"ϖ",upvarrho:"ϱ",upvarsigma:"ς",upvarphi:"φ",Upgamma:"Γ",Updelta:"Δ",Uptheta:"Θ",Uplambda:"Λ",Upxi:"Ξ",Uppi:"Π",Upsigma:"Σ",Upupsilon:"Υ",Upphi:"Φ",Uppsi:"Ψ",Upomega:"Ω"}),UpgreekConfiguration.UpgreekConfiguration=Configuration_js_1.Configuration.create("upgreek",{handler:{macro:["upgreek"]}});var UnicodeConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeConfiguration=t.UnicodeMethods=void 0;var r=Configuration,n=e(TexError$1),o=SymbolMap,i=e(ParseUtil$1),a=e(NodeUtil$1),s=Entities$1;t.UnicodeMethods={};var l={};t.UnicodeMethods.Unicode=function(t,e){var r=t.GetBrackets(e),o=null,c=null;r&&(r.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)?(o=r.replace(/ /g,"").split(/,/),c=t.GetBrackets(e)):c=r);var u=i.default.trimSpaces(t.GetArgument(e)).replace(/^0x/,"x");if(!u.match(/^(x[0-9A-Fa-f]+|[0-9]+)$/))throw new n.default("BadUnicode","Argument to \\unicode must be a number");var d=parseInt(u.match(/^x/)?"0"+u:u);l[d]?c||(c=l[d][2]):l[d]=[800,200,c,d],o&&(l[d][0]=Math.floor(1e3*parseFloat(o[0])),l[d][1]=Math.floor(1e3*parseFloat(o[1])));var p=t.stack.env.font,m={};c?(l[d][2]=m.fontfamily=c.replace(/'/g,"'"),p&&(p.match(/bold/)&&(m.fontweight="bold"),p.match(/italic|-mathit/)&&(m.fontstyle="italic"))):p&&(m.mathvariant=p);var h=t.create("token","mtext",m,(0,s.numeric)(u));a.default.setProperty(h,"unicode",!0),t.Push(h)},new o.CommandMap("unicode",{unicode:"Unicode"},t.UnicodeMethods),t.UnicodeConfiguration=r.Configuration.create("unicode",{handler:{macro:["unicode"]}})}(UnicodeConfiguration),getDefaultExportFromCjs(UnicodeConfiguration);var VerbConfiguration={};!function(t){var e=commonjsGlobal&&commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.VerbConfiguration=t.VerbMethods=void 0;var r=Configuration,n=TexConstants,o=SymbolMap,i=e(TexError$1);t.VerbMethods={},t.VerbMethods.Verb=function(t,e){var r=t.GetNext(),o=++t.i;if(""===r)throw new i.default("MissingArgFor","Missing argument for %1",e);for(;t.i<t.string.length&&t.string.charAt(t.i)!==r;)t.i++;if(t.i===t.string.length)throw new i.default("NoClosingDelim","Can't find closing delimiter for %1",t.currentCS);var a=t.string.slice(o,t.i).replace(/ /g," ");t.i++,t.Push(t.create("token","mtext",{mathvariant:n.TexConstant.Variant.MONOSPACE},a))},new o.CommandMap("verb",{verb:"Verb"},t.VerbMethods),t.VerbConfiguration=r.Configuration.create("verb",{handler:{macro:["verb"]}})}(VerbConfiguration),getDefaultExportFromCjs(VerbConfiguration),Object.defineProperty(AllPackages,"__esModule",{value:!0});var AllPackages_1=AllPackages.AllPackages=void 0;"undefined"!=typeof MathJax&&MathJax.loader&&MathJax.loader.preLoad("[tex]/action","[tex]/ams","[tex]/amscd","[tex]/bbox","[tex]/boldsymbol","[tex]/braket","[tex]/bussproofs","[tex]/cancel","[tex]/cases","[tex]/centernot","[tex]/color","[tex]/colorv2","[tex]/colortbl","[tex]/empheq","[tex]/enclose","[tex]/extpfeil","[tex]/gensymb","[tex]/html","[tex]/mathtools","[tex]/mhchem","[tex]/newcommand","[tex]/noerrors","[tex]/noundefined","[tex]/physics","[tex]/upgreek","[tex]/unicode","[tex]/verb","[tex]/configmacros","[tex]/tagformat","[tex]/textcomp","[tex]/textmacros","[tex]/setoptions"),AllPackages_1=AllPackages.AllPackages=["base","action","ams","amscd","bbox","boldsymbol","braket","bussproofs","cancel","cases","centernot","color","colortbl","empheq","enclose","extpfeil","gensymb","html","mathtools","mhchem","newcommand","noerrors","noundefined","upgreek","unicode","verb","configmacros","tagformat","textcomp","textmacros"];var bundle_min={exports:{}},t;t=()=>(()=>{var t={2167:(t,e)=>{function r(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.freeze?e.freeze(t):t}var n=r({HTML:"text/html",isHTML:function(t){return t===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.assign=function(t,e){if(null===t||"object"!=typeof t)throw new TypeError("target is not an object");for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},e.find=function(t,e,r){if(void 0===r&&(r=Array.prototype),t&&"function"==typeof r.find)return r.find.call(t,e);for(var n=0;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(t,n)){var o=t[n];if(e.call(void 0,o,n,t))return o}},e.freeze=r,e.MIME_TYPE=n,e.NAMESPACE=o},6129:(t,e,r)=>{var n=r(2167),o=r(1146),i=r(1045),a=r(6925),s=o.DOMImplementation,l=n.NAMESPACE,c=a.ParseError,u=a.XMLReader;function d(t){return t.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(t){this.options=t||{locator:{}}}function m(){this.cdata=!1}function h(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function f(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function _(t,e,r){return"string"==typeof t?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}function g(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}p.prototype.parseFromString=function(t,e){var r=this.options,n=new u,o=r.domBuilder||new m,a=r.errorHandler,s=r.locator,c=r.xmlns||{},p=/\/x?html?$/.test(e),h=p?i.HTML_ENTITIES:i.XML_ENTITIES;s&&o.setDocumentLocator(s),n.errorHandler=function(t,e,r){if(!t){if(e instanceof m)return e;t=e}var n={},o=t instanceof Function;function i(e){var i=t[e];!i&&o&&(i=2==t.length?function(r){t(e,r)}:t),n[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+f(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(a,o,s),n.domBuilder=r.domBuilder||o,p&&(c[""]=l.HTML),c.xml=c.xml||l.XML;var _=r.normalizeLineEndings||d;return t&&"string"==typeof t?n.parse(_(t),c,h):n.errorHandler.error("invalid doc source"),o.doc},m.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,r,n){var o=this.doc,i=o.createElementNS(t,r||e),a=n.length;g(this,i),this.currentElement=i,this.locator&&h(this.locator,i);for(var s=0;s<a;s++){t=n.getURI(s);var l=n.getValue(s),c=(r=n.getQName(s),o.createAttributeNS(t,r));this.locator&&h(n.getLocator(s),c),c.value=c.nodeValue=l,i.setAttributeNode(c)}},endElement:function(t,e,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&h(this.locator,r),g(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=_.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(t);else n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&h(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,r){t=_.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&h(this.locator,n),g(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(t,e,r);this.locator&&h(this.locator,o),g(this,o),this.doc.doctype=o}},warning:function(t){console.warn("[xmldom warning]\t"+t,f(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,f(this.locator))},fatalError:function(t){throw new c(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){m.prototype[t]=function(){return null}})),e.DOMParser=p},1146:(t,e,r)=>{var n=r(2167),o=n.find,i=n.NAMESPACE;function a(t){return""!==t}function s(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t}function l(t){if(!t)return[];var e=function(t){return t?t.split(/[\t\n\f\r ]+/).filter(a):[]}(t);return Object.keys(e.reduce(s,{}))}function c(t,e){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}function u(t,e){var r=t.prototype;if(!(r instanceof e)){function n(){}n.prototype=e.prototype,c(r,n=new n),t.prototype=r=n}r.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),r.constructor=t)}var d={},p=d.ELEMENT_NODE=1,m=d.ATTRIBUTE_NODE=2,h=d.TEXT_NODE=3,f=d.CDATA_SECTION_NODE=4,_=d.ENTITY_REFERENCE_NODE=5,g=d.ENTITY_NODE=6,y=d.PROCESSING_INSTRUCTION_NODE=7,b=d.COMMENT_NODE=8,v=d.DOCUMENT_NODE=9,x=d.DOCUMENT_TYPE_NODE=10,M=d.DOCUMENT_FRAGMENT_NODE=11,S=d.NOTATION_NODE=12,E={},C={},$=(E.INDEX_SIZE_ERR=(C[1]="Index size error",1),E.DOMSTRING_SIZE_ERR=(C[2]="DOMString size error",2),E.HIERARCHY_REQUEST_ERR=(C[3]="Hierarchy request error",3)),O=(E.WRONG_DOCUMENT_ERR=(C[4]="Wrong document",4),E.INVALID_CHARACTER_ERR=(C[5]="Invalid character",5),E.NO_DATA_ALLOWED_ERR=(C[6]="No data allowed",6),E.NO_MODIFICATION_ALLOWED_ERR=(C[7]="No modification allowed",7),E.NOT_FOUND_ERR=(C[8]="Not found",8)),A=(E.NOT_SUPPORTED_ERR=(C[9]="Not supported",9),E.INUSE_ATTRIBUTE_ERR=(C[10]="Attribute in use",10));function j(t,e){if(e instanceof Error)var r=e;else r=this,Error.call(this,C[t]),this.message=C[t],Error.captureStackTrace&&Error.captureStackTrace(this,j);return r.code=t,e&&(this.message=this.message+": "+e),r}function T(){}function N(t,e){this._node=t,this._refresh=e,w(this)}function w(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(yt(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];c(r,t),t._inc=e}}function P(){}function L(t,e){for(var r=t.length;r--;)if(t[r]===e)return r}function I(t,e,r,n){if(n?e[L(e,n)]=r:e[e.length++]=r,t){r.ownerElement=t;var o=t.ownerDocument;o&&(n&&G(o,t,n),function(t,e,r){t&&t._inc++,r.namespaceURI===i.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}(o,t,r))}}function k(t,e,r){var n=L(e,r);if(!(n>=0))throw new j(O,new Error(t.tagName+"@"+r));for(var o=e.length-1;n<o;)e[n]=e[++n];if(e.length=o,t){var i=t.ownerDocument;i&&(G(i,t,r),r.ownerElement=null)}}function R(){}function B(){}function D(t){return("<"==t?"&lt;":">"==t&&"&gt;")||"&"==t&&"&amp;"||'"'==t&&"&quot;"||"&#"+t.charCodeAt()+";"}function F(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(F(t,e))return!0}while(t=t.nextSibling)}function U(){this.ownerDocument=this}function G(t,e,r,n){t&&t._inc++,r.namespaceURI===i.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function H(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r)n[n.length++]=r;else{for(var o=e.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i,delete n[n.length]}}}function q(t,e){var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,H(t.ownerDocument,t),e}function W(t){return t&&t.nodeType===B.DOCUMENT_TYPE_NODE}function X(t){return t&&t.nodeType===B.ELEMENT_NODE}function V(t){return t&&t.nodeType===B.TEXT_NODE}function z(t,e){var r=t.childNodes||[];if(o(r,X)||W(e))return!1;var n=o(r,W);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function J(t,e){var r=t.childNodes||[];if(o(r,(function(t){return X(t)&&t!==e})))return!1;var n=o(r,W);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function K(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=i.filter(X);if(a.length>1||o(i,V))throw new j($,"More than one element or text in fragment");if(1===a.length&&!z(t,r))throw new j($,"Element in fragment can not be inserted before doctype")}if(X(e)&&!z(t,r))throw new j($,"Only one element can be added and only after doctype");if(W(e)){if(o(n,W))throw new j($,"Only one doctype is allowed");var s=o(n,X);if(r&&n.indexOf(s)<n.indexOf(r))throw new j($,"Doctype can only be inserted before an element");if(!r&&s)throw new j($,"Doctype can not be appended since element is present")}}function Y(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===B.DOCUMENT_FRAGMENT_NODE){var a=i.filter(X);if(a.length>1||o(i,V))throw new j($,"More than one element or text in fragment");if(1===a.length&&!J(t,r))throw new j($,"Element in fragment can not be inserted before doctype")}if(X(e)&&!J(t,r))throw new j($,"Only one element can be added and only after doctype");if(W(e)){if(o(n,(function(t){return W(t)&&t!==r})))throw new j($,"Only one doctype is allowed");var s=o(n,X);if(r&&n.indexOf(s)<n.indexOf(r))throw new j($,"Doctype can only be inserted before an element")}}function Q(t,e,r,n){(function(t,e,r){if(!function(t){return t&&(t.nodeType===B.DOCUMENT_NODE||t.nodeType===B.DOCUMENT_FRAGMENT_NODE||t.nodeType===B.ELEMENT_NODE)}(t))throw new j($,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new j(O,"child not in parent");if(!function(t){return t&&(X(t)||V(t)||W(t)||t.nodeType===B.DOCUMENT_FRAGMENT_NODE||t.nodeType===B.COMMENT_NODE||t.nodeType===B.PROCESSING_INSTRUCTION_NODE)}(e)||W(e)&&t.nodeType!==B.DOCUMENT_NODE)throw new j($,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)})(t,e,r),t.nodeType===B.DOCUMENT_NODE&&(n||K)(t,e,r);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===M){var i=e.firstChild;if(null==i)return e;var a=e.lastChild}else i=a=e;var s=r?r.previousSibling:t.lastChild;i.previousSibling=s,a.nextSibling=r,s?s.nextSibling=i:t.firstChild=i,null==r?t.lastChild=a:r.previousSibling=a;do{i.parentNode=t}while(i!==a&&(i=i.nextSibling));return H(t.ownerDocument||t,t),e.nodeType==M&&(e.firstChild=e.lastChild=null),e}function Z(){this._nsMap={}}function tt(){}function et(){}function rt(){}function nt(){}function ot(){}function it(){}function at(){}function st(){}function lt(){}function ct(){}function ut(){}function dt(){}function pt(t,e){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var a=[{namespace:i,prefix:null}];return ft(this,r,t,e,a),r.join("")}function mt(t,e,r){var n=t.prefix||"",o=t.namespaceURI;if(!o)return!1;if("xml"===n&&o===i.XML||o===i.XMLNS)return!1;for(var a=r.length;a--;){var s=r[a];if(s.prefix===n)return s.namespace!==o}return!0}function ht(t,e,r){t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,D),'"')}function ft(t,e,r,n,o){if(o||(o=[]),n){if(!(t=n(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case p:var a=t.attributes,s=a.length,l=t.firstChild,c=t.tagName,u=c;if(!(r=i.isHTML(t.namespaceURI)||r)&&!t.prefix&&t.namespaceURI){for(var d,g=0;g<a.length;g++)if("xmlns"===a.item(g).name){d=a.item(g).value;break}if(!d)for(var S=o.length-1;S>=0;S--)if(""===(E=o[S]).prefix&&E.namespace===t.namespaceURI){d=E.namespace;break}if(d!==t.namespaceURI)for(S=o.length-1;S>=0;S--){var E;if((E=o[S]).namespace===t.namespaceURI){E.prefix&&(u=E.prefix+":"+c);break}}}e.push("<",u);for(var C=0;C<s;C++)"xmlns"==($=a.item(C)).prefix?o.push({prefix:$.localName,namespace:$.value}):"xmlns"==$.nodeName&&o.push({prefix:"",namespace:$.value});for(C=0;C<s;C++){var $,O,A;mt($=a.item(C),0,o)&&(ht(e,(O=$.prefix||"")?"xmlns:"+O:"xmlns",A=$.namespaceURI),o.push({prefix:O,namespace:A})),ft($,e,r,n,o)}if(c===u&&mt(t,0,o)&&(ht(e,(O=t.prefix||"")?"xmlns:"+O:"xmlns",A=t.namespaceURI),o.push({prefix:O,namespace:A})),l||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(e.push(">"),r&&/^script$/i.test(c))for(;l;)l.data?e.push(l.data):ft(l,e,r,n,o.slice()),l=l.nextSibling;else for(;l;)ft(l,e,r,n,o.slice()),l=l.nextSibling;e.push("</",u,">")}else e.push("/>");return;case v:case M:for(l=t.firstChild;l;)ft(l,e,r,n,o.slice()),l=l.nextSibling;return;case m:return ht(e,t.name,t.value);case h:return e.push(t.data.replace(/[<&>]/g,D));case f:return e.push("<![CDATA[",t.data,"]]>");case b:return e.push("\x3c!--",t.data,"--\x3e");case x:var j=t.publicId,T=t.systemId;if(e.push("<!DOCTYPE ",t.name),j)e.push(" PUBLIC ",j),T&&"."!=T&&e.push(" ",T),e.push(">");else if(T&&"."!=T)e.push(" SYSTEM ",T,">");else{var N=t.internalSubset;N&&e.push(" [",N,"]"),e.push(">")}return;case y:return e.push("<?",t.target," ",t.data,"?>");case _:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function _t(t,e,r){var n;switch(e.nodeType){case p:(n=e.cloneNode(!1)).ownerDocument=t;case M:break;case m:r=!0}if(n||(n=e.cloneNode(!1)),n.ownerDocument=t,n.parentNode=null,r)for(var o=e.firstChild;o;)n.appendChild(_t(t,o,r)),o=o.nextSibling;return n}function gt(t,e,r){var n=new e.constructor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=e[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(e.childNodes&&(n.childNodes=new T),n.ownerDocument=t,n.nodeType){case p:var a=e.attributes,s=n.attributes=new P,l=a.length;s._ownerElement=n;for(var c=0;c<l;c++)n.setAttributeNode(gt(t,a.item(c),!0));break;case m:r=!0}if(r)for(var u=e.firstChild;u;)n.appendChild(gt(t,u,r)),u=u.nextSibling;return n}function yt(t,e,r){t[e]=r}E.INVALID_STATE_ERR=(C[11]="Invalid state",11),E.SYNTAX_ERR=(C[12]="Syntax error",12),E.INVALID_MODIFICATION_ERR=(C[13]="Invalid modification",13),E.NAMESPACE_ERR=(C[14]="Invalid namespace",14),E.INVALID_ACCESS_ERR=(C[15]="Invalid access",15),j.prototype=Error.prototype,c(E,j),T.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t,e){for(var r=[],n=0;n<this.length;n++)ft(this[n],r,t,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}},N.prototype.item=function(t){return w(this),this[t]||null},u(N,T),P.prototype={length:0,item:T.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var r=this[e];if(r.nodeName==t)return r}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new j(A);var r=this.getNamedItem(t.nodeName);return I(this._ownerElement,this,t,r),r},setNamedItemNS:function(t){var e,r=t.ownerElement;if(r&&r!=this._ownerElement)throw new j(A);return e=this.getNamedItemNS(t.namespaceURI,t.localName),I(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return k(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);return k(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){for(var r=this.length;r--;){var n=this[r];if(n.localName==e&&n.namespaceURI==t)return n}return null}},R.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=new U;if(n.implementation=this,n.childNodes=new T,n.doctype=r||null,r&&n.appendChild(r),e){var o=n.createElementNS(t,e);n.appendChild(o)}return n},createDocumentType:function(t,e,r){var n=new it;return n.name=t,n.nodeName=t,n.publicId=e||"",n.systemId=r||"",n}},B.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return Q(this,t,e)},replaceChild:function(t,e){Q(this,t,e,Y),e&&this.removeChild(e)},removeChild:function(t){return q(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return gt(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==h&&t.nodeType==h?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r)for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===t)return n;e=e.nodeType==m?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];e=e.nodeType==m?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},c(d,B),c(d,B.prototype),U.prototype={nodeName:"#document",nodeType:v,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==M){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return Q(this,t,e),t.ownerDocument=this,null===this.documentElement&&t.nodeType===p&&(this.documentElement=t),t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),q(this,t)},replaceChild:function(t,e){Q(this,t,e,Y),t.ownerDocument=this,e&&this.removeChild(e),X(t)&&(this.documentElement=t)},importNode:function(t,e){return _t(this,t,e)},getElementById:function(t){var e=null;return F(this.documentElement,(function(r){if(r.nodeType==p&&r.getAttribute("id")==t)return e=r,!0})),e},getElementsByClassName:function(t){var e=l(t);return new N(this,(function(r){var n=[];return e.length>0&&F(r.documentElement,(function(o){if(o!==r&&o.nodeType===p){var i=o.getAttribute("class");if(i){var a=t===i;if(!a){var s=l(i);a=e.every((c=s,function(t){return c&&-1!==c.indexOf(t)}))}a&&n.push(o)}}var c})),n}))},createElement:function(t){var e=new Z;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new T,(e.attributes=new P)._ownerElement=e,e},createDocumentFragment:function(){var t=new ct;return t.ownerDocument=this,t.childNodes=new T,t},createTextNode:function(t){var e=new rt;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new nt;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new ot;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new ut;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){var e=new tt;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new lt;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var r=new Z,n=e.split(":"),o=r.attributes=new P;return r.childNodes=new T,r.ownerDocument=this,r.nodeName=e,r.tagName=e,r.namespaceURI=t,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,o._ownerElement=r,r},createAttributeNS:function(t,e){var r=new tt,n=e.split(":");return r.ownerDocument=this,r.nodeName=e,r.name=e,r.namespaceURI=t,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,r}},u(U,B),Z.prototype={nodeType:p,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+e,this.setAttributeNode(r)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===M?this.insertBefore(t,null):function(t,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=t,e.previousSibling=t.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,t.lastChild=e,H(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r&&r.value||""},setAttributeNS:function(t,e,r){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new N(this,(function(e){var r=[];return F(e,(function(n){n===e||n.nodeType!=p||"*"!==t&&n.tagName!=t||r.push(n)})),r}))},getElementsByTagNameNS:function(t,e){return new N(this,(function(r){var n=[];return F(r,(function(o){o===r||o.nodeType!==p||"*"!==t&&o.namespaceURI!==t||"*"!==e&&o.localName!=e||n.push(o)})),n}))}},U.prototype.getElementsByTagName=Z.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=Z.prototype.getElementsByTagNameNS,u(Z,B),tt.prototype.nodeType=m,u(tt,B),et.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(C[$])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){r=this.data.substring(0,t)+r+this.data.substring(t+e),this.nodeValue=this.data=r,this.length=r.length}},u(et,B),rt.prototype={nodeName:"#text",nodeType:h,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},u(rt,et),nt.prototype={nodeName:"#comment",nodeType:b},u(nt,et),ot.prototype={nodeName:"#cdata-section",nodeType:f},u(ot,et),it.prototype.nodeType=x,u(it,B),at.prototype.nodeType=S,u(at,B),st.prototype.nodeType=g,u(st,B),lt.prototype.nodeType=_,u(lt,B),ct.prototype.nodeName="#document-fragment",ct.prototype.nodeType=M,u(ct,B),ut.prototype.nodeType=y,u(ut,B),dt.prototype.serializeToString=function(t,e,r){return pt.call(t,e,r)},B.prototype.toString=pt;try{if(Object.defineProperty){function bt(t){switch(t.nodeType){case p:case M:var e=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&e.push(bt(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}}Object.defineProperty(N.prototype,"length",{get:function(){return w(this),this.$$length}}),Object.defineProperty(B.prototype,"textContent",{get:function(){return bt(this)},set:function(t){switch(this.nodeType){case p:case M:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),yt=function(t,e,r){t["$$"+e]=r}}}catch(vt){}e.DocumentType=it,e.DOMException=j,e.DOMImplementation=R,e.Element=Z,e.Node=B,e.NodeList=T,e.XMLSerializer=dt},1045:(t,e,r)=>{var n=r(2167).freeze;e.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),e.entityMap=e.HTML_ENTITIES},3969:(t,e,r)=>{var n=r(1146);e.DOMImplementation=n.DOMImplementation,e.XMLSerializer=n.XMLSerializer,e.DOMParser=r(6129).DOMParser},6925:(t,e,r)=>{var n=r(2167).NAMESPACE,o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+o.source+i.source+"*(?::"+o.source+i.source+"*)?$");function s(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function l(){}function c(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function u(t,e,r,o,i,a){function s(t,e,n){r.attributeNames.hasOwnProperty(t)&&a.fatalError("Attribute "+t+" redefined"),r.addValue(t,e.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),n)}for(var l,c=++e,u=0;;){var d=t.charAt(c);switch(d){case"=":if(1===u)l=t.slice(e,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(a.warning('attribute value must after "="'),l=t.slice(e,c)),e=c+1,!((c=t.indexOf(d,e))>0))throw new Error("attribute value no end '"+d+"' match");s(l,p=t.slice(e,c),e-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(l,p=t.slice(e,c),e),a.warning('attribute "'+l+'" missed start quot('+d+")!!"),e=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(t.slice(e,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:break;case 2:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==u&&r.setTagName(t.slice(e,c)),c;case">":switch(u){case 0:r.setTagName(t.slice(e,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=t.slice(e,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=l),4==u?(a.warning('attribute "'+p+'" missed quot(")!'),s(l,p,e)):(n.isHTML(o[""])&&p.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,e));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":d=" ";default:if(d<=" ")switch(u){case 0:r.setTagName(t.slice(e,c)),u=6;break;case 1:l=t.slice(e,c),u=2;break;case 4:var p=t.slice(e,c);a.warning('attribute "'+p+'" missed quot(")!!'),s(l,p,e);case 5:u=6}else switch(u){case 2:r.tagName,n.isHTML(o[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),s(l,l,e),e=c,u=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:u=1,e=c;break;case 3:u=4,e=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function d(t,e,r){for(var o=t.tagName,i=null,a=t.length;a--;){var s=t[a],l=s.qName,c=s.value;if((m=l.indexOf(":"))>0)var u=s.prefix=l.slice(0,m),d=l.slice(m+1),p="xmlns"===u&&d;else d=l,u=null,p="xmlns"===l&&"";s.localName=d,!1!==p&&(null==i&&(i={},h(r,r={})),r[p]=i[p]=c,s.uri=n.XMLNS,e.startPrefixMapping(p,c))}for(a=t.length;a--;)(u=(s=t[a]).prefix)&&("xml"===u&&(s.uri=n.XML),"xmlns"!==u&&(s.uri=r[u||""]));var m;(m=o.indexOf(":"))>0?(u=t.prefix=o.slice(0,m),d=t.localName=o.slice(m+1)):(u=null,d=t.localName=o);var f=t.uri=r[u||""];if(e.startElement(f,d,o,t),!t.closed)return t.currentNSMap=r,t.localNSMap=i,!0;if(e.endElement(f,d,o),i)for(u in i)Object.prototype.hasOwnProperty.call(i,u)&&e.endPrefixMapping(u)}function p(t,e,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=t.indexOf("</"+r+">",e),a=t.substring(e+1,i);if(/[&<]/.test(a))return/^script$/i.test(r)?(o.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,n),o.characters(a,0,a.length),i)}return e+1}function m(t,e,r,n){var o=n[r];return null==o&&((o=t.lastIndexOf("</"+r+">"))<e&&(o=t.lastIndexOf("</"+r)),n[r]=o),o<e}function h(t,e){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}function f(t,e,r,n){if("-"===t.charAt(e+2))return"-"===t.charAt(e+3)?(o=t.indexOf("--\x3e",e+4))>e?(r.comment(t,e+4,o-e-4),o+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==t.substr(e+3,6)){var o=t.indexOf("]]>",e+9);return r.startCDATA(),r.characters(t,e+9,o-e-9),r.endCDATA(),o+3}var i=function(t,e){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(o.lastIndex=e,o.exec(t);r=o.exec(t);)if(n.push(r),r[1])return n}(t,e),a=i.length;if(a>1&&/!doctype/i.test(i[0][0])){var s=i[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(i[2][0])?(l=i[3][0],c=a>4&&i[4][0]):/^system$/i.test(i[2][0])&&(c=i[3][0]));var u=i[a-1];return r.startDTD(s,l,c),r.endDTD(),u.index+u[0].length}return-1}function _(t,e,r){var n=t.indexOf("?>",e);if(n){var o=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function g(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,l.prototype={parse:function(t,e,r){var o=this.domBuilder;o.startDocument(),h(e,e={}),function(t,e,r,o,i){function a(t){var e=t.slice(1,-1);return Object.hasOwnProperty.call(r,e)?r[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function l(e){if(e>E){var r=t.substring(E,e).replace(/&#?\w+;/g,a);x&&h(E),o.characters(r,0,e-E),E=e}}function h(e,r){for(;e>=b&&(r=v.exec(t));)y=r.index,b=y+r[0].length,x.lineNumber++;x.columnNumber=e-y+1}for(var y=0,b=0,v=/.*(?:\r\n?|\n)|.*$/g,x=o.locator,M=[{currentNSMap:e}],S={},E=0;;){try{var C=t.indexOf("<",E);if(C<0){if(!t.substr(E).match(/^\s*$/)){var $=o.doc,O=$.createTextNode(t.substr(E));$.appendChild(O),o.currentElement=O}return}switch(C>E&&l(C),t.charAt(C+1)){case"/":var A=t.indexOf(">",C+3),j=t.substring(C+2,A).replace(/[ \t\n\r]+$/g,""),T=M.pop();A<0?(j=t.substring(C+2).replace(/[\s<].*/,""),i.error("end tag name: "+j+" is not complete:"+T.tagName),A=C+1+j.length):j.match(/\s</)&&(j=j.replace(/[\s<].*/,""),i.error("end tag name: "+j+" maybe not complete"),A=C+1+j.length);var N=T.localNSMap,w=T.tagName==j;if(w||T.tagName&&T.tagName.toLowerCase()==j.toLowerCase()){if(o.endElement(T.uri,T.localName,j),N)for(var P in N)Object.prototype.hasOwnProperty.call(N,P)&&o.endPrefixMapping(P);w||i.fatalError("end tag name: "+j+" is not match the current start tagName:"+T.tagName)}else M.push(T);A++;break;case"?":x&&h(C),A=_(t,C,o);break;case"!":x&&h(C),A=f(t,C,o,i);break;default:x&&h(C);var L=new g,I=M[M.length-1].currentNSMap,k=(A=u(t,C,L,I,a,i),L.length);if(!L.closed&&m(t,A,L.tagName,S)&&(L.closed=!0,r.nbsp||i.warning("unclosed xml attribute")),x&&k){for(var R=c(x,{}),B=0;B<k;B++){var D=L[B];h(D.offset),D.locator=c(x,{})}o.locator=R,d(L,o,I)&&M.push(L),o.locator=x}else d(L,o,I)&&M.push(L);n.isHTML(L.uri)&&!L.closed?A=p(t,A,L.tagName,a,o):A++}}catch(t){if(t instanceof s)throw t;i.error("element parse error: "+t),A=-1}A>E?E=A:l(Math.max(C,E)+1)}}(t,e,r,o,this.errorHandler),o.endDocument()}},g.prototype={setTagName:function(t){if(!a.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!a.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=l,e.ParseError=s},6036:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidNumberOfChildrenError=void 0;var n=r(6187);Object.defineProperty(e,"InvalidNumberOfChildrenError",{enumerable:!0,get:function(){return n.InvalidNumberOfChildrenError}})},6187:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidNumberOfChildrenError=void 0;class r extends Error{constructor(t,e,r,n="exactly"){super(`${t} tag must have ${n} ${e} children. It's actually ${r}`),this.name="InvalidNumberOfChildrenError"}}e.InvalidNumberOfChildrenError=r},8398:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(8208),e),o(r(7011),e),o(r(3487),e),o(r(5379),e)},7011:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JoinWithManySeparators=void 0;class r{constructor(t){this._separators=t}static join(t,e){return new r(e)._join(t)}_join(t){return t.reduce(((t,e,r,n)=>t+e+(r===n.length-1?"":this._get(r))),"")}_get(t){return this._separators[t]?this._separators[t]:this._separators.length>0?this._separators[this._separators.length-1]:","}}e.JoinWithManySeparators=r},3487:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mathMLElementToLaTeXConverter=void 0;const n=r(6483);e.mathMLElementToLaTeXConverter=t=>new n.MathMLElementToLatexConverterAdapter(t).toLatexConverter()},5379:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeWhiteSpaces=void 0,e.normalizeWhiteSpaces=t=>t.replace(/\s+/g," ")},7274:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BracketWrapper=void 0;const n=r(836);e.BracketWrapper=class{constructor(){this._open="{",this._close="}"}wrap(t){return new n.Wrapper(this._open,this._close).wrap(t)}}},5667:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericWrapper=void 0;const n=r(836);e.GenericWrapper=class{constructor(t,e){this._open="\\left"+t,this._close="\\right"+e}wrap(t){return new n.Wrapper(this._open,this._close).wrap(t)}}},8208:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericWrapper=e.ParenthesisWrapper=e.BracketWrapper=void 0;var n=r(7274);Object.defineProperty(e,"BracketWrapper",{enumerable:!0,get:function(){return n.BracketWrapper}});var o=r(3246);Object.defineProperty(e,"ParenthesisWrapper",{enumerable:!0,get:function(){return o.ParenthesisWrapper}});var i=r(5667);Object.defineProperty(e,"GenericWrapper",{enumerable:!0,get:function(){return i.GenericWrapper}})},3246:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ParenthesisWrapper=void 0;const n=r(836);e.ParenthesisWrapper=class{constructor(){this._open="\\left(",this._close="\\right)"}wrap(t){return new n.Wrapper(this._open,this._close).wrap(t)}wrapIfMoreThanOneChar(t){return t.length<=1?t:this.wrap(t)}}},836:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Wrapper=void 0,e.Wrapper=class{constructor(t,e){this._open=t,this._close=e}wrap(t){return this._open+t+this._close}}},7510:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericSpacingWrapper=void 0;const n=r(8398);e.GenericSpacingWrapper=class{constructor(t){this._mathmlElement=t}convert(){return this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" ")}}},3589:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericUnderOver=void 0;const n=r(3487),o=r(6036),i=r(6626);e.GenericUnderOver=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(2!==r)throw new o.InvalidNumberOfChildrenError(t,2,r);const i=(0,n.mathMLElementToLaTeXConverter)(e[0]).convert(),a=(0,n.mathMLElementToLaTeXConverter)(e[1]).convert();return this._applyCommand(i,a)}_applyCommand(t,e){const r=this._mathmlElement.name.match(/under/)?s.Under:s.Over;return new a(r).apply(t,e)}};class a{constructor(t){this._type=t}apply(t,e){return i.latexAccents.includes(e)?`${e}{${t}}`:`${this._defaultCommand}{${e}}{${t}}`}get _defaultCommand(){return this._type===s.Under?"\\underset":"\\overset"}}var s;!function(t){t[t.Under=0]="Under",t[t.Over=1]="Over"}(s||(s={}))},1733:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericUnderOver=e.GenericSpacingWrapper=e.MTr=e.MTable=e.MUnderover=e.MText=e.MMultiscripts=e.MSubsup=e.MSub=e.MSup=e.MPhantom=e.MError=e.MEnclose=e.MAction=e.MRoot=e.MFrac=e.MFenced=e.MSqrt=e.MN=e.MO=e.MI=e.Math=void 0;var n=r(2283);Object.defineProperty(e,"Math",{enumerable:!0,get:function(){return n.Math}});var o=r(7523);Object.defineProperty(e,"MI",{enumerable:!0,get:function(){return o.MI}});var i=r(5258);Object.defineProperty(e,"MO",{enumerable:!0,get:function(){return i.MO}});var a=r(411);Object.defineProperty(e,"MN",{enumerable:!0,get:function(){return a.MN}});var s=r(8301);Object.defineProperty(e,"MSqrt",{enumerable:!0,get:function(){return s.MSqrt}});var l=r(5237);Object.defineProperty(e,"MFenced",{enumerable:!0,get:function(){return l.MFenced}});var c=r(4060);Object.defineProperty(e,"MFrac",{enumerable:!0,get:function(){return c.MFrac}});var u=r(5851);Object.defineProperty(e,"MRoot",{enumerable:!0,get:function(){return u.MRoot}});var d=r(916);Object.defineProperty(e,"MAction",{enumerable:!0,get:function(){return d.MAction}});var p=r(7018);Object.defineProperty(e,"MEnclose",{enumerable:!0,get:function(){return p.MEnclose}});var m=r(6752);Object.defineProperty(e,"MError",{enumerable:!0,get:function(){return m.MError}});var h=r(9897);Object.defineProperty(e,"MPhantom",{enumerable:!0,get:function(){return h.MPhantom}});var f=r(5806);Object.defineProperty(e,"MSup",{enumerable:!0,get:function(){return f.MSup}});var _=r(9);Object.defineProperty(e,"MSub",{enumerable:!0,get:function(){return _.MSub}});var g=r(2740);Object.defineProperty(e,"MSubsup",{enumerable:!0,get:function(){return g.MSubsup}});var y=r(4596);Object.defineProperty(e,"MMultiscripts",{enumerable:!0,get:function(){return y.MMultiscripts}});var b=r(3808);Object.defineProperty(e,"MText",{enumerable:!0,get:function(){return b.MText}});var v=r(2710);Object.defineProperty(e,"MUnderover",{enumerable:!0,get:function(){return v.MUnderover}});var x=r(4134);Object.defineProperty(e,"MTable",{enumerable:!0,get:function(){return x.MTable}});var M=r(7188);Object.defineProperty(e,"MTr",{enumerable:!0,get:function(){return M.MTr}});var S=r(7510);Object.defineProperty(e,"GenericSpacingWrapper",{enumerable:!0,get:function(){return S.GenericSpacingWrapper}});var E=r(3589);Object.defineProperty(e,"GenericUnderOver",{enumerable:!0,get:function(){return E.GenericUnderOver}})},916:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MAction=void 0;const n=r(3487);e.MAction=class{constructor(t){this._mathmlElement=t}convert(){const{children:t}=this._mathmlElement;return this._isToggle()?t.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" \\Longrightarrow "):(0,n.mathMLElementToLaTeXConverter)(t[0]).convert()}_isToggle(){const{actiontype:t}=this._mathmlElement.attributes;return"toggle"===t||!t}}},2283:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Math=void 0;const n=r(3487),o=r(5379);e.Math=class{constructor(t){this._mathmlElement=t}convert(){const t=this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" ");return(0,o.normalizeWhiteSpaces)(t)}}},7018:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MEnclose=void 0;const n=r(3487);e.MEnclose=class{constructor(t){this._mathmlElement=t}convert(){const t=this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" ");return"actuarial"===this._notation?`\\overline{\\left.${t}\\right|}`:"radical"===this._notation?`\\sqrt{${t}}`:["box","roundedbox","circle"].includes(this._notation)?`\\boxed{${t}}`:"left"===this._notation?`\\left|${t}`:"right"===this._notation?`${t}\\right|`:"top"===this._notation?`\\overline{${t}}`:"bottom"===this._notation?`\\underline{${t}}`:"updiagonalstrike"===this._notation?`\\cancel{${t}}`:"downdiagonalstrike"===this._notation?`\\bcancel{${t}}`:"updiagonalarrow"===this._notation?`\\cancelto{}{${t}}`:["verticalstrike","horizontalstrike"].includes(this._notation)?`\\hcancel{${t}}`:"madruwb"===this._notation?`\\underline{${t}\\right|}`:"phasorangle"===this._notation?`{\\angle \\underline{${t}}}`:"longdiv"===this._notation?`\\longdiv{${t}}`:`\\overline{\\left.\\right)${t}}`}get _notation(){return this._mathmlElement.attributes.notation||"longdiv"}}},6752:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MError=void 0;const n=r(3487);e.MError=class{constructor(t){this._mathmlElement=t}convert(){return`\\color{red}{${this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" ")}}`}}},5237:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MFenced=void 0;const n=r(3487),o=r(8398);e.MFenced=class{constructor(t){this._mathmlElement=t,this._open=this._mathmlElement.attributes.open||"",this._close=this._mathmlElement.attributes.close||"",this._separators=Array.from(this._mathmlElement.attributes.separators||"")}convert(){const t=this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert()));return this._isThereRelativeOfName(this._mathmlElement.children,"mtable")?new a(this._open,this._close).apply(t):new i(this._open,this._close,this._separators).apply(t)}_isThereRelativeOfName(t,e){return t.some((t=>t.name===e||this._isThereRelativeOfName(t.children,e)))}};class i{constructor(t,e,r){this._open=t||"(",this._close=e||")",this._separators=r}apply(t){const e=o.JoinWithManySeparators.join(t,this._separators);return new o.GenericWrapper(this._open,this._close).wrap(e)}}class a{constructor(t,e){this._genericCommand="matrix",this._separators=new s(t,e)}apply(t){const e=this._command,r=`\\begin{${e}}\n${t.join("")}\n\\end{${e}}`;return e===this._genericCommand?this._separators.wrap(r):r}get _command(){return this._separators.areParentheses()?"pmatrix":this._separators.areSquareBrackets()?"bmatrix":this._separators.areBrackets()?"Bmatrix":this._separators.areDivides()?"vmatrix":this._separators.areParallels()?"Vmatrix":this._separators.areNotEqual()?this._genericCommand:"bmatrix"}}class s{constructor(t,e){this._open=t,this._close=e}wrap(t){return new o.GenericWrapper(this._open,this._close).wrap(t)}areParentheses(){return this._compare("(",")")}areSquareBrackets(){return this._compare("[","]")}areBrackets(){return this._compare("{","}")}areDivides(){return this._compare("|","|")}areParallels(){return this._compare("||","||")}areNotEqual(){return this._open!==this._close}_compare(t,e){return this._open===t&&this._close===e}}},4060:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MFrac=void 0;const n=r(6036),o=r(8398);e.MFrac=class{constructor(t){this._mathmlElement=t}convert(){const{children:t,name:e}=this._mathmlElement,r=t.length;if(2!==r)throw new n.InvalidNumberOfChildrenError(e,2,r);const i=(0,o.mathMLElementToLaTeXConverter)(t[0]).convert(),a=(0,o.mathMLElementToLaTeXConverter)(t[1]).convert();return this._isBevelled()?`${this._wrapIfMoreThanOneChar(i)}/${this._wrapIfMoreThanOneChar(a)}`:`\\frac{${i}}{${a}}`}_wrapIfMoreThanOneChar(t){return(new o.ParenthesisWrapper).wrapIfMoreThanOneChar(t)}_isBevelled(){return!!this._mathmlElement.attributes.bevelled}}},7523:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MI=void 0;const n=r(8398),o=r(2408),i=r(4317);e.MI=class{constructor(t){this.utf8Converter=new i.HashUTF8ToLtXConverter,this._mathmlElement=t}convert(){const t=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value);if(" "===t)return a.apply(t);const e=t.trim(),r=a.apply(e),o=this.utf8Converter.convert(r);return o!==r?o:this.wrapInMathVariant(r,this.getMathVariant(this._mathmlElement.attributes))}getMathVariant(t){if(t&&t.mathvariant)return t.mathvariant}wrapInMathVariant(t,e){switch(e){case"bold":return`\\mathbf{${t}}`;case"italic":return`\\mathit{${t}}`;case"bold-italic":return`\\mathbf{\\mathit{${t}}}`;case"double-struck":return`\\mathbb{${t}}`;case"bold-fraktur":return`\\mathbf{\\mathfrak{${t}}}`;case"script":return`\\mathcal{${t}}`;case"bold-script":return`\\mathbf{\\mathcal{${t}}}`;case"fraktur":return`\\mathfrak{${t}}`;case"sans-serif":return`\\mathsf{${t}}`;case"bold-sans-serif":return`\\mathbf{\\mathsf{${t}}}`;case"sans-serif-italic":return`\\mathsf{\\mathit{${t}}}`;case"sans-serif-bold-italic":return`\\mathbf{\\mathsf{\\mathit{${t}}}}`;case"monospace":return`\\mathtt{${t}}`;default:return t}}};class a{constructor(t){this._value=t}static apply(t){return new a(t)._apply()}_apply(){return this._findByCharacter()||this._findByGlyph()||this._findByNumber()||(new i.HashUTF8ToLtXConverter).convert(this._value)}_findByCharacter(){return o.allMathSymbolsByChar[this._value]}_findByGlyph(){return o.allMathSymbolsByGlyphSpecial[`"${this._value}"`]||o.allMathSymbolsByGlyph[this._value]}_findByNumber(){return o.mathNumberByGlyphSpecial[`"${this._value}"`]||o.mathNumberByGlyph[this._value]}}},4596:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MMultiscripts=void 0;const n=r(8398),o=r(6036);e.MMultiscripts=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(r<3)throw new o.InvalidNumberOfChildrenError(t,3,r,"at least");const i=(0,n.mathMLElementToLaTeXConverter)(e[0]).convert();return this._prescriptLatex()+this._wrapInParenthesisIfThereIsSpace(i)+this._postscriptLatex()}_prescriptLatex(){const{children:t}=this._mathmlElement;let e,r;if(this._isPrescripts(t[1]))e=t[2],r=t[3];else{if(!this._isPrescripts(t[3]))return"";e=t[4],r=t[5]}return`\\_{${(0,n.mathMLElementToLaTeXConverter)(e).convert()}}^{${(0,n.mathMLElementToLaTeXConverter)(r).convert()}}`}_postscriptLatex(){const{children:t}=this._mathmlElement;if(this._isPrescripts(t[1]))return"";const e=t[1],r=t[2];return`_{${(0,n.mathMLElementToLaTeXConverter)(e).convert()}}^{${(0,n.mathMLElementToLaTeXConverter)(r).convert()}}`}_wrapInParenthesisIfThereIsSpace(t){return t.match(/\s+/g)?(new n.ParenthesisWrapper).wrap(t):t}_isPrescripts(t){return"mprescripts"===(null==t?void 0:t.name)}}},411:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MN=void 0;const n=r(8398),o=r(2408);e.MN=class{constructor(t){this._mathmlElement=t}convert(){const t=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value).trim();return o.mathNumberByGlyphSpecial[`"${t}"`]||o.mathNumberByGlyph[t]||t}}},5258:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MO=void 0;const n=r(8398),o=r(2408);e.MO=class{constructor(t){this._mathmlElement=t}convert(){const t=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value).trim();return"OPEN"===this._mathmlElement.attributes["data-mjx-texclass"]&&"|"===t?"\\left|":"CLOSE"===this._mathmlElement.attributes["data-mjx-texclass"]&&"|"===t?"\\right|":i.operate(t)}};class i{constructor(t){this._value=t}static operate(t){return new i(t)._operate()}_operate(){return this._findByCharacter()||this._findByGlyph()||this._findByNumber()||(new o.HashUTF8ToLtXConverter).convert(this._value)}_findByCharacter(){return o.allMathOperatorsByChar[this._value]}_findByGlyph(){return o.allMathOperatorsByGlyphSpecial[`"${this._value}"`]||o.allMathOperatorsByGlyph[this._value]}_findByNumber(){return o.mathNumberByGlyphSpecial[`"${this._value}"`]||o.mathNumberByGlyph[this._value]}}},9897:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MPhantom=void 0,e.MPhantom=class{constructor(t){this._mathmlElement=t}convert(){return""}}},5851:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MRoot=void 0;const n=r(8398),o=r(6036);e.MRoot=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(2!==r)throw new o.InvalidNumberOfChildrenError(t,2,r);const i=(0,n.mathMLElementToLaTeXConverter)(e[0]).convert();return`\\sqrt[${(0,n.mathMLElementToLaTeXConverter)(e[1]).convert()}]{${i}}`}}},8301:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSqrt=void 0;const n=r(8398);e.MSqrt=class{constructor(t){this._mathmlElement=t}convert(){return`\\sqrt{${this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" ")}}`}}},9:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSub=void 0;const n=r(8398),o=r(6036);e.MSub=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(2!==r)throw new o.InvalidNumberOfChildrenError(t,2,r);const i=(0,n.mathMLElementToLaTeXConverter)(e[0]).convert(),a=(0,n.mathMLElementToLaTeXConverter)(e[1]).convert();return"log"===i?`\\${i}_${(new n.BracketWrapper).wrap(a)}`:`${i}_${(new n.BracketWrapper).wrap(a)}`}}},2740:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSubsup=void 0;const n=r(8398),o=r(6036);e.MSubsup=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(3!==r)throw new o.InvalidNumberOfChildrenError(t,3,r);const i=(0,n.mathMLElementToLaTeXConverter)(e[0]).convert(),a=(0,n.mathMLElementToLaTeXConverter)(e[1]).convert(),s=(0,n.mathMLElementToLaTeXConverter)(e[2]).convert(),l=(new n.BracketWrapper).wrap(a),c=(new n.BracketWrapper).wrap(s);return`${this._wrapInParenthesisIfThereIsSpace(i)}_${l}^${c}`}_wrapInParenthesisIfThereIsSpace(t){return t.match(/\s+/g)?(new n.ParenthesisWrapper).wrap(t):t}}},5806:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSup=void 0;const n=r(8398),o=r(6036);e.MSup=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(2!==r)throw new o.InvalidNumberOfChildrenError(t,2,r);const i=(0,n.mathMLElementToLaTeXConverter)(e[0]).convert(),a=(0,n.mathMLElementToLaTeXConverter)(e[1]).convert();return["'","″"].indexOf(a)?`${i}${a}`:`${i}^${(new n.BracketWrapper).wrap(a)}`}}},4134:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MTable=void 0;const n=r(8398);e.MTable=class{constructor(t){this._mathmlElement=t,this._addFlagRecursiveIfName(this._mathmlElement.children,"mtable","innerTable")}convert(){const t=this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" \\\\\n");return this._hasFlag("innerTable")?this._wrap(t):t}_wrap(t){return`\\begin{matrix}${t}\\end{matrix}`}_addFlagRecursiveIfName(t,e,r){t.forEach((t=>{t.name===e&&(t.attributes[r]=r),this._addFlagRecursiveIfName(t.children,e,r)}))}_hasFlag(t){return!!this._mathmlElement.attributes[t]}}},3808:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MText=void 0;const n=r(7523);e.MText=class{constructor(t){this._mathmlElement=t}convert(){const{attributes:t,value:e}=this._mathmlElement;return[...e].map((t=>/^[a-zA-Z0-9]$/.test(t)||" "==t?{value:t,isAlphanumeric:!0}:{value:t,isAlphanumeric:!1})).reduce(((t,e)=>{if(e.isAlphanumeric){const r=t[t.length-1];if(r&&r.isAlphanumeric)return r.value+=e.value,t}return[...t,e]}),[]).map((e=>e.isAlphanumeric?new o(t.mathvariant).apply(e.value):new n.MI({name:"mi",attributes:{},children:[],value:e.value}).convert())).join("")}};class o{constructor(t){this._mathvariant=t||"normal"}apply(t){return this._commands.reduce(((e,r,n)=>0===n?`${r}{${t}}`:`${r}{${e}}`),"")}get _commands(){switch(this._mathvariant){case"bold":return["\\textbf"];case"log":return["\\log"];case"italic":return["\\textit"];case"bold-italic":return["\\textit","\\textbf"];case"double-struck":return["\\mathbb"];case"monospace":return["\\mathtt"];case"bold-fraktur":case"fraktur":return["\\mathfrak"];default:return["\\text"]}}}},7188:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MTr=void 0;const n=r(8398);e.MTr=class{constructor(t){this._mathmlElement=t}convert(){return this._mathmlElement.children.map((t=>(0,n.mathMLElementToLaTeXConverter)(t))).map((t=>t.convert())).join(" & ")}}},2710:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MUnderover=void 0;const n=r(8398),o=r(6036);e.MUnderover=class{constructor(t){this._mathmlElement=t}convert(){const{name:t,children:e}=this._mathmlElement,r=e.length;if(3!==r)throw new o.InvalidNumberOfChildrenError(t,3,r);return`${(0,n.mathMLElementToLaTeXConverter)(e[0]).convert()}_{${(0,n.mathMLElementToLaTeXConverter)(e[1]).convert()}}^{${(0,n.mathMLElementToLaTeXConverter)(e[2]).convert()}}`}}},6483:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.MathMLElementToLatexConverterAdapter=void 0;const a=i(r(1733));e.MathMLElementToLatexConverterAdapter=class{constructor(t){this._mathMLElement=t}toLatexConverter(){const{name:t}=this._mathMLElement;return new(s[t]||a.GenericSpacingWrapper)(this._mathMLElement)}};const s={math:a.Math,mi:a.MI,mo:a.MO,mn:a.MN,msqrt:a.MSqrt,mfenced:a.MFenced,mfrac:a.MFrac,mroot:a.MRoot,maction:a.MAction,menclose:a.MEnclose,merror:a.MError,mphantom:a.MPhantom,msup:a.MSup,msub:a.MSub,msubsup:a.MSubsup,mmultiscripts:a.MMultiscripts,mtext:a.MText,munderover:a.MUnderover,mtable:a.MTable,mtr:a.MTr,mover:a.GenericUnderOver,munder:a.GenericUnderOver,mrow:a.GenericSpacingWrapper,mpadded:a.GenericSpacingWrapper}},965:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandler=void 0,e.ErrorHandler=class{constructor(){this._errors=[],this.errorLocator={}}fixError(t,e){return this._isMissingAttributeValueError(e)?(this._errors.push(e),this._fixMissingAttribute(e,t)):t}isThereAnyErrors(){return this._errors.length>0}cleanErrors(){this._errors=[]}_fixMissingAttribute(t,e){const r=t.split('"')[1];if(r)return e.replace(this._matchMissingValueForAttribute(r),"");for(;this._mathGenericMissingValue().exec(e);)e=e.replace(this._mathGenericMissingValue(),"$1$3");return e}_matchMissingValueForAttribute(t){return new RegExp(`(${t}=(?!("|')))|(${t}(?!("|')))`,"gm")}_mathGenericMissingValue(){return/(\<.* )(\w+=(?!\"|\'))(.*\>)/gm}_isMissingAttributeValueError(t){return!!t.includes("attribute")&&!!t.includes("missed")||t.includes("attribute value missed")}}},6177:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(5242),e),o(r(965),e),o(r(1877),e)},1877:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ElementsToMathMLAdapter=void 0,e.ElementsToMathMLAdapter=class{convert(t){return t.filter((t=>void 0!==t.tagName)).map((t=>this._convertElement(t)))}_convertElement(t){return{name:t.tagName,attributes:this._convertElementAttributes(t.attributes),value:this._hasElementChild(t)?"":t.textContent||"",children:this._hasElementChild(t)?this.convert(Array.from(t.childNodes)):[]}}_convertElementAttributes(t){return Array.from(t).reduce(((t,e)=>Object.assign({[e.nodeName]:e.nodeValue===e.nodeName?"":e.nodeValue},t)),{})}_hasElementChild(t){const e=t.childNodes;return!!e&&0!==e.length&&this._isThereAnyNoTextNode(e)}_isThereAnyNoTextNode(t){return Array.from(t).some((t=>"#text"!==t.nodeName))}}},5242:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.XmlToMathMLAdapter=void 0;const o=n(r(3969));e.XmlToMathMLAdapter=class{constructor(t,e){this._xml="",this._elementsConvertor=t,this._errorHandler=e,this._xmlDOM=new o.default.DOMParser({locator:this._errorHandler.errorLocator,errorHandler:this._fixError.bind(this)})}convert(t){return this._xml=this._removeLineBreaks(t),this._elementsConvertor.convert(this._mathMLElements)}_fixError(t){this._xml=this._errorHandler.fixError(this._xml,t)}_removeLineBreaks(t){return t.replace(/\n|\r\n|\r/g,"")}get _mathMLElements(){let t=this._xmlDOM.parseFromString(this._xml).getElementsByTagName("math");return this._errorHandler.isThereAnyErrors()&&(this._errorHandler.cleanErrors(),t=this._xmlDOM.parseFromString(this._xml).getElementsByTagName("math")),Array.from(t)}}},4150:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(488),e)},488:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.makeToMathElementsConverter=void 0;const n=r(6177);e.makeToMathElementsConverter=()=>{const t=new n.ElementsToMathMLAdapter,e=new n.ErrorHandler;return new n.XmlToMathMLAdapter(t,e)}},8863:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(862),e)},862:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MathMLToLaTeX=void 0;const n=r(6483),o=r(4150);e.MathMLToLaTeX=class{static convert(t){return(0,o.makeToMathElementsConverter)().convert(t).map((t=>new n.MathMLElementToLatexConverterAdapter(t).toLatexConverter())).map((t=>t.convert())).join("").trim()}}},1868:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.allMathOperatorsByChar=void 0,e.allMathOperatorsByChar={_:"\\underline","&#x23E1;":"\\underbrace","&#x23E0;":"\\overbrace","&#x23DF;":"\\underbrace","&#x23DE;":"\\overbrace","&#x23DD;":"\\underbrace","&#x23DC;":"\\overarc","&#x23B5;":"\\underbrace","&#x23B4;":"\\overbrace","&#x20DC;":"\\square","&#x20DB;":"\\square","&#x2064;":"","&#x2057;":"''''","&#x203E;":"\\overline","&#x2015;":"\\overline","&#xAF;":"\\overline","&#x2037;":"```","&#x2036;":"``","&#x2035;":"`","&#x2034;":"'''","&#x2033;":"''","&#x201F;":"``","&#x201E;":",,","&#x201B;":"`","&#x201A;":",","&#x302;":"\\hat","&#x2F7;":"\\sim","&#x2DD;":"\\sim","&#x2DC;":"\\sim","&#x2DA;":"\\degree","&#x2D9;":"\\cdot","&#x2D8;":"","&#x2CD;":"\\_","&#x2CB;":"ˋ","&#x2CA;":"ˊ","&#x2C9;":"ˉ","&#x2C7;":"","&#x2C6;":"\\hat","&#xBA;":"o","&#xB9;":"1","&#xB8;":"¸","&#xB4;":"´","&#xB3;":"3","&#xB2;":"2","&#xB0;":"\\degree","&#xAA;":"a","&#xA8;":"\\cdot\\cdot","~":"\\sim","`":"`","^":"\\hat","--":"--","++":"++","&amp;":"\\&","&#x2061;":"","&#x221C;":"\\sqrt[4]{}","&#x221B;":"\\sqrt[3]{}","&#x221A;":"\\sqrt{}","&#x2146;":"d","&#x2145;":"\\mathbb{D}","?":"?","@":"@","//":"//","!!":"!!","!":"!","&#x266F;":"\\#","&#x266E;":"","&#x266D;":"","&#x2032;":"'","&lt;>":"<>","**":"\\star\\star","&#x2207;":"\\nabla","&#x2202;":"\\partial","&#x2299;":"\\bigodot","&#xAC;":"\\neg","&#x2222;":"\\measuredangle","&#x2221;":"\\measuredangle","&#x2220;":"\\angle","&#xF7;":"\\div","/":"/","&#x2216;":"\\backslash","\\":"\\backslash","%":"\\%","&#x2297;":"\\bigotimes","&#xB7;":"\\cdot","&#x2A3F;":"\\coprod","&#x2A2F;":"\\times","&#x22C5;":"\\cdot","&#x22A1;":"\\boxdot","&#x22A0;":"\\boxtimes","&#x2062;":"","&#x2043;":"-","&#x2022;":"\\cdot","&#xD7;":"\\times",".":".","*":"\\star","&#x222A;":"\\cup","&#x2229;":"\\cap","&#x2210;":"\\coprod","&#x220F;":"\\prod","&#x2240;":"","&#x2AFF;":"","&#x2AFC;":"\\mid\\mid\\mid","&#x2A09;":"\\times","&#x2A08;":"","&#x2A07;":"","&#x2A06;":"\\sqcup","&#x2A05;":"\\sqcap","&#x2A02;":"\\otimes","&#x2A00;":"\\odot","&#x22C2;":"\\cap","&#x22C1;":"\\vee","&#x22C0;":"\\wedge","&#x2A04;":"\\uplus","&#x2A03;":"\\cup","&#x22C3;":"\\cup","&#x2A1C;":"\\underline{\\int}","&#x2A1B;":"\\overline{\\int}","&#x2A1A;":"\\int","&#x2A19;":"\\int","&#x2A18;":"\\int","&#x2A17;":"\\int","&#x2A16;":"\\oint","&#x2A15;":"\\oint","&#x2A14;":"\\int","&#x2A13;":"\\int","&#x2A12;":"\\int","&#x2A11;":"\\int","&#x2A10;":"\\int","&#x2A0F;":"\\bcancel{\\int}","&#x2A0E;":"","&#x2A0D;":"\\hcancel{\\int}","&#x2A0C;":"\\iiiint","&#x2233;":"\\oint","&#x2232;":"\\oint","&#x2231;":"\\int","&#x2230;":"\\oiint","&#x222F;":"\\oiint","&#x222E;":"\\oint","&#x222B;":"\\int","&#x2A01;":"\\oplus","&#x2298;":"\\oslash","&#x2296;":"\\ominus","&#x2295;":"\\oplus","&#x222D;":"\\iiint","&#x222C;":"\\iint","&#x2A0B;":"","&#x2A0A;":"","&#x2211;":"\\sum","&#x229F;":"\\boxminus","&#x229E;":"\\boxplus","&#x2214;":"\\dot{+}","&#x2213;":"+-","&#x2212;":"-","&#xB1;":"\\pm","-":"-","+":"+","&#x2B46;":"\\Rrightarrow","&#x2B45;":"\\Lleftarrow","&#x29F4;":":\\rightarrow","&#x29EF;":"","&#x29DF;":"\\bullet-\\bullet","&#x299F;":"\\angle","&#x299E;":"\\measuredangle","&#x299D;":"\\measuredangle","&#x299C;":"\\perp","&#x299B;":"\\measuredangle","&#x299A;":"","&#x2999;":"\\vdots","&#x297F;":"","&#x297E;":"","&#x297D;":"\\prec","&#x297C;":"\\succ","&#x297B;":"\\underset{\\rightarrow}{\\supset}","&#x297A;":"","&#x2979;":"\\underset{\\rightarrow}{\\subset}","&#x2978;":"\\underset{\\rightarrow}{>}","&#x2977;":"","&#x2976;":"\\underset{\\leftarrow}{<}","&#x2975;":"\\underset{\\approx}{\\rightarrow}","&#x2974;":"\\underset{\\sim}{\\rightarrow}","&#x2973;":"\\underset{\\sim}{\\leftarrow}","&#x2972;":"\\overset{\\sim}{\\rightarrow}","&#x2971;":"\\overset{=}{\\rightarrow}","&#x2970;":"","&#x296F;":"","&#x296E;":"","&#x296D;":"\\overline{\\rightharpoondown}","&#x296C;":"\\underline{\\rightharpoonup}","&#x296B;":"\\overline{\\leftharpoondown}","&#x296A;":"\\underline{\\leftharpoonup}","&#x2969;":"\\rightleftharpoons","&#x2968;":"\\rightleftharpoons","&#x2967;":"\\rightleftharpoons","&#x2966;":"\\rightleftharpoons","&#x2965;":"\\Downarrow","&#x2964;":"\\Rightarrow","&#x2963;":"\\Uparrow","&#x2962;":"\\Leftarrow","&#x2961;":"\\downarrow","&#x2960;":"\\uparrow","&#x295F;":"\\rightarrow","&#x295E;":"\\leftarrow","&#x295D;":"\\downarrow","&#x295C;":"\\uparrow","&#x295B;":"\\rightarrow","&#x295A;":"\\leftarrow","&#x2959;":"\\downarrow","&#x2958;":"\\uparrow","&#x2957;":"\\rightarrow","&#x2956;":"\\leftarrow","&#x2955;":"\\downarrow","&#x2954;":"\\uparrow","&#x2953;":"\\rightarrow","&#x2952;":"\\leftarrow","&#x2951;":"\\updownarrow","&#x2950;":"\\leftrightarrow","&#x294F;":"\\updownarrow","&#x294E;":"\\leftrightarrow","&#x294D;":"\\updownarrow","&#x294C;":"\\updownarrow","&#x294B;":"\\leftrightarrow","&#x294A;":"\\leftrightarrow","&#x2949;":"","&#x2948;":"\\leftrightarrow","&#x2947;":"\\nrightarrow","&#x2946;":"","&#x2945;":"","&#x2944;":"\\rightleftarrows","&#x2943;":"\\leftrightarrows","&#x2942;":"\\rightleftarrows","&#x2941;":"\\circlearrowright","&#x2940;":"\\circlearrowleft","&#x293F;":"\\rightarrow","&#x293E;":"\\leftarrow","&#x293D;":"","&#x293C;":"","&#x293B;":"","&#x293A;":"","&#x2939;":"","&#x2938;":"","&#x2937;":"\\Rsh","&#x2936;":"\\Lsh","&#x2935;":"\\downarrow","&#x2934;":"\\uparrow","&#x2933;":"\\leadsto","&#x2932;":"","&#x2931;":"","&#x2930;":"","&#x292F;":"","&#x292E;":"","&#x292D;":"","&#x292C;":"\\times","&#x292B;":"\\times","&#x292A;":"","&#x2929;":"","&#x2928;":"","&#x2927;":"","&#x2926;":"","&#x2925;":"","&#x2924;":"","&#x2923;":"","&#x2922;":"","&#x2921;":"","&#x2920;":"\\mapsto\\cdot","&#x291F;":"\\cdot\\leftarrow","&#x291E;":"\\rightarrow\\cdot","&#x291D;":"\\leftarrow","&#x291C;":"\\rightarrow","&#x291B;":"\\leftarrow","&#x291A;":"\\rightarrow","&#x2919;":"\\leftarrow","&#x2918;":"\\rightarrow","&#x2917;":"\\rightarrow","&#x2916;":"\\rightarrow","&#x2915;":"\\rightarrow","&#x2914;":"\\rightarrow","&#x2913;":"\\downarrow","&#x2912;":"\\uparrow","&#x2911;":"\\rightarrow","&#x2910;":"\\rightarrow","&#x290F;":"\\rightarrow","&#x290E;":"\\leftarrow","&#x290D;":"\\rightarrow","&#x290C;":"\\leftarrow","&#x290B;":"\\Downarrow","&#x290A;":"\\Uparrow","&#x2909;":"\\uparrow","&#x2908;":"\\downarrow","&#x2907;":"\\Rightarrow","&#x2906;":"\\Leftarrow","&#x2905;":"\\mapsto","&#x2904;":"\\nLeftrightarrow","&#x2903;":"\\nRightarrow","&#x2902;":"\\nLeftarrow","&#x2901;":"\\rightsquigarrow","&#x2900;":"\\rightsquigarrow","&#x27FF;":"\\rightsquigarrow","&#x27FE;":"\\Rightarrow","&#x27FD;":"\\Leftarrow","&#x27FC;":"\\mapsto","&#x27FB;":"\\leftarrow","&#x27FA;":"\\Longleftrightarrow","&#x27F9;":"\\Longrightarrow","&#x27F8;":"\\Longleftarrow","&#x27F7;":"\\leftrightarrow","&#x27F6;":"\\rightarrow","&#x27F5;":"\\leftarrow","&#x27F1;":"\\Downarrow","&#x27F0;":"\\Uparrow","&#x22B8;":"\\rightarrow","&#x21FF;":"\\leftrightarrow","&#x21FE;":"\\rightarrow","&#x21FD;":"\\leftarrow","&#x21FC;":"\\nleftrightarrow","&#x21FB;":"\\nrightarrow","&#x21FA;":"\\nleftarrow","&#x21F9;":"\\nleftrightarrow","&#x21F8;":"\\nrightarrow","&#x21F7;":"\\nleftarrow","&#x21F6;":"\\Rrightarrow","&#x21F5;":"","&#x21F4;":"\\rightarrow","&#x21F3;":"\\Updownarrow","&#x21F2;":"\\searrow","&#x21F1;":"\\nwarrow","&#x21F0;":"\\Leftarrow","&#x21EF;":"\\Uparrow","&#x21EE;":"\\Uparrow","&#x21ED;":"\\Uparrow","&#x21EC;":"\\Uparrow","&#x21EB;":"\\Uparrow","&#x21EA;":"\\Uparrow","&#x21E9;":"\\Downarrow","&#x21E8;":"\\Rightarrow","&#x21E7;":"\\Uparrow","&#x21E6;":"\\Leftarrow","&#x21E5;":"\\rightarrow","&#x21E4;":"\\leftarrow","&#x21E3;":"\\downarrow","&#x21E2;":"\\rightarrow","&#x21E1;":"\\uparrow","&#x21E0;":"\\leftarrow","&#x21DF;":"\\downarrow","&#x21DE;":"\\uparrow","&#x21DD;":"\\rightsquigarrow","&#x21DC;":"\\leftarrow","&#x21DB;":"\\Rrightarrow","&#x21DA;":"\\Lleftarrow","&#x21D9;":"\\swarrow","&#x21D8;":"\\searrow","&#x21D7;":"\\nearrow","&#x21D6;":"\\nwarrow","&#x21D5;":"\\Updownarrow","&#x21D4;":"\\Leftrightarrow","&#x21D3;":"\\Downarrow","&#x21D2;":"\\Rightarrow","&#x21D1;":"\\Uparrow","&#x21D0;":"\\Leftarrow","&#x21CF;":"\\nRightarrow","&#x21CE;":"\\nLeftrightarrow","&#x21CD;":"\\nLeftarrow","&#x21CC;":"\\rightleftharpoons","&#x21CB;":"\\leftrightharpoons","&#x21CA;":"\\downdownarrows","&#x21C9;":"\\rightrightarrows","&#x21C8;":"\\upuparrows","&#x21C7;":"\\leftleftarrows","&#x21C6;":"\\leftrightarrows","&#x21C5;":"","&#x21C4;":"\\rightleftarrows","&#x21C3;":"\\downharpoonleft","&#x21C2;":"\\downharpoonright","&#x21C1;":"\\rightharpoondown","&#x21C0;":"\\rightharpoonup","&#x21BF;":"\\upharpoonleft","&#x21BE;":"\\upharpoonright","&#x21BD;":"\\leftharpoondown","&#x21BC;":"\\leftharpoonup","&#x21BB;":"\\circlearrowright","&#x21BA;":"\\circlearrowleft","&#x21B9;":"\\leftrightarrows","&#x21B8;":"\\overline{\\nwarrow}","&#x21B7;":"\\curvearrowright","&#x21B6;":"\\curvearrowleft","&#x21B5;":"\\swarrow","&#x21B4;":"\\searrow","&#x21B3;":"\\Rsh","&#x21B2;":"\\Lsh","&#x21B1;":"\\Rsh","&#x21B0;":"\\Lsh","&#x21AF;":"\\swarrow","&#x21AE;":"","&#x21AD;":"\\leftrightsquigarrow","&#x21AC;":"\\looparrowright","&#x21AB;":"\\looparrowleft","&#x21AA;":"\\hookrightarrow","&#x21A9;":"\\hookleftarrow","&#x21A8;":"\\underline{\\updownarrow}","&#x21A7;":"\\downarrow","&#x21A6;":"\\rightarrowtail","&#x21A5;":"\\uparrow","&#x21A4;":"\\leftarrowtail","&#x21A3;":"\\rightarrowtail","&#x21A2;":"\\leftarrowtail","&#x21A1;":"\\downarrow","&#x21A0;":"\\twoheadrightarrow","&#x219F;":"\\uparrow","&#x219E;":"\\twoheadleftarrow","&#x219D;":"\\nearrow","&#x219C;":"\\nwarrow","&#x219B;":"","&#x219A;":"","&#x2199;":"\\swarrow","&#x2198;":"\\searrow","&#x2197;":"\\nearrow","&#x2196;":"\\nwarrow","&#x2195;":"\\updownarrow","&#x2194;":"\\leftrightarrow","&#x2193;":"\\downarrow","&#x2192;":"\\rightarrow","&#x2191;":"\\uparrow","&#x2190;":"\\leftarrow","|||":"\\left|||\\right.","||":"\\left||\\right.","|":"\\left|\\right.","&#x2AFE;":"","&#x2AFD;":"//","&#x2AFB;":"///","&#x2AFA;":"","&#x2AF9;":"","&#x2AF8;":"","&#x2AF7;":"","&#x2AF6;":"\\vdots","&#x2AF5;":"","&#x2AF4;":"","&#x2AF3;":"","&#x2AF2;":"\\nparallel","&#x2AF1;":"","&#x2AF0;":"","&#x2AEF;":"","&#x2AEE;":"\\bcancel{\\mid}","&#x2AED;":"","&#x2AEC;":"","&#x2AEB;":"","&#x2AEA;":"","&#x2AE9;":"","&#x2AE8;":"\\underline{\\perp}","&#x2AE7;":"\\overline{\\top}","&#x2AE6;":"","&#x2AE5;":"","&#x2AE4;":"","&#x2AE3;":"","&#x2AE2;":"","&#x2AE1;":"","&#x2AE0;":"\\perp","&#x2ADF;":"\\top","&#x2ADE;":"\\dashv","&#x2ADD;&#x338;":"","&#x2ADD;":"","&#x2ADB;":"\\pitchfork","&#x2ADA;":"","&#x2AD9;":"","&#x2AD8;":"","&#x2AD7;":"","&#x2AD6;":"","&#x2AD5;":"","&#x2AD4;":"","&#x2AD3;":"","&#x2AD2;":"","&#x2AD1;":"","&#x2AD0;":"","&#x2ACF;":"","&#x2ACE;":"","&#x2ACD;":"","&#x2ACC;":"\\underset{\\neq}{\\supset}","&#x2ACB;":"\\underset{\\neq}{\\subset}","&#x2ACA;":"\\underset{\\approx}{\\supset}","&#x2AC9;":"\\underset{\\approx}{\\subset}","&#x2AC8;":"\\underset{\\sim}{\\supset}","&#x2AC7;":"\\underset{\\sim}{\\subset}","&#x2AC6;":"\\supseteqq","&#x2AC5;":"\\subseteqq","&#x2AC4;":"\\dot{\\supseteq}","&#x2AC3;":"\\dot{\\subseteq}","&#x2AC2;":"\\underset{\\times}{\\supset}","&#x2AC1;":"\\underset{\\times}{\\subset}","&#x2AC0;":"\\underset{+}{\\supset}","&#x2ABF;":"\\underset{+}{\\subset}","&#x2ABE;":"","&#x2ABD;":"","&#x2ABC;":"\\gg ","&#x2ABB;":"\\ll","&#x2ABA;":"\\underset{\\cancel{\\approx}}{\\succ}","&#x2AB9;":"\\underset{\\cancel{\\approx}}{\\prec}","&#x2AB8;":"\\underset{\\approx}{\\succ}","&#x2AB7;":"\\underset{\\approx}{\\prec}","&#x2AB6;":"\\underset{\\cancel{=}}{\\succ}","&#x2AB5;":"\\underset{\\cancel{=}}{\\prec}","&#x2AB4;":"\\underset{=}{\\succ}","&#x2AB3;":"\\underset{=}{\\prec}","&#x2AB2;":"","&#x2AB1;":"","&#x2AAE;":"","&#x2AAD;":"\\underline{\\hcancel{>}}","&#x2AAC;":"\\underline{\\hcancel{>}}","&#x2AAB;":"\\hcancel{>}","&#x2AAA;":"\\hcancel{<}","&#x2AA9;":"","&#x2AA8;":"","&#x2AA7;":"\\vartriangleright","&#x2AA6;":"\\vartriangleleft","&#x2AA5;":"><","&#x2AA4;":"><","&#x2AA3;":"\\underline{\\ll}","&#x2AA2;&#x338;":"\\cancel{\\gg}","&#x2AA2;":"\\gg","&#x2AA1;&#x338;":"\\cancel{\\ll}","&#x2AA1;":"\\ll","&#x2AA0;":"\\overset{\\sim}{\\geqq}","&#x2A9F;":"\\overset{\\sim}{\\leqq}","&#x2A9E;":"\\overset{\\sim}{>}","&#x2A9D;":"\\overset{\\sim}{<}","&#x2A9C;":"","&#x2A9B;":"","&#x2A9A;":"\\overset{=}{>}","&#x2A99;":"\\overset{=}{<}","&#x2A98;":"","&#x2A97;":"","&#x2A96;":"","&#x2A95;":"","&#x2A94;":"","&#x2A93;":"","&#x2A92;":"\\underset{=}{\\gtrless}","&#x2A91;":"\\underset{=}{\\lessgtr}","&#x2A90;":"\\underset{<}{\\gtrsim}","&#x2A8F;":"\\underset{>}{\\lesssim}","&#x2A8E;":"\\underset{\\simeq}{>}","&#x2A8D;":"\\underset{\\simeq}{<}","&#x2A8C;":"\\gtreqqless","&#x2A8B;":"\\lesseqqgtr","&#x2A8A;":"\\underset{\\cancel{\\approx}}{>}","&#x2A89;":"\\underset{\\approx}{<}","&#x2A86;":"\\underset{\\approx}{>}","&#x2A85;":"\\underset{\\approx}{<}","&#x2A84;":"","&#x2A83;":"","&#x2A82;":"","&#x2A81;":"","&#x2A80;":"","&#x2A7F;":"","&#x2A7E;&#x338;":"\\bcancel{\\geq}","&#x2A7E;":"\\geq","&#x2A7D;&#x338;":"\\bcancel{\\leq}","&#x2A7D;":"\\leq","&#x2A7C;":"","&#x2A7B;":"","&#x2A7A;":"","&#x2A79;":"","&#x2A78;":"\\overset{\\dots}{\\equiv}","&#x2A77;":"","&#x2A76;":"===","&#x2A75;":"==","&#x2A74;":"::=","&#x2A73;":"","&#x2A72;":"\\underset{=}{+}","&#x2A71;":"\\overset{=}{+}","&#x2A70;":"\\overset{\\approx}{=}","&#x2A6F;":"\\overset{\\wedge}{=}","&#x2A6E;":"\\overset{*}{=}","&#x2A6D;":"\\dot{\\approx}","&#x2A6C;":"","&#x2A6B;":"","&#x2A6A;":"\\dot{\\sim}","&#x2A69;":"","&#x2A68;":"","&#x2A67;":"\\dot{\\equiv}","&#x2A66;":"\\underset{\\cdot}{=}","&#x2A65;":"","&#x2A64;":"","&#x2A63;":"\\underset{=}{\\vee}","&#x2A62;":"\\overset{=}{\\vee}","&#x2A61;":"ul(vv)","&#x2A60;":"\\underset{=}{\\wedge}","&#x2A5F;":"\\underline{\\wedge}","&#x2A5E;":"\\overset{=}{\\wedge}","&#x2A5D;":"\\hcancel{\\vee}","&#x2A5C;":"\\hcancel{\\wedge}","&#x2A5B;":"","&#x2A5A;":"","&#x2A59;":"","&#x2A58;":"\\vee","&#x2A57;":"\\wedge","&#x2A56;":"","&#x2A55;":"","&#x2A54;":"","&#x2A53;":"","&#x2A52;":"\\dot{\\vee}","&#x2A51;":"\\dot{\\wedge}","&#x2A50;":"","&#x2A4F;":"","&#x2A4E;":"","&#x2A4D;":"\\overline{\\cap}","&#x2A4C;":"\\overline{\\cup}","&#x2A4B;":"","&#x2A4A;":"","&#x2A49;":"","&#x2A48;":"","&#x2A47;":"","&#x2A46;":"","&#x2A45;":"","&#x2A44;":"","&#x2A43;":"\\overline{\\cap}","&#x2A42;":"\\overline{\\cup}","&#x2A41;":"","&#x2A40;":"","&#x2A3E;":"","&#x2A3D;":"\\llcorner","&#x2A3C;":"\\lrcorner","&#x2A3B;":"","&#x2A3A;":"","&#x2A39;":"","&#x2A38;":"","&#x2A37;":"","&#x2A36;":"\\hat{\\otimes}","&#x2A35;":"","&#x2A34;":"","&#x2A33;":"","&#x2A32;":"\\underline{\\times}","&#x2A31;":"\\underline{\\times}","&#x2A30;":"\\dot{\\times}","&#x2A2E;":"","&#x2A2D;":"","&#x2A2C;":"","&#x2A2B;":"","&#x2A2A;":"","&#x2A29;":"","&#x2A28;":"","&#x2A27;":"","&#x2A26;":"\\underset{\\sim}{+}","&#x2A25;":"\\underset{\\circ}{+}","&#x2A24;":"\\overset{\\sim}{+}","&#x2A23;":"\\hat{+}","&#x2A22;":"\\dot{+}","&#x2A21;":"\\upharpoonright","&#x2A20;":">>","&#x2A1F;":"","&#x2A1E;":"\\triangleleft","&#x2A1D;":"\\bowtie","&#x29FF;":"","&#x29FE;":"+","&#x29FB;":"\\hcancel{|||}","&#x29FA;":"\\hcancel{||}","&#x29F9;":"\\backslash","&#x29F8;":"/","&#x29F7;":"hcancel{\backslash}","&#x29F6;":"","&#x29F5;":"\\backslash","&#x29F2;":"\\Phi","&#x29F1;":"","&#x29F0;":"","&#x29EE;":"","&#x29ED;":"","&#x29EC;":"","&#x29EB;":"\\lozenge","&#x29EA;":"","&#x29E9;":"","&#x29E8;":"","&#x29E7;":"\\ddagger","&#x29E2;":"\\sqcup\\sqcup","&#x29E1;":"","&#x29E0;":"\\square","&#x29DE;":"","&#x29DD;":"","&#x29DC;":"","&#x29DB;":"\\{\\{","&#x29D9;":"\\{","&#x29D8;":"\\}","&#x29D7;":"","&#x29D6;":"","&#x29D5;":"\\bowtie","&#x29D4;":"\\bowtie","&#x29D3;":"\\bowtie","&#x29D2;":"\\bowtie","&#x29D1;":"\\bowtie","&#x29D0;&#x338;":"| \\not\\triangleright","&#x29D0;":"| \\triangleright","&#x29CF;&#x338;":"\\not\\triangleleft |","&#x29CF;":"\\triangleleft |","&#x29CE;":"","&#x29CD;":"\\triangle","&#x29CC;":"","&#x29CB;":"\\underline{\\triangle}","&#x29CA;":"\\dot{\\triangle}","&#x29C9;":"","&#x29C8;":"\\boxed{\\circ}","&#x29C7;":"\\boxed{\\circ}","&#x29C6;":"\\boxed{\\rightarrow}","&#x29C5;":"\\bcancel{\\square}","&#x29C4;":"\\cancel{\\square}","&#x29C3;":"\\odot","&#x29C2;":"\\odot","&#x29BF;":"\\odot","&#x29BE;":"\\odot","&#x29BD;":"\\varnothing","&#x29BC;":"\\oplus","&#x29BB;":"\\otimes","&#x29BA;":"","&#x29B9;":"\\varnothing","&#x29B8;":"\\varnothing","&#x29B7;":"\\ominus","&#x29B6;":"\\ominus","&#x29B5;":"\\ominus","&#x29B4;":"\\vec{\\varnothing}","&#x29B3;":"\\vec{\\varnothing}","&#x29B2;":"\\dot{\\varnothing}","&#x29B1;":"\\overline{\\varnothing}","&#x29B0;":"\\varnothing","&#x29AF;":"","&#x29AE;":"","&#x29AD;":"","&#x29AC;":"","&#x29AB;":"","&#x29AA;":"","&#x29A9;":"","&#x29A8;":"","&#x29A7;":"","&#x29A6;":"","&#x29A5;":"","&#x29A4;":"","&#x29A3;":"","&#x29A2;":"","&#x29A1;":"\\not\\lor","&#x29A0;":"\\bcancel{>}","&#x2982;":":","&#x2981;":"\\circ","&#x2758;":"|","&#x25B2;":"\\bigtriangleup","&#x22FF;":"\\Epsilon","&#x25FB;":"\\square","&#x22FE;":"\\overline{\\ni}","&#x22FD;":"\\overline{\\ni}","&#x22FC;":"\\in","&#x22FB;":"\\in","&#x22FA;":"\\in","&#x22F9;":"\\underline{\\in}","&#x22F8;":"\\underline{\\in}","&#x22F7;":"\\overline{\\in}","&#x22F6;":"\\overline{\\in}","&#x22F5;":"\\dot{\\in}","&#x22F4;":"\\in","&#x22F3;":"\\in","&#x22F2;":"\\in","&#x22F0;":"\\ddots","&#x22E9;":"\\underset{\\sim}{\\succ}","&#x22E8;":"\\underset{\\sim}{\\prec}","&#x22E7;":"\\underset{\\not\\sim}{>}","&#x22E6;":"\\underset{\\not\\sim}{<}","&#x22E5;":"\\not\\sqsupseteq","&#x22E4;":"\\not\\sqsubseteq","&#x22E3;":"\\not\\sqsupseteq","&#x22E2;":"\\not\\sqsubseteq","&#x22E1;":"\\nsucc","&#x22E0;":"\\nprec","&#x22DF;":"\\succ","&#x22DE;":"\\prec","&#x22DD;":"\\overline{>}","&#x22DC;":"\\overline{<}","&#x22DB;":"\\underset{>}{\\leq}","&#x22DA;":"\\underset{<}{\\geq}","&#x22D5;":"\\#","&#x22D3;":"\\cup","&#x22D2;":"\\cap","&#x22D1;":"\\supset","&#x22D0;":"\\subset","&#x22CF;":"\\wedge","&#x22CE;":"\\vee","&#x22CD;":"\\simeq","&#x22C8;":"\\bowtie","&#x22C7;":"\\ast","&#x22C6;":"\\star","&#x22C4;":"\\diamond","&#x22BF;":"\\triangle","&#x22BE;":"\\measuredangle","&#x22BD;":"\\overline{\\lor}","&#x22BC;":"\\overline{\\land}","&#x22BB;":"\\underline{\\lor}","&#x22BA;":"\\top","&#x22B9;":"","&#x22B7;":"\\circ\\multimap","&#x22B6;":"\\circ\\multimap","&#x22B3;":"\\triangleright","&#x22B2;":"\\triangleleft","&#x22B1;":"\\succ","&#x22B0;":"\\prec","&#x22AB;":"|\\models","&#x22AA;":"|\\models","&#x22A7;":"\\models","&#x22A6;":"\\vdash","&#x229D;":"\\ominus","&#x229C;":"\\ominus","&#x229B;":"\\odot","&#x229A;":"\\odot","&#x2294;":"\\sqcup","&#x2293;":"\\sqcap","&#x2292;":"\\sqsupseteq","&#x2291;":"\\sqsubseteq","&#x2290;&#x338;":"\\not\\sqsupset","&#x2290;":"\\sqsupset","&#x228F;&#x338;":"\\not\\sqsubset","&#x228F;":"\\sqsubset","&#x228E;":"\\cup","&#x228D;":"\\cup","&#x228C;":"\\cup","&#x227F;&#x338;":"\\not\\succsim","&#x227F;":"\\succsim","&#x227E;":"\\precsim","&#x2279;":"\\not\\overset{>}{<}","&#x2278;":"\\not\\overset{>}{<}","&#x2277;":"\\overset{>}{<}","&#x2276;":"\\overset{<}{>}","&#x2275;":"\\not\\geg","&#x2274;":"\\not\\leq","&#x2273;":"\\geg","&#x2272;":"\\leq","&#x226C;":"","&#x2267;":"\\geg","&#x2266;&#x338;":"\\not\\leq","&#x2266;":"\\leq","&#x2263;":"\\overset{=}{=} ","&#x225E;":"\\overset{m}{=} ","&#x225D;":"\\overset{def}{=}","&#x2258;":"=","&#x2256;":"=","&#x2255;":"=:","&#x2253;":"\\doteq","&#x2252;":"\\doteq","&#x2251;":"\\doteq","&#x2250;":"\\doteq","&#x224F;&#x338;":"","&#x224F;":"","&#x224E;&#x338;":"","&#x224E;":"","&#x224C;":"\\approx","&#x224B;":"\\approx","&#x224A;":"\\approx","&#x2242;&#x338;":"\\neq","&#x2242;":"=","&#x223F;":"\\sim","&#x223E;":"\\infty","&#x223D;&#x331;":"\\sim","&#x223D;":"\\sim","&#x223B;":"\\sim","&#x223A;":":-:","&#x2239;":"-:","&#x2238;":"\\bot","&#x2237;":"::","&#x2236;":":","&#x2223;":"|","&#x221F;":"\\llcorner","&#x2219;":"\\cdot","&#x2218;":"\\circ","&#x2217;":"*","&#x2215;":"/","&#x220E;":"\\square","&#x220D;":"\\ni","&#x220A;":"\\in","&#x2206;":"\\Delta","&#x2044;":"/","&#x2AB0;&#x338;":"\\nsucceq","&#x2AB0;":"\\succeq","&#x2AAF;&#x338;":"\\npreceq","&#x2AAF;":"\\preceq","&#x2A88;":"\\ngeqslant","&#x2A87;":"\\nleqslant","&#x29F3;":"\\Phi","&#x29E6;":"\\models","&#x29E5;":"\\not\\equiv","&#x29E4;":"\\approx\\neq","&#x29E3;":"\\neq","&#x29C1;":"\\circle","&#x29C0;":"\\circle","&#x25E6;":"\\circle","&#x25D7;":"\\circle","&#x25D6;":"\\circle","&#x25CF;":"\\circle","&#x25CE;":"\\circledcirc","&#x25CD;":"\\circledcirc","&#x25CC;":"\\circledcirc","&#x25C9;":"\\circledcirc","&#x25C8;":"\\diamond","&#x25C7;":"\\diamond","&#x25C6;":"\\diamond","&#x25C5;":"\\triangleleft","&#x25C4;":"\\triangleleft","&#x25C3;":"\\triangleleft","&#x25C2;":"\\triangleleft","&#x25C1;":"\\triangleleft","&#x25C0;":"\\triangleleft","&#x25BF;":"\\triangledown","&#x25BE;":"\\triangledown","&#x25BD;":"\\triangledown","&#x25BC;":"\\triangledown","&#x25B9;":"\\triangleright","&#x25B8;":"\\triangleright","&#x25B7;":"\\triangleright","&#x25B6;":"\\triangleright","&#x25B5;":"\\triangle","&#x25B4;":"\\triangle","&#x25B3;":"\\triangle","&#x25B1;":"\\square","&#x25B0;":"\\square","&#x25AF;":"\\square","&#x25AE;":"\\square","&#x25AD;":"\\square","&#x25AB;":"\\square","&#x25AA;":"\\square","&#x25A1;":"\\square","&#x25A0;":"\\square","&#x22ED;":"\\not\\triangleright","&#x22EC;":"\\not\\triangleleft","&#x22EB;":"\\not\\triangleright","&#x22EA;":"\\not\\triangleleft","&#x22D9;":"\\ggg","&#x22D8;":"\\lll","&#x22D7;":"*>","&#x22D6;":"<*","&#x22D4;":"\\pitchfork","&#x22CC;":"","&#x22CB;":"","&#x22CA;":"\\rtimes","&#x22C9;":"\\ltimes","&#x22B5;":"\\triangleright","&#x22B4;":"","&#x22A5;":"\\bot","&#x2281;":"\\nsucc","&#x2280;":"\\preceq","&#x227D;":"\\succeq","&#x227C;":"\\preceq","&#x227B;":"\\succ","&#x227A;":"\\prec","&#x2271;":"\\geq/","&#x2270;":"\\leq/","&#x226D;":"\\neq","&#x226B;&#x338;":"\\not\\gg","&#x226B;":"\\gg","&#x226A;&#x338;":"\\not\\ll","&#x226A;":"\\ll","&#x2269;":"\\ngeqslant","&#x2268;":"\\nleqslant","&#x2261;":"\\equiv","&#x225F;":"\\doteq","&#x225C;":"\\triangleq","&#x225B;":"\\doteq","&#x225A;":"\\triangleq","&#x2259;":"\\triangleq","&#x2257;":"\\doteq","&#x2254;":":=","&#x224D;":"\\asymp","&#x2247;":"\\ncong","&#x2246;":"\\ncong","&#x2245;":"\\cong","&#x2244;":"\\not\\simeq","&#x2243;":"\\simeq","&#x2241;":"\\nsim","&#x2226;":"\\not\\parallel","&#x2225;":"\\parallel","&#x2224;":"\\not|","&#x221D;":"\\propto","==":"==","=":"="," ̿":"=","&#x33F;":"=",":=":":=","/=":"=","-=":"-=","+=":"+=","*=":"*=","!=":"!=","&#x2260;":"\\neq","&#x2262;":"\\equiv /","&#x2249;":"\\approx /","&#x223C;":"\\sim","&#x2248;":"\\approx","&#x226E;":"</","&lt;":"<","&#x226F;":">/",">=":">=",">":">","&#x2265;":"\\geq","&#x2264;":"\\leq","&lt;=":"<=","&#x228B;":"\\supsetneq","&#x228A;":"\\subsetneq","&#x2289;":"\\nsupseteq","&#x2288;":"\\nsubseteq","&#x2287;":"\\supseteq","&#x2286;":"\\subseteq","&#x2285;":"\\not\\supset","&#x2284;":"\\not\\subset","&#x2283;&#x20D2;":"\\supset |","&#x2283;":"\\supset","&#x2282;&#x20D2;":"\\subset |","&#x2282;":"\\subset","&#x220C;":"\\not\\in","&#x2209;":"\\notin","&#x2208;":"\\in","&#x2201;":"C","&#x2204;":"\\nexists","&#x2203;":"\\exists","&#x2200;":"\\forall","&#x2227;":"\\land","&amp;&amp;":"\\&\\&","&#x2228;":"\\lor","&#x22AF;":"\\cancel{\\vDash}","&#x22AE;":"\\cancel{\\Vdash}","&#x22AD;":"\\nvDash","&#x22AC;":"\\nvDash","&#x22A9;":"\\Vdash","&#x22A8;":"\\vDash","&#x22A4;":"\\top","&#x22A3;":"\\dashv","&#x22A2;":"\\vdash","&#x220B;":"\\ni","&#x22F1;":"\\ddots","&#x22EF;":"\\hdots","&#x22EE;":"\\vdots","&#x2026;":"\\hdots","&#x3F6;":"\\ni",":":":","...":"\\cdots","..":"..","->":"->","&#x2235;":"\\because","&#x2234;":"\\therefore ","&#x2063;":"",",":",",";":";","&#x29FD;":"\\}","&#x29FC;":"\\{","&#x2998;":"\\]","&#x2997;":"\\[","&#x2996;":"\\ll","&#x2995;":"\\gg","&#x2994;":"\\gg","&#x2993;":"\\ll","&#x2992;":"\\gg","&#x2991;":"\\ll","&#x2990;":"\\]","&#x298F;":"\\]","&#x298E;":"\\]","&#x298D;":"\\[","&#x298C;":"\\[","&#x298B;":"\\]","&#x298A;":"\\triangleright","&#x2989;":"\\triangleleft","&#x2988;":"|\\)","&#x2987;":"\\(|","&#x2986;":"|\\)","&#x2985;":"\\(\\(","&#x2984;":"|\\}","&#x2983;":"\\{|","&#x2980;":"\\||","&#x27EF;":"\\right)","&#x27EE;":"\\left(","&#x27ED;":"\\right]]","&#x27EC;":"\\left[[","&#x27EB;":"\\gg","&#x27EA;":"\\ll","&#x27E9;":"\\rangle","&#x27E8;":"\\langle","&#x27E7;":"\\right]]","&#x27E6;":"\\left[[","&#x2773;":"\\right)","&#x2772;":"\\left(","&#x232A;":"\\rangle","&#x2329;":"\\langle","&#x230B;":"\\rfloor","&#x230A;":"\\lfloor","&#x2309;":"\\rceil","&#x2308;":"\\lceil","&#x2016;":"\\parallel","}":"\\right}","{":"\\left{","]":"\\right]","[":"\\left[",")":"\\right)","(":"\\left(","&#x201D;":'"',"&#x201C;":"``","&#x2019;":"'","&#x2018;":"`","%CE%B1":"\\alpha","%CE%B2":"\\beta","%CE%B3":"\\gamma","%CE%93":"\\Gamma","%CE%B4":"\\delta","%CE%94":"\\Delta","%CF%B5":"\\epsilon","%CE%B6":"\\zeta","%CE%B7":"\\eta","%CE%B8":"\\theta","%CE%98":"\\Theta","%CE%B9":"\\iota","%CE%BA":"\\kappa","%CE%BB":"\\lambda","%CE%BC":"\\mu","%CE%BD":"\\nu","%CE%BF":"\\omicron","%CF%80":"\\pi","%CE%A0":"\\Pi","%CF%81":"\\pho","%CF%83":"\\sigma","%CE%A3":"\\Sigma","%CF%84":"\\tau","%CF%85":"\\upsilon","%CE%A5":"\\Upsilon","%CF%95":"\\phi","%CE%A6":"\\Phi","%CF%87":"\\chi","%CF%88":"\\psi","%CE%A8":"\\Psi","%CF%89":"\\omega","%CE%A9":"\\Omega"}},598:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.allMathOperatorsByGlyph=e.allMathOperatorsByGlyphSpecial=void 0,e.allMathOperatorsByGlyphSpecial={'"ˍ"':"\\_",'"ˋ"':"ˋ",'"ˊ"':"ˊ",'"ˉ"':"ˉ",'"ˇ"':"",'"ˆ"':"\\hat",'"º"':"o",'"ª"':"a",'"ⅆ"':"d",'"ⅅ"':"\\mathbb{D}",'"土"':"\\pm",'"十"':"+",'"α"':"\\alpha",'"β"':"\\beta",'"γ"':"\\gamma",'"Γ"':"\\Gamma",'"δ"':"\\delta",'"Δ"':"\\Delta",'"ϵ"':"\\epsilon",'"ζ"':"\\zeta",'"η"':"\\eta",'"θ"':"\\theta",'"Θ"':"\\Theta",'"ι"':"\\iota",'"κ"':"\\kappa",'"λ"':"\\lambda",'"ν"':"\\nu",'"ο"':"\\omicron",'"π"':"\\pi",'"Π"':"\\Pi",'"ρ"':"\\rho",'"σ"':"\\sigma",'"Σ"':"\\Sigma",'"τ"':"\\tau",'"υ"':"\\upsilon",'"Υ"':"\\Upsilon",'"ϕ"':"\\phi",'"Φ"':"\\Phi",'"χ"':"\\chi",'"ψ"':"\\psi",'"Ψ"':"\\Psi",'"ω"':"\\omega",'"Ω"':"\\Omega",'"Ω"':"\\Omega",'"ℏ"':"\\hbar",'"ℜ"':"\\mathfrak{R}",'"Ѳ"':"\\theta",'"Ø"':"\\emptyset",'"ϱ"':"\\varrho",'"ф"':"\\phi",'"ℇ"':"\\varepsilon",'"Ρ"':"P",'"ᐁ"':"\\nabla",'"ƞ"':"\\eta",'"μ"':"\\mu",'"Ө"':"\\theta",'"ⅇ"':"\\text{e}",'"ɼ"':"r",'"ἱ"':"i",'"ϒ"':"\\Upsilon",'"ѳ"':"\\theta",'"ⁿ"':"^{n}",'"เ"':"\\prime",'"П"':"\\prod",'"о"':"o",'"ђ"':"\\hbar",'"Ʌ"':"\\Lambda",'"ῡ"':"\\bar{u}",'"φ"':"\\varphi",'"ȼ"':"c",'"Χ"':"\\mathsf{X}",'"ₙ"':"_{n}",'"ħ"':"\\hbar",'"T"':"T",'"$"':"\\$",'"𝛿"':"\\delta",'"𝜙"':"\\phi",'"𝞮"':"\\epsilon"},e.allMathOperatorsByGlyph={_:"\\underline","⏡":"\\underbrace","⏠":"\\overbrace","⏟":"\\underbrace","⏞":"\\overbrace","⏝":"\\underbrace","⏜":"\\overarc","⎵":"\\underbrace","⎴":"\\overbrace","⃜":"\\square","⃛":"\\square","⁤":"","⁗":"''''","‾":"\\overline","―":"\\overline","‷":"```","‶":"``","‵":"`","‴":"'''","″":"''","‟":"``","„":",,","‛":"`","‚":",","^":"\\hat","˷":"\\sim","˝":"\\sim","˜":"\\sim","˚":"\\degree","˙":"\\cdot","˘":" ","¹":"1","¸":",","´":"´","³":"3","²":"2","°":"\\degree","¯":"\\overline","↛":"\\nrightarrow","¨":"\\cdot\\cdot","~":"\\sim","`":"`","--":"--","++":"++","&":"\\&","∜":"\\sqrt[4]{}","∛":"\\sqrt[3]{}","√":"\\sqrt{}","?":"?","@":"@","//":"//","!!":"!!","!":"!","♯":"\\#","♮":"","♭":"","′":"'","<>":"<>","**":"\\star\\star","∇":"\\nabla","∂":"\\partial","⊙":"\\bigodot","¬":"\\neg","∢":"\\measuredangle","∡":"\\measuredangle","∠":"\\angle","÷":"\\div","/":"/","∖":"\\backslash","\\":"\\backslash","%":"\\%","⊗":"\\bigotimes","·":"\\cdot","⨿":"\\coprod","⨯":"\\times","⋅":"\\cdot","⊡":"\\boxdot","⊠":"\\boxtimes","⁢":"","⁃":"-","•":"\\cdot",".":".","*":"\\star","∪":"\\cup","∩":"\\cap","∐":"\\coprod","∏":"\\prod","≀":"","⫿":"","⫼":"\\mid\\mid\\mid","⨉":"\\times","⨈":"","⨇":"","⨆":"\\sqcup","⨅":"\\sqcap","⨂":"\\otimes","⨀":"\\odot","⋂":"\\cap","⋁":"\\vee","⋀":"\\wedge","⨄":"\\uplus","⨃":"\\cup","⋃":"\\cup","⨜":"\\underline{\\int}","⨛":"\\overline{\\int}","⨚":"\\int","⨙":"\\int","⨘":"\\int","⨗":"\\int","⨖":"\\oint","⨕":"\\oint","⨔":"\\int","⨓":"\\int","⨒":"\\int","⨑":"\\int","⨐":"\\int","⨏":"\\bcancel{\\int}","⨎":"","⨍":"\\hcancel{\\int}","⨌":"\\iiiint","∳":"\\oint","∲":"\\oint","∱":"\\int","∰":"\\oiint","∯":"\\oiint","∮":"\\oint","∫":"\\int","⨁":"\\oplus","⊘":"\\oslash","⊖":"\\ominus","⊕":"\\oplus","∭":"\\iiint","∬":"\\iint","⨋":"","⨊":"","∑":"\\sum","⊟":"\\boxminus","⊞":"\\boxplus","∔":"\\dot{+}","∓":"+-","−":"-","±":"\\pm","-":"-","+":"+","⭆":"\\Rrightarrow","⭅":"\\Lleftarrow","⧴":":\\rightarrow","⧯":"","⧟":"\\bullet-\\bullet","⦟":"\\angle","⦞":"\\measuredangle","⦝":"\\measuredangle","⦜":"\\perp","⦛":"\\measuredangle","⦚":"","⦙":"\\vdots","⥿":"","⥾":"","⥽":"\\prec","⥼":"\\succ","⥻":"\\underset{\\rightarrow}{\\supset}","⥺":"","⥹":"\\underset{\\rightarrow}{\\subset}","⥸":"\\underset{\\rightarrow}{>}","⥷":"","⥶":"\\underset{\\leftarrow}{<}","⥵":"\\underset{\\approx}{\\rightarrow}","⥴":"\\underset{\\sim}{\\rightarrow}","⥳":"\\underset{\\sim}{\\leftarrow}","⥲":"\\overset{\\sim}{\\rightarrow}","⥱":"\\overset{=}{\\rightarrow}","⥰":"","⥯":"","⥮":"","⥭":"\\overline{\\rightharpoondown}","⥬":"\\underline{\\rightharpoonup}","⥫":"\\overline{\\leftharpoondown}","⥪":"\\underline{\\leftharpoonup}","⥩":"\\rightleftharpoons","⥨":"\\rightleftharpoons","⥧":"\\rightleftharpoons","⥦":"\\rightleftharpoons","⥥":"\\Downarrow","⥤":"\\Rightarrow","⥣":"\\Uparrow","⥢":"\\Leftarrow","⥡":"\\downarrow","⥠":"\\uparrow","⥟":"\\rightarrow","⥞":"\\leftarrow","⥝":"\\downarrow","⥜":"\\uparrow","⥛":"\\rightarrow","⥚":"\\leftarrow","⥙":"\\downarrow","⥘":"\\uparrow","⥗":"\\rightarrow","⥖":"\\leftarrow","⥕":"\\downarrow","⥔":"\\uparrow","⥓":"\\rightarrow","⥒":"\\leftarrow","⥑":"\\updownarrow","⥐":"\\leftrightarrow","⥏":"\\updownarrow","⥎":"\\leftrightarrow","⥍":"\\updownarrow","⥌":"\\updownarrow","⥋":"\\leftrightarrow","⥊":"\\leftrightarrow","⥉":"","⥈":"\\leftrightarrow","⥇":"\\nrightarrow","⥆":"","⥅":"","⥄":"\\rightleftarrows","⥃":"\\leftrightarrows","⥂":"\\rightleftarrows","⥁":"\\circlearrowright","⥀":"\\circlearrowleft","⤿":"\\rightarrow","⤾":"\\leftarrow","⤽":"\\leftarrow","⤼":"\\rightarrow","⤻":"\\rightarrow","⤺":"\\leftarrow","⤹":"\\downarrow","⤸":"\\downarrow","⤷":"\\Rsh","⤶":"\\Lsh","⤵":"\\downarrow","⤴":"\\uparrow","⤳":"\\rightarrow","⤲":"\\leftarrow","⤱":" ","⤰":" ","⤯":" ","⤮":" ","⤭":" ","⤬":"\\times","⤫":"\\times","⤪":" ","⤩":" ","⤨":" ","⤧":" ","⤦":" ","⤥":" ","⤤":" ","⤣":" ","⤢":" ","⤡":" ","⤠":"\\mapsto\\cdot","⤟":"\\cdot\\leftarrow","⤞":"\\rightarrow\\cdot","⤝":"\\leftarrow","⤜":"\\rightarrow","⤛":"\\leftarrow","⤚":"\\rightarrow","⤙":"\\leftarrow","⤘":"\\rightarrow","⤗":"\\rightarrow","⤖":"\\rightarrow","⤕":"\\rightarrow","⤔":"\\rightarrow","⤓":"\\downarrow","⤒":"\\uparrow","⤑":"\\rightarrow","⤐":"\\rightarrow","⤏":"\\rightarrow","⤎":"\\leftarrow","⤍":"\\rightarrow","⤌":"\\leftarrow","⤋":"\\Downarrow","⤊":"\\Uparrow","⤉":"\\uparrow","⤈":"\\downarrow","⤇":"\\Rightarrow","⤆":"\\Leftarrow","⤅":"\\mapsto","⤄":"\\nLeftrightarrow","⤃":"\\nRightarrow","⤂":"\\nLeftarrow","⤁":"\\rightsquigarrow","⤀":"\\rightsquigarrow","⟿":"\\rightsquigarrow","⟾":"\\Rightarrow","⟽":"\\Leftarrow","⟼":"\\mapsto","⟻":"\\leftarrow","⟺":"\\Longleftrightarrow","⟹":"\\Longrightarrow","⟸":"\\Longleftarrow","⟷":"\\leftrightarrow","⟶":"\\rightarrow","⟵":"\\leftarrow","⟱":"\\Downarrow","⟰":"\\Uparrow","⊸":"\\rightarrow","⇿":"\\leftrightarrow","⇾":"\\rightarrow","⇽":"\\leftarrow","⇼":"\\nleftrightarrow","⇻":"\\nrightarrow","⇺":"\\nleftarrow","⇹":"\\nleftrightarrow","⇸":"\\nrightarrow","⇷":"\\nleftarrow","⇶":"\\Rrightarrow","⇵":"","⇴":"\\rightarrow","⇳":"\\Updownarrow","⇲":"\\searrow","⇱":"\\nwarrow","⇰":"\\Leftarrow","⇯":"\\Uparrow","⇮":"\\Uparrow","⇭":"\\Uparrow","⇬":"\\Uparrow","⇫":"\\Uparrow","⇪":"\\Uparrow","⇩":"\\Downarrow","⇨":"\\Rightarrow","⇧":"\\Uparrow","⇦":"\\Leftarrow","⇥":"\\rightarrow","⇤":"\\leftarrow","⇣":"\\downarrow","⇢":"\\rightarrow","⇡":"\\uparrow","⇠":"\\leftarrow","⇟":"\\downarrow","⇞":"\\uparrow","⇝":"\\rightsquigarrow","⇜":"\\leftarrow","⇛":"\\Rrightarrow","⇚":"\\Lleftarrow","⇙":"\\swarrow","⇘":"\\searrow","⇗":"\\nearrow","⇖":"\\nwarrow","⇕":"\\Updownarrow","⇔":"\\Leftrightarrow","⇓":"\\Downarrow","⇒":"\\Rightarrow","⇑":"\\Uparrow","⇐":"\\Leftarrow","⇏":"\\nRightarrow","⇎":"\\nLeftrightarrow","⇍":"\\nLeftarrow","⇌":"\\rightleftharpoons","⇋":"\\leftrightharpoons","⇊":"\\downdownarrows","⇉":"\\rightrightarrows","⇈":"\\upuparrows","⇇":"\\leftleftarrows","⇆":"\\leftrightarrows","⇅":"","⇄":"\\rightleftarrows","⇃":"\\downharpoonleft","⇂":"\\downharpoonright","⇁":"\\rightharpoondown","⇀":"\\rightharpoonup","↿":"\\upharpoonleft","↾":"\\upharpoonright","↽":"\\leftharpoondown","↼":"\\leftharpoonup","↻":"\\circlearrowright","↺":"\\circlearrowleft","↹":"\\leftrightarrows","↸":"\\overline{\\nwarrow}","↷":"\\curvearrowright","↶":"\\curvearrowleft","↵":"\\swarrow","↴":"\\searrow","↳":"\\Rsh","↲":"\\Lsh","↱":"\\Rsh","↰":"\\Lsh","↯":"\\swarrow","↮":"","↭":"\\leftrightsquigarrow","↬":"\\looparrowright","↫":"\\looparrowleft","↪":"\\hookrightarrow","↩":"\\hookleftarrow","↨":"\\underline{\\updownarrow}","↧":"\\downarrow","↦":"\\rightarrowtail","↥":"\\uparrow","↤":"\\leftarrowtail","↣":"\\rightarrowtail","↢":"\\leftarrowtail","↡":"\\downarrow","↠":"\\twoheadrightarrow","↟":"\\uparrow","↞":"\\twoheadleftarrow","↝":"\\nearrow","↜":"\\nwarrow","↚":"","↙":"\\swarrow","↘":"\\searrow","↗":"\\nearrow","↖":"\\nwarrow","↕":"\\updownarrow","↔":"\\overleftrightarrow","↓":"\\downarrow","→":"\\overrightarrow","↑":"\\uparrow","←":"\\leftarrow","|||":"\\left|||\\right.","||":"\\left||\\right.","|":"\\mid","⫾":"","⫽":"//","⫻":"///","⫺":"","⫹":"","⫸":"","⫷":"","⫶":"\\vdots","⫵":"","⫴":"","⫳":"","⫲":"\\nparallel","⫱":"","⫰":"","⫯":"","⫮":"\\bcancel{\\mid}","⫭":"","⫬":"","⫫":"","⫪":"","⫩":"","⫨":"\\underline{\\perp}","⫧":"\\overline{\\top}","⫦":"","⫥":"","⫤":"","⫣":"","⫢":"","⫡":"","⫠":"\\perp","⫟":"\\top","⫞":"\\dashv","⫝̸":"","⫝":"","⫛":"\\pitchfork","⫚":"","⫙":"","⫘":"","⫗":"","⫖":"","⫕":"","⫔":"","⫓":"","⫒":"","⫑":"","⫐":"","⫏":"","⫎":"","⫍":"","⫌":"\\underset{\\neq}{\\supset}","⫋":"\\underset{\\neq}{\\subset}","⫊":"\\underset{\\approx}{\\supset}","⫉":"\\underset{\\approx}{\\subset}","⫈":"\\underset{\\sim}{\\supset}","⫇":"\\underset{\\sim}{\\subset}","⫆":"\\supseteqq","⫅":"\\subseteqq","⫄":"\\dot{\\supseteq}","⫃":"\\dot{\\subseteq}","⫂":"\\underset{\\times}{\\supset}","⫁":"\\underset{\\times}{\\subset}","⫀":"\\underset{+}{\\supset}","⪿":"\\underset{+}{\\subset}","⪾":"","⪽":"","⪼":"\\gg ","⪻":"\\ll","⪺":"\\underset{\\cancel{\\approx}}{\\succ}","⪹":"\\underset{\\cancel{\\approx}}{\\prec}","⪸":"\\underset{\\approx}{\\succ}","⪷":"\\underset{\\approx}{\\prec}","⪶":"\\underset{\\cancel{=}}{\\succ}","⪵":"\\underset{\\cancel{=}}{\\prec}","⪴":"\\underset{=}{\\succ}","⪳":"\\underset{=}{\\prec}","⪲":"","⪱":"","⪮":"","⪭":"\\underline{\\hcancel{>}}","⪬":"\\underline{\\hcancel{>}}","⪫":"\\hcancel{>}","⪪":"\\hcancel{<}","⪩":"","⪨":"","⪧":"\\vartriangleright","⪦":"\\vartriangleleft","⪥":"><","⪤":"><","⪣":"\\underline{\\ll}","⪢̸":"\\cancel{\\gg}","⪢":"\\gg","⪡̸":"\\cancel{\\ll}","⪡":"\\ll","⪠":"\\overset{\\sim}{\\geqq}","⪟":"\\overset{\\sim}{\\leqq}","⪞":"\\overset{\\sim}{>}","⪝":"\\overset{\\sim}{<}","⪜":"","⪛":"","⪚":"\\overset{=}{>}","⪙":"\\overset{=}{<}","⪘":"","⪗":"","⪖":"","⪕":"","⪔":"","⪓":"","⪒":"\\underset{=}{\\gtrless}","⪑":"\\underset{=}{\\lessgtr}","⪐":"\\underset{<}{\\gtrsim}","⪏":"\\underset{>}{\\lesssim}","⪎":"\\underset{\\simeq}{>}","⪍":"\\underset{\\simeq}{<}","⪌":"\\gtreqqless","⪋":"\\lesseqqgtr","⪊":"\\underset{\\cancel{\\approx}}{>}","⪉":"\\underset{\\approx}{<}","⪆":"\\underset{\\approx}{>}","⪅":"\\underset{\\approx}{<}","⪄":"","⪃":"","⪂":"","⪁":"","⪀":"","⩿":"","⩾̸":"\\bcancel{\\geq}","⩾":"\\geq","⩽̸":"\\bcancel{\\leq}","⩽":"\\leq","⩼":"","⩻":"","⩺":"","⩹":"","⩸":"\\overset{\\dots}{\\equiv}","⩷":"","⩶":"===","⩵":"==","⩴":"::=","⩳":"","⩲":"\\underset{=}{+}","⩱":"\\overset{=}{+}","⩰":"\\overset{\\approx}{=}","⩯":"\\overset{\\wedge}{=}","⩮":"\\overset{*}{=}","⩭":"\\dot{\\approx}","⩬":"","⩫":"","⩪":"\\dot{\\sim}","⩩":"","⩨":"","⩧":"\\dot{\\equiv}","⩦":"\\underset{\\cdot}{=}","⩥":"","⩤":"","⩣":"\\underset{=}{\\vee}","⩢":"\\overset{=}{\\vee}","⩡":"ul(vv)","⩠":"\\underset{=}{\\wedge}","⩟":"\\underline{\\wedge}","⩞":"\\overset{=}{\\wedge}","⩝":"\\hcancel{\\vee}","⩜":"\\hcancel{\\wedge}","⩛":"","⩚":"","⩙":"","⩘":"\\vee","⩗":"\\wedge","⩖":"","⩕":"","⩔":"","⩓":"","⩒":"\\dot{\\vee}","⩑":"\\dot{\\wedge}","⩐":"","⩏":"","⩎":"","⩍":"\\overline{\\cap}","⩌":"\\overline{\\cup}","⩋":"","⩊":"","⩉":"","⩈":"","⩇":"","⩆":"","⩅":"","⩄":"","⩃":"\\overline{\\cap}","⩂":"\\overline{\\cup}","⩁":"","⩀":"","⨾":"","⨽":"\\llcorner","⨼":"\\lrcorner","⨻":"","⨺":"","⨹":"","⨸":"","⨷":"","⨶":"\\hat{\\otimes}","⨵":"","⨴":"","⨳":"","⨲":"\\underline{\\times}","⨱":"\\underline{\\times}","⨰":"\\dot{\\times}","⨮":"\\bigodot","⨭":"\\bigodot","⨬":"","⨫":"","⨪":"","⨩":"","⨨":"","⨧":"","◻":"\\square","⨦":"\\underset{\\sim}{+}","⨥":"\\underset{\\circ}{+}","⨤":"\\overset{\\sim}{+}","⨣":"\\hat{+}","⨢":"\\dot{+}","⨡":"\\upharpoonright","⨠":">>","⨟":"","⨞":"\\triangleleft","⨝":"\\bowtie","⧿":"","⧾":"+","⧻":"\\hcancel{|||}","⧺":"\\hcancel{||}","⧹":"\\backslash","⧸":"/","⧷":"hcancel{\backslash}","⧶":"","⧵":"\\backslash","⧲":"\\Phi","⧱":"","⧰":"","⧮":"","⧭":"","⧬":"","⧫":"\\lozenge","⧪":"","⧩":"","⧨":"","⧧":"\\ddagger","⧢":"\\sqcup\\sqcup","⧡":"","⧠":"\\square","⧞":"","⧝":"","⧜":"","⧛":"\\{\\{","⧙":"\\{","⧘":"\\}","⧗":"","⧖":"","⧕":"\\bowtie","⧔":"\\bowtie","⧓":"\\bowtie","⧒":"\\bowtie","⧑":"\\bowtie","⧐̸":"| \\not\\triangleright","⧐":"| \\triangleright","⧏̸":"\\not\\triangleleft |","⧏":"\\triangleleft |","⧎":"","⧍":"\\triangle","⧌":"","⧋":"\\underline{\\triangle}","⧊":"\\dot{\\triangle}","⧉":"","⧈":"\\boxed{\\circ}","⧇":"\\boxed{\\circ}","⧆":"\\boxed{\\rightarrow}","⧅":"\\bcancel{\\square}","⧄":"\\cancel{\\square}","⧃":"\\odot","⧂":"\\odot","⦿":"\\odot","⦾":"\\odot","⦽":"\\varnothing","⦼":"\\oplus","⦻":"\\otimes","⦺":"","⦹":"\\varnothing","⦸":"\\varnothing","⦷":"\\ominus","⦶":"\\ominus","⦵":"\\ominus","⦴":"\\vec{\\varnothing}","⦳":"\\vec{\\varnothing}","⦲":"\\dot{\\varnothing}","⦱":"\\overline{\\varnothing}","⦰":"\\varnothing","⦯":"\\measuredangle","⦮":"\\measuredangle","⦭":"\\measuredangle","⦬":"\\measuredangle","⦫":"\\measuredangle","⦪":"\\measuredangle","⦩":"\\measuredangle","⦨":"\\measuredangle","⦧":"","⦦":"","⦥":"","⦤":"","⦣":"\\ulcorner","⦢":"\\measuredangle","⦡":"\\not\\lor","⦠":"\\bcancel{>}","⦂":":","⦁":"\\cdot","❘":"\\mid","▲":"\\bigtriangleup","⋿":"\\Epsilon","⋾":"\\overline{\\ni}","⋽":"\\overline{\\ni}","⋼":"\\in","⋻":"\\in","⋺":"\\in","⋹":"\\underline{\\in}","⋸":"\\underline{\\in}","⋷":"\\overline{\\in}","⋶":"\\overline{\\in}","⋵":"\\dot{\\in}","⋴":"\\in","⋳":"\\in","⋲":"\\in","⋰":"\\ddots","։":":","⋩":"\\underset{\\sim}{\\succ}","⋨":"\\underset{\\sim}{\\prec}","⋧":"\\underset{\\not\\sim}{>}","⋦":"\\underset{\\not\\sim}{<}","⋥":"\\not\\sqsupseteq","⋤":"\\not\\sqsubseteq","⋣":"\\not\\sqsupseteq","⋢":"\\not\\sqsubseteq","⋡":"\\nsucc","⋠":"\\nprec","⋟":"\\succ","⋞":"\\prec","⋝":"\\overline{>}","⋜":"\\overline{<}","⋛":"\\underset{>}{\\leq}","⋚":"\\underset{<}{\\geq}","⋕":"\\#","⋓":"\\cup","⋒":"\\cap","⋑":"\\supset","⋐":"\\subset","⋏":"\\wedge","⋎":"\\vee","⋍":"\\simeq","⋈":"\\Join","⋇":"\\ast","⋆":"\\star","⋄":"\\diamond","⊿":"\\triangle","⊾":"\\measuredangle","⊽":"\\overline{\\lor}","⊼":"\\overline{\\land}","⊻":"\\underline{\\lor}","⊺":"\\top","⊹":"","⊷":"\\circ\\multimap","⊶":"\\circ\\multimap","⊳":"\\triangleright","⊲":"\\triangleleft","⊱":"\\succ","⊰":"\\prec","⊫":"|\\models","⊪":"|\\models","⊧":"\\models","⊦":"\\vdash","⊝":"\\ominus","⊜":"\\ominus","⊛":"\\odot","⊚":"\\odot","⊔":"\\sqcup","⊓":"\\sqcap","⊒":"\\sqsupseteq","⊑":"\\sqsubseteq","⊐̸":"\\not\\sqsupset","⊐":"\\sqsupset","⊏̸":"\\not\\sqsubset","⊏":"\\sqsubset","⊎":"\\cup","⊍":"\\cup","⊌":"\\cup","≿̸":"\\not\\succsim","≿":"\\succsim","≾":"\\precsim","≹":"\\not\\overset{>}{<}","≸":"\\not\\overset{>}{<}","≷":"\\overset{>}{<}","≶":"\\overset{<}{>}","≵":"\\not\\geg","≴":"\\not\\leq","≳":"\\geg","≲":"\\leq","≬":"","≧":"\\geg","≦̸":"\\not\\leq","≦":"\\leq","≣":"\\overset{=}{=} ","≞":"\\overset{m}{=} ","≝":"\\overset{def}{=}","≘":"=","≖":"=","≕":"=:","≓":"\\doteq","≒":"\\doteq","≑":"\\doteq","≐":"\\doteq","≏̸":"","≏":"","≎̸":"","≎":"","≌":"\\approx","≋":"\\approx","≊":"\\approx","≂̸":"\\neq","≂":"=","∿":"\\sim","∾":"\\infty","∽̱":"\\sim","∽":"\\sim","∻":"\\sim","∺":":-:","∹":"-:","∸":"\\bot","∷":"::","∶":":","∣":"\\mid","∟":"\\llcorner","∘":"\\circ","∗":"*","∕":"/","∎":"\\square","∍":"\\ni","∊":"\\in","∆":"\\Delta","⁄":"/","⪰̸":"\\nsucceq","⪰":"\\succeq","⪯̸":"\\npreceq","⪯":"\\preceq","⪈":"\\ngeqslant","⪇":"\\nleqslant","⧳":"\\Phi","⧦":"\\models","⧥":"\\not\\equiv","⧤":"\\approx\\neq","⧣":"\\neq","⧁":"\\circle","⧀":"\\circle","◦":"\\circle","◗":"\\circle","◖":"\\circle","●":"\\circle","◎":"\\circledcirc","◍":"\\circledcirc","◌":"\\circledcirc","◉":"\\circledcirc","◈":"\\diamond","◇":"\\diamond","◆":"\\diamond","◅":"\\triangleleft","◄":"\\triangleleft","◃":"\\triangleleft","◂":"\\triangleleft","◁":"\\triangleleft","◀":"\\triangleleft","▿":"\\triangledown","▾":"\\triangledown","▽":"\\triangledown","▼":"\\triangledown","▹":"\\triangleright","▸":"\\triangleright","▷":"\\triangleright","▶":"\\triangleright","▵":"\\triangle","▴":"\\triangle","△":"\\triangle","▱":"\\square","▰":"\\blacksquare","▯":"\\square","▮":"\\blacksquare","▭":"\\square","▫":"\\square","▪":"\\square","□":"\\square","■":"\\blacksquare","⋭":"\\not\\triangleright","⋬":"\\not\\triangleleft","⋫":"\\not\\triangleright","⋪":"\\not\\triangleleft","⋙":"\\ggg","⋘":"\\lll","⋗":"*>","⋖":"<*","⋔":"\\pitchfork","⋌":"","⋋":"\\bowtie","⋊":"\\ltimes","⋉":"\\rtimes","⊵":"\\triangleright","\\triangleleft":"","⊥":"\\bot","⊁":"\\nsucc","⊀":"\\preceq","≽":"\\succeq","≼":"\\preceq","≻":"\\succ","≺":"\\prec","≱":"\\geq/","≰":"\\leq/","≭":"\\neq","≫̸":"\\not\\gg","≫":"\\gg","≪̸":"\\not\\ll","≪":"\\ll","≩":"\\ngeqslant","≨":"\\nleqslant","≡":"\\equiv","≟":"\\doteq","≜":"\\triangleq","≛":"\\doteq","≚":"\\triangleq","≙":"\\triangleq","≗":"\\doteq","≔":":=","≍":"\\asymp","≇":"\\ncong","≆":"\\ncong","≅":"\\cong","≄":"\\not\\simeq","≃":"\\simeq","≁":"\\nsim","∦":"\\not\\parallel","∥":"\\parallel","∤":"\\not|","∝":"\\propto","==":"==","=":"=",":=":":=","/=":"=","-=":"-=","+=":"+=","*=":"*=","!=":"!=","≠":"\\neq","≢":"\\equiv /","≉":"\\approx /","∼":"\\sim","≈":"\\approx","≮":"</","<":"<","≯":">/",">=":">=",">":">","≥":"\\geq","≤":"\\leq","<=":"<=","⊋":"\\supsetneq","⊊":"\\subsetneq","⊉":"\\nsupseteq","⊈":"\\nsubseteq","⊇":"\\supseteq","⊆":"\\subseteq","⊅":"\\not\\supset","⊄":"\\not\\subset","⊃⃒":"\\supset |","⊃":"\\supset","⊂⃒":"\\subset |","⊂":"\\subset","∌":"\\not\\in","∉":"\\notin","∈":"\\in","∁":"C","∄":"\\nexists","∃":"\\exists","∀":"\\forall","∧":"\\land","&&":"\\&\\&","∨":"\\lor","⊯":"\\cancel{\\vDash}","⊮":"\\cancel{\\Vdash}","⊭":"\\nvDash","⊬":"\\nvDash","⊩":"\\Vdash","⊨":"\\vDash","⊤":"\\top","⊣":"\\dashv","⊢":"\\vdash","∋":"\\ni","⋱":"\\ddots","⋯":"\\hdots","⋮":"\\vdots","϶":"\\ni",":":":","...":"\\cdots","..":"..","->":"->","∵":"\\because","∴":"\\therefore ","⁣":"\\llbracket",",":",",";":";","⧽":"\\}","⧼":"\\{","⦘":"\\]","⦗":"\\[","⦖":"\\ll","⦕":"\\gg","⦔":"\\gg","⦓":"\\ll","⦒":"\\gg","⦑":"\\ll","⦐":"\\]","⦏":"\\]","⦎":"\\]","⦍":"\\[","⦌":"\\[","⦋":"\\]","⦊":"\\triangleright","⦉":"\\triangleleft","⦈":"|\\)","⦇":"\\(|","⦆":"|\\)","⦅":"\\(\\(","⦄":"|\\}","⦃":"\\{|","⦀":"\\||","⟯":"\\right]","⟮":"\\left[","⟭":"\\right]]","⟬":"\\left[[","⟫":"\\gg","⟪":"\\ll","⟧":"\\)|","⟦":"\\(|","❳":"\\right)","❲":"\\left(","〉":"\\rangle","〈":"\\langle","⌋":"\\rfloor","⌊":"\\lfloor","⌉":"\\rceil","⌈":"\\lceil","‖":"\\parallel","}":"\\right}","{":"\\left{","]":"\\right]","[":"\\left[",")":"\\right)","(":"\\left(","”":'\\"',"“":"\\text{``}","’":"'","‘":"`","∅":"\\emptyset","⟲":"\\circlearrowleft","⟳":"\\circlearrowright","×":"\\times","½":"\\dfrac{1}{2}","✓":"\\checkmark","⟩":"\\rangle","⟨":"\\langle","¼":"\\dfrac{1}{4}","…":"\\ldots","∙":"\\cdot","∞":"\\infty","⁺":"^{+}","⁻":"^{-}","⁼":"^{=}","⁽":"^{(}","⁾":"^{)}","〗":"\\)|","〖":"\\langle",";":";","൦":"\\circ","┴":"\\perp","✕":"\\times","⎻":"-","»":"\\gg","⬆":"\\uparrow","⬇":"\\downarrow","⬅":"\\leftarrow","➡":"\\rightarrow","⎼":"-","⎜":"\\mid","⎥":"\\mid","⮕":"\\rightarrow","・":"\\cdot","¦":"\\mid","£":"\\pounds","¥":"\\yen","✗":"\\times","✔":"\\checkmark","«":"\\ll","†":"\\dagger","│":"\\mid","#":"\\#","℃":"\\text{\\textdegree C}","℉":"\\text{\\textdegree F}","█":"\\blacksquare","℧":"\\mho","‡":"\\ddagger","˳":"\\cdot","।":"\\mid","€":"\\euro"}},2335:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.allMathSymbolsByChar=void 0,e.allMathSymbolsByChar={"&#xA0;":"\\textrm{ }","&#x2203;":"\\exists","&#x2200;":"\\forall","&#x21D4;":"\\iff","&#x21D2;":"=>","&#xAC;":"\\neg","&#x2124;":"\\mathbb{Z}","&#x211D;":"\\mathbb{R}","&#x211A;":"\\mathbb{Q}","&#x2115;":"\\mathbb{N}","&#x2102;":"CC","&#x25A1;":"\\square","&#x22C4;":"\\diamond","&#x25B3;":"\\triangle","&#x2322;":"\\frown","&#x2220;":"\\angle","&#x22F1;":"\\ddots","&#x22EE;":"\\vdots","&#x2235;":"\\because","&#x2234;":"\\therefore","&#x223C;":"\\sim","&#x2241;":"\\nsim","&#x2135;":"\\aleph","&#x2205;":"\\oslash","&#xB1;":"\\pm","&#x2207;":"\\nabla","&#x2202;":"\\partial","&#x222E;":"\\oint","&#x222B;":"\\int","&#x22C3;":"\\cup","&#x222A;":"\\cup","&#x22C2;":"\\cap","&#x2229;":"\\cap","&#x22C1;":"\\vee","&#x2228;":"\\vee","&#x22C0;":"\\wedge","&#x2227;":"\\wedge","&#x220F;":"\\prod","&#x2211;":"\\sum","&#x2299;":"\\bigodot","&#x2297;":"\\bigoplus","&#x2295;":"o+","&#x2218;":"@","&#x22C8;":"\\bowtie","&#x22CA;":"\\rtimes","&#x22C9;":"\\ltimes","&#xF7;":"\\div","&#xD7;":"\\times","\\":"\\backslash","&#x22C6;":"\\star","&#x2217;":"\\star","&#x22C5;":"\\cdot","&#x3A9;":"\\Omega","&#x3C9;":"\\omega","&#x3A8;":"\\Psi","&#x3C8;":"\\psi","&#x3C7;":"\\chi","&#x3C6;":"\\varphi","&#x3A6;":"\\Phi","&#x3D5;":"\\phi","&#x3C5;":"\\upsilon","&#x3C4;":"\\tau","&#x3A3;":"\\Sigma","&#x3C3;":"\\sigma","&#x3C1;":"\\rho","&#x3A0;":"\\Pi","&#x3C0;":"\\pi","&#x39E;":"\\Xi","&#x3BE;":"\\xi","&#x3BD;":"\\nu","&#x3BC;":"\\mu","&#x39B;":"\\Lambda","&#x3BB;":"\\lambda","&#x3BA;":"\\kappa","&#x3B9;":"\\iota","&#x3D1;":"\\vartheta","&#x398;":"\\Theta","&#x3B8;":"\\theta","&#x3B7;":"\\eta","&#x3B6;":"\\zeta","&#x25B;":"\\varepsilon","&#x25FB;":"\\square","&#x3B5;":"\\epsilon","&#x394;":"\\Delta","&#x3B4;":"\\delta","&#x393;":"\\Gamma","&#x3B3;":"\\gamma","&#x3B2;":"\\beta","&#x3B1;":"\\alpha","&#x221E;":"\\infty","‬":"\\text{\\textdir TRT}","‎":"\\text{\\textdir LTR}"}},4104:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.allMathSymbolsByGlyph=e.allMathSymbolsByGlyphSpecial=void 0,e.allMathSymbolsByGlyphSpecial={'"ℵ"':"\\aleph",'"Ω"':"\\Omega",'"ω"':"\\omega",'"Ψ"':"\\Psi",'"ψ"':"\\psi",'"χ"':"\\chi",'"φ"':"\\varphi",'"Φ"':"\\Phi",'"ϕ"':"\\phi",'"υ"':"\\upsilon",'"τ"':"\\tau",'"Σ"':"\\Sigma",'"σ"':"\\sigma",'"ρ"':"\\rho",'"Π"':"\\Pi",'"π"':"\\pi",'"Ξ"':"\\Xi",'"ξ"':"\\xi",'"ν"':"\\nu",'"μ"':"\\mu",'"Λ"':"\\Lambda",'"λ"':"\\lambda",'"κ"':"\\kappa",'"ι"':"\\iota",'"ϑ"':"\\vartheta",'"Θ"':"\\Theta",'"θ"':"\\theta",'"η"':"\\eta",'"ζ"':"\\zeta",'"ɛ"':"\\varepsilon",'"ε"':"\\epsilon",'"Δ"':"\\Delta",'"δ"':"\\delta",'"Γ"':"\\Gamma",'"γ"':"\\gamma",'"β"':"\\beta",'"α"':"\\alpha",'"ϵ"':"\\epsilon",'"µ"':"\\mu",'"ı"':"\\imath",'"ม"':"\\mathbf{m}",'"Ω"':"\\Omega",'"त"':" ",'"ß"':"\\ss",'"Ћ"':"\\hbar",'"เ"':"\\prime",'"白"':" ",'"ℸ"':"\\wp",'"퓰"':" ",'"Ө"':"\\theta",'"ⁿ"':"^{n}",'"ℏ"':"\\hbar",'"ℜ"':"\\mathfrak{R}",'"Ѳ"':"\\theta",'"Ø"':"\\emptyset",'"ϱ"':"\\varrho",'"ф"':"\\phi",'"Ρ"':"P",'"ᐁ"':"\\nabla",'"ƞ"':"\\eta",'"ɣ"':"\\gamma",'"ћ"':"\\hbar",'"Ɛ"':"\\varepsilon",'"ⅅ"':"\\_{D}",'"𝜆"':"\\lambda",'"𝑥"':"x",'"𝑦"':"y",'"𝑧"':"z",'"𝑖"':"i",'"𝑗"':"j",'"𝑘"':"k",'"𝑚"':"m",'"𝑒"':"e",'"𝑟"':"r",'"ɳ"':"\\eta",'"Є"':"\\epsilon",'"є"':"\\epsilon",'"𝜀"':"\\epsilon",'"п"':"\\pi",'"Ν"':"\\nu",'"ɵ"':"\\theta",'"ϴ"':"\\theta",'"ɸ"':"\\phi",'"Ӷ"':"\\Gamma",'"ɭ"':"\\ell",'"ʋ"':"\\upsilon",'"𝛟"':"\\varphi",'"Ф"':"\\Phi",'"ⅈ"':"i",'"ο"':"o",'"ơ"':"o",'"ƒ"':"f",'"ṁ"':"m",'"Փ"':"\\Phi",'"ħ"':"\\hbar",'"ፈ"':" ",'"ế"':"\\hat{e}",'"О"':"0",'"Υ"':"Y",'"х"':"x",'"𝓏"':"z",'"𝓎"':"y",'"𝓍"':"x",'"р"':"p",'"а"':"a",'"ℇ"':"\\varepsilon",'"ⅇ"':"\\text{e}",'"ɼ"':"r",'"ἱ"':"i",'"ˆ"':"\\hat{}",'"ϒ"':"\\Upsilon",'"ѳ"':"\\theta",'"П"':"\\prod",'"о"':"o",'"ђ"':"\\hbar",'"Ʌ"':"\\Lambda",'"土"':"\\pm",'"十"':"+",'"ῡ"':"\\bar{u}",'"ȼ"':"c",'"Χ"':"\\mathsf{X}",'"ₙ"':"_{n}",'"T"':"T",'"∙"':"\\cdot",'"〗"':"\\rangle",'"〖"':"\\langle",'";"':";",'"𝛽"':"\\beta",'"⍵"':"\\omega",'"℘"':"\\wp",'"𝜋"':"\\pi",'"𝜓"':"\\psi",'"⍬"':"\\theta",'"𝜑"':"\\varphi",'"⍴"':"\\rho",'"🇽"':"x",'"𝞮"':"\\epsilon",'"𝜙"':"\\phi",'"𝛿"':"\\delta",'"$"':"\\$",'"m"':"m",'"𝚵"':"\\Xi",'"𝑝"':"p",'"𝑞"':"q",'"𝑠"':"s",'"𝑡"':"t",'"𝑢"':"u",'"𝑣"':"v",'"𝑤"':"w",'"𝑎"':"a",'"𝑏"':"b",'"𝑐"':"c",'"𝑑"':"d",'"𝑓"':"f",'"𝑔"':"g",'"𝑙"':"l",'"𝑛"':"n",'"𝑜"':"o",'"𝔀"':"w",'"𝚟"':"v"},e.allMathSymbolsByGlyph={" ":"\\textrm{ }","∃":"\\exists","∀":"\\forall","⇔":"\\iff","⇒":"\\Rightarrow","¬":"\\neg","□":"\\square","⋄":"\\diamond","△":"\\triangle","⌢":"\\frown","∠":"\\angle","⋱":"\\ddots","⋮":"\\vdots","∵":"\\because","∴":"\\therefore","∅":"\\emptyset","±":"\\pm","∇":"\\nabla","∂":"\\partial","∮":"\\oint","∫":"\\int","⋃":"\\cup","∪":"\\cup","⋂":"\\cap","∩":"\\cap","⋁":"\\vee","∨":"\\vee","⋀":"\\wedge","∧":"\\wedge","∏":"\\prod","∑":"\\sum","⊙":"\\bigodot","⊗":"\\bigoplus","⊕":"o+","∘":"@","⋈":"\\bowtie","⋊":"\\rtimes","⋉":"\\ltimes","÷":"\\div","×":"\\times","\\":"\\backslash","⋆":"\\star","∗":"\\star","⋅":"\\cdot","∞":"\\infty","²":"^{2}","∎":"\\blacksquare","⟲":"\\circlearrowleft","⟳":"\\circlearrowright","¥":"\\yen","⁽":"^{(}","⁾":"^{)}","⦵":"\\ominus","⊿":"\\bigtriangleup","↛'":"\\nrightarrow","†":"\\dagger","⿱":" ","✔":"\\checkmark","✗":"\\times","½":"\\dfrac{1}{2}","✓":"\\checkmark","⟩":"\\rangle","⟨":"\\langle","〈":"\\langle","¼":"\\dfrac{1}{4}","…":"\\ldots","൦":"\\circ","┴":"\\perp","✕":"\\times","∣":"\\mid","⎜":"\\mid","⦨":"\\llbracket","¢":"\\cent","⤹":"\\downarrow","⤸":"\\downarrow","⤷":"\\Rsh","⤶":"\\Lsh","⤵":"\\downarrow","⤴":"\\uparrow","⤳":"\\rightarrow","|":"\\mid","⎥":"\\mid","♥":"\\heartsuit","£":"\\pounds","⓪":"\\textcircled{0}","①":"\\textcircled{1}","②":"\\textcircled{2}","③":"\\textcircled{3}","④":"\\textcircled{4}","⑤":"\\textcircled{5}","⑥":"\\textcircled{6}","⑦":"\\textcircled{7}","⑧":"\\textcircled{8}","⑨":"\\textcircled{9}","⑩":"\\textcircled{10}","⑪":"\\textcircled{11}","⑫":"\\textcircled{12}","⑬":"\\textcircled{13}","⑭":"\\textcircled{14}","⑮":"\\textcircled{15}","⑯":"\\textcircled{16}","⑰":"\\textcircled{17}","⑱":"\\textcircled{18}","⑲":"\\textcircled{19}","⑳":"\\textcircled{20}","㉑":"\\textcircled{21}","㉒":"\\textcircled{22}","㉓":"\\textcircled{23}","㉔":"\\textcircled{24}","㉕":"\\textcircled{25}","㉖":"\\textcircled{26}","㉗":"\\textcircled{27}","㉘":"\\textcircled{28}","㉙":"\\textcircled{29}","㉚":"\\textcircled{30}","㉛":"\\textcircled{31}","㉜":"\\textcircled{32}","㉝":"\\textcircled{33}","㉞":"\\textcircled{34}","㉟":"\\textcircled{35}","㊱":"\\textcircled{36}","㊲":"\\textcircled{37}","㊳":"\\textcircled{38}","㊴":"\\textcircled{39}","㊵":"\\textcircled{40}","㊶":"\\textcircled{41}","㊷":"\\textcircled{42}","㊸":"\\textcircled{43}","㊹":"\\textcircled{44}","㊺":"\\textcircled{45}","㊻":"\\textcircled{46}","㊼":"\\textcircled{47}","㊽":"\\textcircled{48}","㊾":"\\textcircled{49}","㊿":"\\textcircled{50}","&":"\\&","‖":"\\parallel","%":"\\%","“":"\\text{``}","#":"\\#","℃":"\\text{\\textdegree C}","℉":"\\text{\\textdegree F}","█":"\\blacksquare","℧":"\\mho","⌋":"\\rfloor","⌊":"\\lfloor","⌉":"\\rceil","⌈":"\\lceil","↛":"\\nrightarrow","‾":"\\overline","→":"\\overrightarrow","‡":"\\ddagger","・":"\\cdot","▱":"\\square","∆":"\\Delta","∡":"\\angle","↓":"\\downarrow","↑":"\\uparrow","»":"\\gg","⊤":"\\top","⧸":"/","˳":"\\cdot","։":":","⦪":"\\measuredangle","⦩":"\\measuredangle","⦫":"\\measuredangle","⦁":"\\cdot","⦢":"\\measuredangle","¸":",","⎻":"\\overline","⟦":"\\llbracket","≈":"\\approx","≤":"\\leq","⎼":"-","≠":"\\neq","←":"\\leftarrow","।":"\\mid","€":"\\euro","˘":" ","∥":"\\parallel","↔":"\\overleftrightarrow","√":"\\sqrt{}","·":"\\cdot","⦬":"\\measuredangle","⦮":"\\measuredangle","⦭":"\\measuredangle","«":"\\ll","│":"\\mid","〉":"\\rangle","▫":"\\square","●":"\\circle","”":'\\"',"◻":"\\square"}},2408:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(1868),e),o(r(598),e),o(r(2335),e),o(r(4104),e),o(r(6626),e),o(r(2103),e),o(r(4317),e)},6626:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.latexAccents=void 0,e.latexAccents=["\\hat","\\bar","\\underbrace","\\overarc","\\overline","\\overbrace","\\overrightarrow","\\overleftrightarrow"]},2103:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mathNumberByGlyph=e.mathNumberByGlyphSpecial=void 0,e.mathNumberByGlyphSpecial={'"ⁿ"':"^{n}",'"ₙ"':"_{n}"},e.mathNumberByGlyph={"₀":"_{0}","₁":"_{1}","₂":"_{2}","₃":"_{3}","₄":"_{4}","₅":"_{5}","₆":"_{6}","₇":"_{7}","₈":"_{8}","₉":"_{9}","⁰":"^{0}","¹":"^{1}","²":"^{2}","³":"^{3}","⁴":"^{4}","⁵":"^{5}","⁶":"^{6}","⁷":"^{7}","⁸":"^{8}","⁹":"^{9}","⓪":"\\textcircled{0}","①":"\\textcircled{1}","②":"\\textcircled{2}","③":"\\textcircled{3}","④":"\\textcircled{4}","⑤":"\\textcircled{5}","⑥":"\\textcircled{6}","⑦":"\\textcircled{7}","⑧":"\\textcircled{8}","⑨":"\\textcircled{9}","⑩":"\\textcircled{10}","⑪":"\\textcircled{11}","⑫":"\\textcircled{12}","⑬":"\\textcircled{13}","⑭":"\\textcircled{14}","⑮":"\\textcircled{15}","⑯":"\\textcircled{16}","⑰":"\\textcircled{17}","⑱":"\\textcircled{18}","⑲":"\\textcircled{19}","⑳":"\\textcircled{20}","㉑":"\\textcircled{21}","㉒":"\\textcircled{22}","㉓":"\\textcircled{23}","㉔":"\\textcircled{24}","㉕":"\\textcircled{25}","㉖":"\\textcircled{26}","㉗":"\\textcircled{27}","㉘":"\\textcircled{28}","㉙":"\\textcircled{29}","㉚":"\\textcircled{30}","㉛":"\\textcircled{31}","㉜":"\\textcircled{32}","㉝":"\\textcircled{33}","㉞":"\\textcircled{34}","㉟":"\\textcircled{35}","㊱":"\\textcircled{36}","㊲":"\\textcircled{37}","㊳":"\\textcircled{38}","㊴":"\\textcircled{39}","㊵":"\\textcircled{40}","㊶":"\\textcircled{41}","㊷":"\\textcircled{42}","㊸":"\\textcircled{43}","㊹":"\\textcircled{44}","㊺":"\\textcircled{45}","㊻":"\\textcircled{46}","㊼":"\\textcircled{47}","㊽":"\\textcircled{48}","㊾":"\\textcircled{49}","㊿":"\\textcircled{50}","½":"\\dfrac{1}{2}","⅓":"\\dfrac{1}{3}","⅔":"\\dfrac{2}{3}","¼":"\\dfrac{1}{4}","¾":"\\dfrac{3}{4}","⅕":"\\dfrac{1}{5}","⅖":"\\dfrac{2}{5}","⅗":"\\dfrac{3}{5}","⅘":"\\dfrac{4}{5}","⅙":"\\dfrac{1}{6}","⅚":"\\dfrac{5}{6}","⅐":"\\dfrac{1}{7}","⅛":"\\dfrac{1}{8}","⅜":"\\dfrac{3}{8}","⅝":"\\dfrac{5}{8}","⅞":"\\dfrac{7}{8}","⅑":"\\dfrac{1}{9}","⅒":"\\dfrac{1}{10}"}},4317:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.HashUTF8ToLtXConverter=void 0,e.HashUTF8ToLtXConverter=class{convert(t){if(t.match(/[a-z0-9]/i))return t;const e=r[t];return e?this.convertAccentCharToLtX(e)||t:this.convertSpecialCharToLtX(t)||t}convertAccentCharToLtX(t){const{char:e,accent:r}=t,o=n[r];return o?`\\${o}{${e}}`:null}convertSpecialCharToLtX(t){const e=o[t];if(!e)return null;const{letter:r,fontCmd:n}=e;return`\\${n}{${r}}`}};const r={"á":{char:"a",accent:"´"},"à":{char:"a",accent:"`"},"â":{char:"a",accent:"^"},"ã":{char:"a",accent:"~"},"ä":{char:"a",accent:"¨"},"å":{char:"a",accent:"˚"},"ą":{char:"a",accent:"˙"},"ă":{char:"a",accent:"˘"},"ǎ":{char:"a",accent:"ˇ"},"ǟ":{char:"a",accent:"ˆ"},"ǻ":{char:"a",accent:"˙"},"ǡ":{char:"a",accent:"-"},"ā":{char:"a",accent:"-"},"é":{char:"e",accent:"´"},"è":{char:"e",accent:"`"},"ê":{char:"e",accent:"^"},"ë":{char:"e",accent:"¨"},"ę":{char:"e",accent:"˙"},"ě":{char:"e",accent:"ˇ"},"ȇ":{char:"i",accent:"^"},"ё":{char:"e",accent:"¨"},"ē":{char:"e",accent:"-"},"í":{char:"i",accent:"´"},"ì":{char:"i",accent:"`"},"î":{char:"i",accent:"^"},"ï":{char:"i",accent:"¨"},"į":{char:"i",accent:"˙"},"ǐ":{char:"i",accent:"ˇ"},"ȉ":{char:"i",accent:"`"},"ȋ":{char:"i",accent:"¨"},"ī":{char:"i",accent:"-"},"ó":{char:"o",accent:"´"},"ò":{char:"o",accent:"`"},"ô":{char:"o",accent:"^"},"õ":{char:"o",accent:"~"},"ö":{char:"o",accent:"¨"},"ő":{char:"o",accent:"˝"},"ǒ":{char:"o",accent:"ˇ"},"ȍ":{char:"o",accent:"`"},"ȏ":{char:"o",accent:"¨"},"ȫ":{char:"o",accent:"˘"},"ȭ":{char:"o",accent:"˝"},"ȯ":{char:"o",accent:"˙"},"ō":{char:"o",accent:"-"},"ú":{char:"u",accent:"´"},"ù":{char:"u",accent:"`"},"û":{char:"u",accent:"^"},"ü":{char:"u",accent:"¨"},"ű":{char:"u",accent:"˝"},"ǔ":{char:"u",accent:"ˇ"},"ǖ":{char:"u",accent:"¨"},"ǘ":{char:"u",accent:"¨"},"ǚ":{char:"u",accent:"¨"},"ǜ":{char:"u",accent:"¨"},"ȕ":{char:"u",accent:"`"},"ȗ":{char:"u",accent:"¨"},"ū":{char:"u",accent:"-"},"ý":{char:"y",accent:"´"},"ỳ":{char:"y",accent:"`"},"ŷ":{char:"y",accent:"^"},"ÿ":{char:"y",accent:"¨"},"ȳ":{char:"y",accent:"-"},"Á":{char:"A",accent:"´"},"À":{char:"A",accent:"`"},"Â":{char:"A",accent:"^"},"Ã":{char:"A",accent:"~"},"Ä":{char:"A",accent:"¨"},"Å":{char:"A",accent:"˚"},"Å":{char:"A",accent:"˚"},"Ȧ":{char:"A",accent:"˙"},"Ă":{char:"A",accent:"˘"},"Ǎ":{char:"A",accent:"ˇ"},"Ǟ":{char:"A",accent:"˝"},"Ǻ":{char:"A",accent:"˚"},"Ǡ":{char:"A",accent:"-"},"Ā":{char:"A",accent:"-"},"É":{char:"E",accent:"´"},"È":{char:"E",accent:"`"},"Ė":{char:"E",accent:"˙"},"Ê":{char:"E",accent:"^"},"Ë":{char:"E",accent:"¨"},"Ě":{char:"E",accent:"ˇ"},"Ȅ":{char:"E",accent:"`"},"Ȇ":{char:"E",accent:"¨"},"Ē":{char:"E",accent:"-"},"Í":{char:"I",accent:"´"},"Ì":{char:"I",accent:"`"},"Î":{char:"I",accent:"^"},"Ï":{char:"I",accent:"¨"},"Ĭ":{char:"I",accent:"˘"},"Ǐ":{char:"I",accent:"ˇ"},"Ȉ":{char:"I",accent:"`"},"Ȋ":{char:"I",accent:"¨"},"Ī":{char:"I",accent:"-"},"Ó":{char:"O",accent:"´"},"Ò":{char:"O",accent:"`"},"Ô":{char:"O",accent:"^"},"Õ":{char:"O",accent:"~"},"Ö":{char:"O",accent:"¨"},"Ő":{char:"O",accent:"˝"},"Ǒ":{char:"O",accent:"ˇ"},"Ȍ":{char:"O",accent:"`"},"Ȏ":{char:"O",accent:"¨"},"Ȫ":{char:"O",accent:"˘"},"Ȭ":{char:"O",accent:"˝"},"Ȯ":{char:"O",accent:"˙"},"Ō":{char:"O",accent:"-"},"Ú":{char:"U",accent:"´"},"Ù":{char:"U",accent:"`"},"Û":{char:"U",accent:"^"},"Ü":{char:"U",accent:"¨"},"Ű":{char:"U",accent:"˝"},"Ǔ":{char:"U",accent:"ˇ"},"Ǖ":{char:"U",accent:"¨"},"Ȕ":{char:"U",accent:"`"},"Ȗ":{char:"U",accent:"¨"},"Ū":{char:"U",accent:"-"},"Ý":{char:"Y",accent:"´"},"Ỳ":{char:"Y",accent:"`"},"Ŷ":{char:"Y",accent:"^"},"Ÿ":{char:"Y",accent:"¨"},"Ȳ":{char:"Y",accent:"-"},"ñ":{char:"n",accent:"~"},"Ñ":{char:"N",accent:"~"},"ç":{char:"c",accent:"˙"},"Ç":{char:"C",accent:"˙"},"ṽ":{char:"v",accent:"~"},"Ṽ":{char:"V",accent:"~"},"ĵ":{char:"j",accent:"^"},"Ĵ":{char:"J",accent:"^"},"ź":{char:"z",accent:"´"},"Ź":{char:"Z",accent:"´"},"Ż":{char:"Z",accent:"^"},"ż":{char:"z",accent:"^"},"Ž":{char:"Z",accent:"ˇ"},"ž":{char:"z",accent:"ˇ"},"ẑ":{char:"z",accent:"ˆ"}},n={"´":"grave","`":"acute","^":"hat","~":"tilde","¨":"ddot","˚":"mathring","˘":"breve","ˇ":"check","˝":"ddot","˙":"dot","-":"bar","ˆ":"hat","˜":"tilde"},o={"𝐀":{letter:"A",fontCmd:"mathbf"},"𝐁":{letter:"B",fontCmd:"mathbf"},"𝐂":{letter:"C",fontCmd:"mathbf"},"𝐃":{letter:"D",fontCmd:"mathbf"},"𝐄":{letter:"E",fontCmd:"mathbf"},"Ε":{letter:"E",fontCmd:"mathbf"},"𝐅":{letter:"F",fontCmd:"mathbf"},"𝐆":{letter:"G",fontCmd:"mathbf"},"𝐇":{letter:"H",fontCmd:"mathbf"},"𝐈":{letter:"I",fontCmd:"mathbf"},"𝐉":{letter:"J",fontCmd:"mathbf"},"𝐊":{letter:"K",fontCmd:"mathbf"},"𝐋":{letter:"L",fontCmd:"mathbf"},"𝐌":{letter:"M",fontCmd:"mathbf"},"𝐍":{letter:"N",fontCmd:"mathbf"},"𝐎":{letter:"O",fontCmd:"mathbf"},"𝐏":{letter:"P",fontCmd:"mathbf"},"𝐐":{letter:"Q",fontCmd:"mathbf"},"𝐑":{letter:"R",fontCmd:"mathbf"},"𝐒":{letter:"S",fontCmd:"mathbf"},"𝐓":{letter:"T",fontCmd:"mathbf"},"𝐔":{letter:"U",fontCmd:"mathbf"},"𝐕":{letter:"V",fontCmd:"mathbf"},"𝐖":{letter:"W",fontCmd:"mathbf"},"𝐗":{letter:"X",fontCmd:"mathbf"},"𝞆":{letter:"X",fontCmd:"mathbf"},"𝐘":{letter:"Y",fontCmd:"mathbf"},"𝐙":{letter:"Z",fontCmd:"mathbf"},"𝟎":{letter:"0",fontCmd:"mathbf"},"𝟏":{letter:"1",fontCmd:"mathbf"},"𝟐":{letter:"2",fontCmd:"mathbf"},"𝟑":{letter:"3",fontCmd:"mathbf"},"𝟒":{letter:"4",fontCmd:"mathbf"},"𝟓":{letter:"5",fontCmd:"mathbf"},"𝟔":{letter:"6",fontCmd:"mathbf"},"𝟕":{letter:"7",fontCmd:"mathbf"},"𝟖":{letter:"8",fontCmd:"mathbf"},"𝟗":{letter:"9",fontCmd:"mathbf"},"𝐴":{letter:"A",fontCmd:"mathit"},"𝐵":{letter:"B",fontCmd:"mathit"},"𝐶":{letter:"C",fontCmd:"mathit"},"𝐷":{letter:"D",fontCmd:"mathit"},"𝐸":{letter:"E",fontCmd:"mathit"},"𝐹":{letter:"F",fontCmd:"mathit"},"𝐺":{letter:"G",fontCmd:"mathit"},"𝐻":{letter:"H",fontCmd:"mathit"},"𝐼":{letter:"I",fontCmd:"mathit"},"Ι":{letter:"I",fontCmd:"mathit"},"𝐽":{letter:"J",fontCmd:"mathit"},"𝐾":{letter:"K",fontCmd:"mathit"},"𝐿":{letter:"L",fontCmd:"mathit"},"𝑀":{letter:"M",fontCmd:"mathit"},"𝑁":{letter:"N",fontCmd:"mathit"},"𝑂":{letter:"O",fontCmd:"mathit"},"𝑃":{letter:"P",fontCmd:"mathit"},"𝑄":{letter:"Q",fontCmd:"mathit"},"𝑅":{letter:"R",fontCmd:"mathit"},"𝑆":{letter:"S",fontCmd:"mathit"},"𝑇":{letter:"T",fontCmd:"mathit"},"𝑈":{letter:"U",fontCmd:"mathit"},"𝑉":{letter:"V",fontCmd:"mathit"},"𝑊":{letter:"W",fontCmd:"mathit"},"𝑋":{letter:"X",fontCmd:"mathit"},"𝑌":{letter:"Y",fontCmd:"mathit"},"𝑍":{letter:"Z",fontCmd:"mathit"},"𝔸":{letter:"A",fontCmd:"mathbb"},"𝔹":{letter:"B",fontCmd:"mathbb"},"ℂ":{letter:"C",fontCmd:"mathbb"},"𝔻":{letter:"D",fontCmd:"mathbb"},"𝔼":{letter:"E",fontCmd:"mathbb"},"𝔽":{letter:"F",fontCmd:"mathbb"},"𝔾":{letter:"G",fontCmd:"mathbb"},"ℍ":{letter:"H",fontCmd:"mathbb"},"𝕀":{letter:"I",fontCmd:"mathbb"},"𝕁":{letter:"J",fontCmd:"mathbb"},"𝕂":{letter:"K",fontCmd:"mathbb"},"𝕃":{letter:"L",fontCmd:"mathbb"},"𝕄":{letter:"M",fontCmd:"mathbb"},"ℕ":{letter:"N",fontCmd:"mathbb"},"𝕆":{letter:"O",fontCmd:"mathbb"},"ℙ":{letter:"P",fontCmd:"mathbb"},"ℚ":{letter:"Q",fontCmd:"mathbb"},"ℝ":{letter:"R",fontCmd:"mathbb"},"𝕊":{letter:"S",fontCmd:"mathbb"},"𝕋":{letter:"T",fontCmd:"mathbb"},"𝕌":{letter:"U",fontCmd:"mathbb"},"𝕍":{letter:"V",fontCmd:"mathbb"},"𝕎":{letter:"W",fontCmd:"mathbb"},"𝕏":{letter:"X",fontCmd:"mathbb"},"𝕐":{letter:"Y",fontCmd:"mathbb"},"ℤ":{letter:"Z",fontCmd:"mathbb"},"𝟘":{letter:"0",fontCmd:"mathbb"},"𝟙":{letter:"1",fontCmd:"mathbb"},"𝟚":{letter:"2",fontCmd:"mathbb"},"𝟛":{letter:"3",fontCmd:"mathbb"},"𝟜":{letter:"4",fontCmd:"mathbb"},"𝟝":{letter:"5",fontCmd:"mathbb"},"𝟞":{letter:"6",fontCmd:"mathbb"},"𝟟":{letter:"7",fontCmd:"mathbb"},"𝟠":{letter:"8",fontCmd:"mathbb"},"𝟡":{letter:"9",fontCmd:"mathbb"},"𝒜":{letter:"A",fontCmd:"mathcal"},"𝓐":{letter:"A",fontCmd:"mathcal"},"ℬ":{letter:"B",fontCmd:"mathcal"},"𝒞":{letter:"C",fontCmd:"mathcal"},"𝒟":{letter:"D",fontCmd:"mathcal"},"𝓓":{letter:"D",fontCmd:"mathcal"},"ℰ":{letter:"E",fontCmd:"mathcal"},"ℱ":{letter:"F",fontCmd:"mathcal"},"𝓕":{letter:"F",fontCmd:"mathcal"},"𝒢":{letter:"G",fontCmd:"mathcal"},"ℋ":{letter:"H",fontCmd:"mathcal"},"ℐ":{letter:"I",fontCmd:"mathcal"},"𝒥":{letter:"J",fontCmd:"mathcal"},"𝒦":{letter:"K",fontCmd:"mathcal"},"ℒ":{letter:"L",fontCmd:"mathcal"},"𝓛":{letter:"L",fontCmd:"mathcal"},"ℳ":{letter:"M",fontCmd:"mathcal"},"𝒩":{letter:"N",fontCmd:"mathcal"},"𝒪":{letter:"O",fontCmd:"mathcal"},"𝓞":{letter:"O",fontCmd:"mathcal"},"𝒫":{letter:"P",fontCmd:"mathcal"},"𝒬":{letter:"Q",fontCmd:"mathcal"},"ℛ":{letter:"R",fontCmd:"mathcal"},"𝕽":{letter:"R",fontCmd:"mathcal"},"℟":{letter:"R",fontCmd:"mathcal"},"𝒮":{letter:"S",fontCmd:"mathcal"},"𝒯":{letter:"T",fontCmd:"mathcal"},"𝒰":{letter:"U",fontCmd:"mathcal"},"𝒱":{letter:"V",fontCmd:"mathcal"},"𝒲":{letter:"W",fontCmd:"mathcal"},"𝒳":{letter:"X",fontCmd:"mathcal"},"𝒴":{letter:"Y",fontCmd:"mathcal"},"𝒵":{letter:"Z",fontCmd:"mathcal"},"𝔄":{letter:"A",fontCmd:"mathfrak"},"𝔅":{letter:"B",fontCmd:"mathfrak"},"ℭ":{letter:"C",fontCmd:"mathfrak"},"𝔇":{letter:"D",fontCmd:"mathfrak"},"𝔈":{letter:"E",fontCmd:"mathfrak"},"𝔉":{letter:"F",fontCmd:"mathfrak"},"𝔊":{letter:"G",fontCmd:"mathfrak"},"ℌ":{letter:"H",fontCmd:"mathfrak"},"ℑ":{letter:"I",fontCmd:"mathfrak"},"𝔍":{letter:"J",fontCmd:"mathfrak"},"𝔎":{letter:"K",fontCmd:"mathfrak"},"𝔏":{letter:"L",fontCmd:"mathfrak"},"𝔐":{letter:"M",fontCmd:"mathfrak"},"𝔑":{letter:"N",fontCmd:"mathfrak"},"𝔒":{letter:"O",fontCmd:"mathfrak"},"𝔓":{letter:"P",fontCmd:"mathfrak"},"𝔔":{letter:"Q",fontCmd:"mathfrak"},"ℜ":{letter:"R",fontCmd:"mathfrak"},"𝔖":{letter:"S",fontCmd:"mathfrak"},"𝔗":{letter:"T",fontCmd:"mathfrak"},"𝔘":{letter:"U",fontCmd:"mathfrak"},"𝔙":{letter:"V",fontCmd:"mathfrak"},"𝔚":{letter:"W",fontCmd:"mathfrak"},"𝔛":{letter:"X",fontCmd:"mathfrak"},"𝔜":{letter:"Y",fontCmd:"mathfrak"},"ℨ":{letter:"Z",fontCmd:"mathfrak"},"𝖠":{letter:"A",fontCmd:"mathsf"},"Α":{letter:"A",fontCmd:"mathsf"},"𝖡":{letter:"B",fontCmd:"mathsf"},"Β":{letter:"B",fontCmd:"mathsf"},"𝖢":{letter:"C",fontCmd:"mathsf"},"𝖣":{letter:"D",fontCmd:"mathsf"},"𝖤":{letter:"E",fontCmd:"mathsf"},"𝖥":{letter:"F",fontCmd:"mathsf"},"𝖦":{letter:"G",fontCmd:"mathsf"},"𝖧":{letter:"H",fontCmd:"mathsf"},"𝖨":{letter:"I",fontCmd:"mathsf"},"𝖩":{letter:"J",fontCmd:"mathsf"},"ȷ":{letter:"J",fontCmd:"mathsf"},"𝖪":{letter:"K",fontCmd:"mathsf"},"Κ":{letter:"K",fontCmd:"mathsf"},"𝖫":{letter:"L",fontCmd:"mathsf"},"𝖬":{letter:"M",fontCmd:"mathsf"},"𝖭":{letter:"N",fontCmd:"mathsf"},"𝖮":{letter:"O",fontCmd:"mathsf"},"𝖯":{letter:"P",fontCmd:"mathsf"},"𝖰":{letter:"Q",fontCmd:"mathsf"},"𝖱":{letter:"R",fontCmd:"mathsf"},"𝖲":{letter:"S",fontCmd:"mathsf"},"𝖳":{letter:"T",fontCmd:"mathsf"},"𝖴":{letter:"U",fontCmd:"mathsf"},"𝖵":{letter:"V",fontCmd:"mathsf"},"𝖶":{letter:"W",fontCmd:"mathsf"},"𝖷":{letter:"X",fontCmd:"mathsf"},"Χ":{letter:"X",fontCmd:"mathsf"},"𝖸":{letter:"Y",fontCmd:"mathsf"},"𝖹":{letter:"Z",fontCmd:"mathsf"},"𝚨":{letter:"A",fontCmd:"mathtt"},"𝚩":{letter:"B",fontCmd:"mathtt"},"𝚪":{letter:"\\Gamma",fontCmd:"mathtt"},"𝚫":{letter:"\\Delta",fontCmd:"mathtt"},"𝚬":{letter:"E",fontCmd:"mathtt"},"𝚭":{letter:"F",fontCmd:"mathtt"},"𝚮":{letter:"G",fontCmd:"mathtt"},"𝚯":{letter:"\\Theta",fontCmd:"mathtt"},"𝚰":{letter:"I",fontCmd:"mathtt"},"𝚱":{letter:"J",fontCmd:"mathtt"},"𝚲":{letter:"\\Lambda",fontCmd:"mathtt"},"𝚳":{letter:"L",fontCmd:"mathtt"},"𝚴":{letter:"M",fontCmd:"mathtt"},"𝚵":{letter:"\\Pi",fontCmd:"mathtt"},"𝚶":{letter:"O",fontCmd:"mathtt"},"𝚷":{letter:"\\Pi",fontCmd:"mathtt"},"𝚸":{letter:"Q",fontCmd:"mathtt"},"𝚹":{letter:"R",fontCmd:"mathtt"},"𝚺":{letter:"S",fontCmd:"mathtt"},"𝚻":{letter:"T",fontCmd:"mathtt"},"𝚼":{letter:"U",fontCmd:"mathtt"},"𝚽":{letter:"\\Phi",fontCmd:"mathtt"},"𝚾":{letter:"W",fontCmd:"mathtt"},"𝚿":{letter:"\\Psi",fontCmd:"mathtt"},"𝛀":{letter:"\\Omega",fontCmd:"mathtt"}}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.MathMLToLaTeX=void 0;var e=r(8863);Object.defineProperty(t,"MathMLToLaTeX",{enumerable:!0,get:function(){return e.MathMLToLaTeX}})})(),n})(),bundle_min.exports=t(),getDefaultExportFromCjs(bundle_min.exports);const _=_dll_lodash,debug$1=_dll_debug;function _extends(){return _extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_extends.apply(this,arguments)}const reduceText=(t,e)=>(e.node&&"text"===e.node.kind&&(t+=e.node.text),t);class Line{constructor(){this.kind="line"}get columns(){return[]}}class Row{constructor(t,e){this.kind="row",this.operator=e,this.columns=t}pad(t,e="right"){if(t<this.columns.length)throw new Error("no");const r=t-this.columns.length,n=_.times(r).map((()=>"__pad__"));return"right"===e?[...n,...this.columns]:[...this.columns,...n]}}const mathNodeToCharArray=t=>t.childNodes.reduce(reduceText,"").split(""),toColumnArray=t=>{if(!t||!t.kind)return[];if("msrow"===t.kind)throw new Error("msrow in msrow?");return"mo"===t.kind?(console.warn("mo that is not 1st node in msrow?"),mathNodeToCharArray(t)):"mn"===t.kind?mathNodeToCharArray(t):t.toCHTML?t:void 0},rowStack=t=>{if(t&&t.kind){if("msrow"===t.kind){if(!t.childNodes||0===t.childNodes.length)return new Row([]);const e=_.first(t.childNodes),r=e&&"mo"===e.kind?_.tail(t.childNodes):t.childNodes,n=_.flatten(r.map(toColumnArray));return new Row(n,"mo"===e.kind?e:void 0)}if("mn"===t.kind){const e=mathNodeToCharArray(t);return new Row(e,void 0)}return"mo"===t.kind?(console.warn("mo on its own row?"),new Row([],t)):"msline"===t.kind?new Line:t.toCHTML?new Row([t]):void 0}},getStackData=t=>t&&t.childNodes?_.compact(t.childNodes.map(rowStack)):[];class CHTMLmstack extends Wrapper$2.CHTMLWrapper{constructor(t,e,r=null){super(t,e,r),this.ce=this.adaptor.document.createElement.bind(this.adaptor.document)}toCHTML(t){const e=this.standardCHTMLnode(t),r=getStackData(this),n=r.reduce(((t,e)=>(e&&e.columns.length>t&&(t=e.columns.length),t)),0),o=this.ce("table");e.appendChild(o),r.forEach((t=>{const e=this.ce("tr");if(o.appendChild(e),"row"===t.kind){const r=this.ce("td");e.appendChild(r),t.operator&&t.operator.toCHTML?(r.setAttribute("class","inner"),t.operator.toCHTML(r)):r.textContent="";t.pad(n,"right").forEach((t=>{const r=this.ce("td");e.appendChild(r),"__pad__"===t?r.textContent="":"string"==typeof t?r.textContent=t:"none"===t.kind?r.textContent="":t.toCHTML&&(r.setAttribute("class","inner"),t.toCHTML(r))}))}else if("line"===t.kind){const t=this.ce("td");e.appendChild(t),t.setAttribute("colspan",n+1),t.setAttribute("class","mjx-line"),t.textContent=""}}))}}CHTMLmstack.styles={"mjx-mstack > table":{"line-height":"initial",border:"solid 0px red","border-spacing":"0em","border-collapse":"separate"},"mjx-mstack > table > tr":{"line-height":"initial"},"mjx-mstack > table > tr > td":{border:"solid 0px blue","font-family":"sans-serif","line-height":"initial"},"mjx-mstack > table > tr > td.inner":{"font-family":"inherit"},"mjx-mstack > table > tr > .mjx-line":{padding:0,"border-top":"solid 1px black"},".TEX-A":{"font-family":"MJXZERO, MJXTEX !important"}};class MmlNone extends MmlNode.AbstractMmlNode{get kind(){return"none"}}class MmlMstack extends MmlNode.AbstractMmlNode{get kind(){return"mstack"}}class MmlMsrow extends MmlNode.AbstractMmlNode{get kind(){return"msrow"}}class MmlMsline extends MmlNode.AbstractMmlNode{get kind(){return"msline"}}const chtmlNodes={mstack:CHTMLmstack},mmlNodes={mstack:MmlMstack,msline:MmlMsline,msrow:MmlMsrow,none:MmlNone},BracketTypes={ROUND_BRACKETS:"round_brackets",SQUARE_BRACKETS:"square_brackets",DOLLAR:"dollar",DOUBLE_DOLLAR:"double_dollar"},PAIRS={[BracketTypes.ROUND_BRACKETS]:["\\(","\\)"],[BracketTypes.SQUARE_BRACKETS]:["\\[","\\]"],[BracketTypes.DOLLAR]:["$","$"],[BracketTypes.DOUBLE_DOLLAR]:["$$","$$"]},wrapMath=(t,e)=>{e===BracketTypes.SQUARE_BRACKETS&&(console.warn("\\[...\\] is not supported yet"),e=BracketTypes.ROUND_BRACKETS),e===BracketTypes.DOUBLE_DOLLAR&&(console.warn("$$...$$ is not supported yet"),e=BracketTypes.DOLLAR);const[r,n]=PAIRS[e]||PAIRS[BracketTypes.ROUND_BRACKETS];return`${r}${t}${n}`},unWrapMath=t=>(-1!==t.indexOf("\\displaystyle")&&(console.warn("\\displaystyle is not supported - removing"),t=t.replace("\\displaystyle","").trim()),t.startsWith("$$")&&t.endsWith("$$")?(console.warn("$$ syntax is not yet supported"),{unwrapped:t.substring(2,t.length-2),wrapType:BracketTypes.DOLLAR}):t.startsWith("$")&&t.endsWith("$")?{unwrapped:t.substring(1,t.length-1),wrapType:BracketTypes.DOLLAR}:t.startsWith("\\[")&&t.endsWith("\\]")?(console.warn("\\[..\\] syntax is not yet supported"),{unwrapped:t.substring(2,t.length-2),wrapType:BracketTypes.ROUND_BRACKETS}):t.startsWith("\\(")&&t.endsWith("\\)")?{unwrapped:t.substring(2,t.length-2),wrapType:BracketTypes.ROUND_BRACKETS}:{unwrapped:t,wrapType:BracketTypes.ROUND_BRACKETS});"undefined"!=typeof window&&RegisterHTMLHandler_1(browserAdaptor_2());let sreReady=!1;system.engineReady().then((()=>{sreReady=!0}));const visitor=new SerializedMmlVisitor.SerializedMmlVisitor,toMMl=t=>visitor.visitTree(t),log$1=debug$1("pie-lib:math-rendering"),NEWLINE_BLOCK_REGEX=/\\embed\{newLine\}\[\]/g,NEWLINE_LATEX="\\newline ",getGlobal=()=>{const t="@pie-lib/math-rendering@2";return"undefined"!=typeof window?(window[t]||(window[t]={}),window[t]):{}},defaultOpts=()=>getGlobal().opts||{},fixMathElement=t=>{if(t.dataset.mathHandled)return;let e="innerText";t.textContent&&(e="textContent"),t[e]&&(t[e]=wrapMath(unWrapMath(t[e]).unwrapped),t[e]=t[e].replace(NEWLINE_BLOCK_REGEX,NEWLINE_LATEX),t.dataset.mathHandled=!0)},fixMathElements=(t=document)=>{t.querySelectorAll("[data-latex]").forEach((t=>fixMathElement(t)))},adjustMathMLStyle=(t=document)=>{t.querySelectorAll("math").forEach((t=>t.setAttribute("displaystyle","true")))};class myFindMathML extends FindMathML_2{processMath(t){const e=this.adaptor;for(const r of Array.from(t))"mjx-assistive-mml"===e.kind(e.parent(r))&&t.delete(r);return super.processMath(t)}}const createMathMLInstance=(t,e=document)=>{(t=t||defaultOpts()).useSingleDollar&&console.warn("[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)");const r=AllPackages_1.filter((t=>"bussproofs"!==t));r.push("autoload");const n={parallelogram:"\\lower.2em{\\Huge\\unicode{x25B1}}",overarc:"\\overparen",napprox:"\\not\\approx",longdiv:"\\enclose{longdiv}"},o=t.useSingleDollar?{packages:r,macros:n,inlineMath:[["$","$"],["\\(","\\)"]],processEscapes:!0}:{packages:r,macros:n},i={parseError:function(t){console.log("error:",t),this.error(this.adaptor.textContent(t).replace(/\n.*/g,""))},FindMathML:new myFindMathML};let a;global$1.MathJax&&global$1.MathJax.version!==mathjax.mathjax.version&&(window.MathJax._=window.MathJax._||{},window.MathJax.config=window.MathJax.config||{},a=window.MathJax,Object.assign(global$1.MathJax,mathjax.mathjax));const s={fontURL:`https://unpkg.com/mathjax-full@${mathjax.mathjax.version}/ts/output/chtml/fonts/tex-woff-v2`,wrapperFactory:new CHTMLWrapperFactory_1(_extends({},CHTMLWrapperFactory_1.defaultNodes,chtmlNodes))},l=new MathML_1(i),c=new MmlFactory_2(_extends({},MmlFactory_2.defaultNodes,mmlNodes)),u=EnrichHandler_1(MenuHandler_2(AssistiveMmlHandler_1(mathjax.mathjax.handlers.handlesDocument(e))),l).create(e,{compileError:(t,e,r)=>{console.log("bad math?:",e),console.error(r)},typesetError:function(t,e,r){console.log("typeset error"),console.error(r),t.typesetError(e,r)},sre:{speech:"deep"},enrichSpeech:"deep",InputJax:[new TeX_1(o),l],OutputJax:new CHTML_1(s),DomStrings:new HTMLDomStrings_2({skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml","mjx-assistive-mml","mjx-container"]})});return l.setMmlFactory(c),a&&(window.MathJax=a),u};let enrichSpeechInitialized=!1;const bootstrap=t=>{if("undefined"==typeof window)return{Typeset:()=>({})};const e=createMathMLInstance(t);return{version:mathjax.mathjax.version,html:e,Typeset:function(...t){const e=(e=!1)=>{var r,n;let o=this.html.findMath(t.length?{elements:t}:{}).compile();!e&&sreReady&&(o=o.enrich()),o=o.getMetrics().typeset().assistiveMml().attachSpeech().addMenu().updateDocument(),enrichSpeechInitialized||"object"!=typeof(null==(r=o.math.list)||null==(n=r.next)?void 0:n.data)||(enrichSpeechInitialized=!0);try{const t=o.math.list;if(t)for(let e=t.next;"symbol"!=typeof e.data;e=e.next){const t=toMMl(e.data.root).replaceAll("\n","");e.data.typesetRoot.setAttribute("data-mathml",t),e.data.typesetRoot.setAttribute("tabindex","-1")}}catch(t){console.error(t.toString())}o.clear()};enrichSpeechInitialized||e(!0),mathjax.mathjax.handleRetriesFor((()=>{e()}))}}},renderMath=(t,e)=>{var r,n;if(window&&window.MathJax&&window.MathJax.customKey&&"@pie-lib/math-rendering-accessible@1"==window.MathJax.customKey)return;const o="string"==typeof t;let i=document.body;if(o){const e=document.createElement("div");e.innerHTML=t,i=e}if(fixMathElements(i),adjustMathMLStyle(i),o){const t=createMathMLInstance(void 0,i).findMath().compile().getMetrics().typeset().updateDocument().math.list.next;if(!t)return"";return toMMl(t.data.root).replaceAll("\n","")}if(getGlobal().instance||(getGlobal().instance=bootstrap(e)),t){if(t instanceof Element&&null!=(r=getGlobal().instance)&&r.Typeset)getGlobal().instance.Typeset(t);else if(t.length&&null!=(n=getGlobal().instance)&&n.Typeset){const e=Array.from(t);getGlobal().instance.Typeset(...e)}}else log$1("el is undefined")};CHTMLmspace_1.styles={"mjx-mspace":{display:"block","text-align":"center",height:"5px"}};var lib={};Object.defineProperty(lib,"__esModule",{value:!0});class ModelSetEvent extends CustomEvent{constructor(t,e,r){super(ModelSetEvent.TYPE,{bubbles:!0,composed:!0,detail:{complete:e,component:t,hasModel:r}}),this.component=t,this.complete=e}}ModelSetEvent.TYPE="model-set";var ModelSetEvent_1=lib.ModelSetEvent=ModelSetEvent;class SessionChangedEvent extends CustomEvent{constructor(t,e){super(SessionChangedEvent.TYPE,{bubbles:!0,composed:!0,detail:{complete:e,component:t}}),this.component=t,this.complete=e}}SessionChangedEvent.TYPE="session-changed";var SessionChangedEvent_1=lib.SessionChangedEvent=SessionChangedEvent;const React=_dll_react,ReactDOM=_dll_react_dom,debug=_dll_debug,log=debug("@pie-elements:extended-text-entry"),domParser=void 0!==typeof window?new DOMParser:{parseFromString:t=>t};function textContent(t){if("string"==typeof t)try{const e=domParser.parseFromString(t,"text/html");return e.body.textContent}catch(e){return log("tried to parse as dom and failed",t),t}}function isComplete(t){const e=textContent(t);return void 0!==e&&e.length>0}class RootExtendedTextEntry extends HTMLElement{constructor(){super(),this._model=null,this._session=null}setLangAttribute(){const t=this._model&&(this._model.language,1)?this._model.language:"",e=t?t.slice(0,2):"en";this.setAttribute("lang",e)}set model(t){this._model=t,this.dispatchEvent(new ModelSetEvent_1(this.tagName.toLowerCase(),!1,!!this._model)),this.render()}set session(t){this._session=t,this.render()}get session(){return this._session}valueChange(t){this._session.value=t,this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(),isComplete(t))),this.render()}annotationsChange(t){this._session.annotations=t,this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(),!0)),this.render()}commentChange(t){this._session.comment=t,this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(),isComplete(t))),this.render()}connectedCallback(){this.setAttribute("aria-label","Written Response Question"),this.setAttribute("role","region"),this.render()}render(){if(this._model&&this._session){let t=React.createElement(Main$1,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),ReactDOM.render(t,this,(()=>{renderMath(this)}))}}}export{RootExtendedTextEntry as default,isComplete,textContent};