(()=>{"use strict";var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{FindTeX:()=>K});var r={};t.r(r),t.d(r,{default:()=>V});var s={};t.r(s),t.d(s,{default:()=>et});var i={};t.r(i),t.d(i,{ConfigurationType:()=>rt,HandlerType:()=>st});var n={};t.r(n),t.d(n,{UnitUtil:()=>nt});var a={};t.r(a),t.d(a,{default:()=>at});var o={};t.r(o),t.d(o,{default:()=>ct});var c={};t.r(c),t.d(c,{BaseItem:()=>ht,MmlStack:()=>lt});var l={};t.r(l),t.d(l,{TexConstant:()=>ut});var h={};t.r(h),t.d(h,{default:()=>dt});var u={};t.r(u),t.d(u,{default:()=>ft});var d={};t.r(d),t.d(d,{NodeFactory:()=>bt});var m={};t.r(m),t.d(m,{KeyValueDef:()=>kt,KeyValueTypes:()=>vt,ParseUtil:()=>Mt});var p={};t.r(p),t.d(p,{ColumnParser:()=>wt});var g={};t.r(g),t.d(g,{default:()=>Et});var f={};t.r(f),t.d(f,{AbstractTags:()=>It,AllTags:()=>Nt,Label:()=>St,NoTags:()=>Lt,TagInfo:()=>Ct,TagsFactory:()=>Bt});var b={};t.r(b),t.d(b,{Macro:()=>Gt,Token:()=>Dt});var y={};t.r(y),t.d(y,{AbstractParseMap:()=>Kt,AbstractTokenMap:()=>_t,CharacterMap:()=>Xt,CommandMap:()=>qt,DelimiterMap:()=>Ht,EnvironmentMap:()=>$t,MacroMap:()=>zt,RegExpMap:()=>jt,parseResult:()=>Ut});var A={};t.r(A),t.d(A,{MapHandler:()=>Zt,SubHandler:()=>Yt,SubHandlers:()=>Qt});var k={};t.r(k),t.d(k,{Configuration:()=>te,ConfigurationHandler:()=>re,ParserConfiguration:()=>se});var v={};t.r(v),t.d(v,{ArrayItem:()=>Ee,BeginItem:()=>ye,BreakItem:()=>be,CellItem:()=>Pe,CloseItem:()=>le,DotsItem:()=>Oe,EndItem:()=>Ae,EqnArrayItem:()=>Se,EquationItem:()=>Ie,FnItem:()=>Me,LeftItem:()=>pe,Middle:()=>ge,MmlItem:()=>Te,MstyleItem:()=>Ce,NonscriptItem:()=>xe,NotItem:()=>we,NullItem:()=>he,OpenItem:()=>ce,OverItem:()=>me,PositionItem:()=>ve,PrimeItem:()=>ue,RightItem:()=>fe,StartItem:()=>ae,StopItem:()=>oe,StyleItem:()=>ke,SubsupItem:()=>de});var P={};t.r(P),t.d(P,{default:()=>je,splitAlignArray:()=>Ge});var T={};t.r(T),t.d(T,{default:()=>He});var M={};t.r(M),t.d(M,{BaseConfiguration:()=>tr,BaseTags:()=>Qe,Other:()=>Ye});var w={};t.r(w),t.d(w,{TeX:()=>er});const x=("undefined"!=typeof window?window:global).MathJax._.components.global,O=(x.GLOBAL,x.isObject,x.combineConfig,x.combineDefaults,x.combineWithMathJax),E=(x.MathJax,MathJax._.core.InputJax.AbstractInputJax),S=MathJax._.util.Options,C=(S.isObject,S.APPEND,S.REMOVE,S.OPTIONS,S.Expandable,S.expandable,S.makeArray,S.keys,S.copy,S.insert),I=S.defaultOptions,L=S.userOptions,N=(S.selectOptions,S.selectOptionsFromKeys,S.separateOptions),F=S.lookup,R=MathJax._.core.FindMath.AbstractFindMath,B=MathJax._.util.string,D=B.sortLength,G=B.quotePattern,U=(B.unicodeChars,B.unicodeString,B.isPercent,B.split,B.replaceUnicode),_=(B.toEntity,MathJax._.core.MathItem),j=_.protoItem;_.AbstractMathItem,_.STATE,_.newState;class K extends R{constructor(t){super(t),this.getPatterns()}getPatterns(){const t=this.options,e=[],r=[],s=[];this.end={},this.env=this.sub=0;let i=1;t.inlineMath.forEach((t=>this.addPattern(e,t,!1))),t.displayMath.forEach((t=>this.addPattern(e,t,!0))),e.length&&r.push(e.sort(D).join("|")),t.processEnvironments&&(r.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=i,i++),t.processEscapes&&s.push("\\\\([\\\\$])"),t.processRefs&&s.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),s.length&&(r.push("("+s.join("|")+")"),this.sub=i),this.start=new RegExp(r.join("|"),"g"),this.hasPatterns=r.length>0}addPattern(t,e,r){const[s,i]=e;t.push(G(s)),this.end[s]=[i,r,this.endPattern(i)]}endPattern(t,e){return new RegExp((e||G(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")}findEnd(t,e,r,s){const[i,n,a]=s,o=a.lastIndex=r.index+r[0].length;let c,l=0;for(;c=a.exec(t);){if((c[1]||c[0])===i&&0===l)return j(r[0],t.substring(o,c.index),c[0],e,r.index,c.index+c[0].length,n);"{"===c[0]?l++:"}"===c[0]&&l&&l--}return null}findMathInString(t,e,r){let s,i;for(this.start.lastIndex=0;s=this.start.exec(r);){if(void 0!==s[this.env]&&this.env){const t="\\\\end\\s*(\\{"+G(s[this.env])+"\\})";i=this.findEnd(r,e,s,["{"+s[this.env]+"}",!0,this.endPattern(null,t)]),i&&(i.math=i.open+i.math+i.close,i.open=i.close="")}else if(void 0!==s[this.sub]&&this.sub){const t=s[this.sub],r=s.index+s[this.sub].length;i=2===t.length?j("\\",t.substring(1),"",e,s.index,r):j("",t,"",e,s.index,r,!1)}else i=this.findEnd(r,e,s,this.end[s[0]]);i&&(t.push(i),this.start.lastIndex=i.end.n)}}findMath(t){const e=[];if(this.hasPatterns)for(let r=0,s=t.length;rString.fromCodePoint(parseInt(t,16)),getChildren:t=>t.childNodes,getText:t=>t.getText(),appendChildren(t,e){for(const r of e)t.appendChild(r)},setAttribute(t,e,r){t.attributes.set(e,r)},setProperty(t,e,r){t.setProperty(e,r)},setProperties(t,e){for(const r of Object.keys(e)){const s=e[r];"texClass"===r?(t.texClass=s,t.setProperty(r,s)):"movablelimits"===r?(t.setProperty("movablelimits",s),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",s)):"inferred"===r||(J.attrs.has(r)?t.setProperty(r,s):t.attributes.set(r,s))}},getProperty:(t,e)=>t.getProperty(e),getAttribute:(t,e)=>t.attributes.get(e),removeAttribute(t,e){t.attributes.unset(e)},removeProperties(t,...e){t.removeProperty(...e)},getChildAt:(t,e)=>t.childNodes[e],setChild(t,e,r){t.childNodes[e]=r,r&&(r.parent=t)},copyChildren(t,e){const r=t.childNodes;for(let t=0;tt.isKind(e),isEmbellished:t=>t.isEmbellished,getTexClass:t=>t.texClass,getCoreMO:t=>t.coreMO(),isNode:t=>t instanceof z||t instanceof q,isInferred:t=>t.isInferred,getForm(t){if(!t.isKind("mo"))return null;const e=t,r=e.getForms();for(const t of r){const r=this.getOp(e,t);if(r)return r}return null},getOp:(t,e="infix")=>$.OPTABLE[e][t.getText()]||null,getMoAttribute(t,e){var r,s;if(!t.attributes.isSet(e))for(const i of["infix","postfix","prefix"]){const n=null===(s=null===(r=this.getOp(t,i))||void 0===r?void 0:r[3])||void 0===s?void 0:s[e];if(void 0!==n)return n}return t.attributes.get(e)}},V=J;function W(t,e,r){const s=e.attributes,i=r.attributes;t.forEach((t=>{const e=i.getExplicit(t);null!=e&&s.set(t,e)}))}function Z(t,e){const r=(t,e)=>t.getExplicitNames().filter((r=>r!==e&&("stretchy"!==r||t.getExplicit("stretchy"))&&"data-latex"!==r&&"data-latex-item"!==r)),s=t.attributes,i=e.attributes,n=r(s,"lspace"),a=r(i,"rspace");if(n.length!==a.length)return!1;for(const t of n)if(s.getExplicit(t)!==i.getExplicit(t))return!1;return!0}function Y(t,e,r){const s=[];for(const i of t.getList("m"+e+r)){const n=i.childNodes;if(n[i[e]]&&n[i[r]])continue;const a=i.parent,o=n[i[e]]?t.nodeFactory.create("node","m"+e,[n[i.base],n[i[e]]]):t.nodeFactory.create("node","m"+r,[n[i.base],n[i[r]]]);V.copyAttributes(i,o),a.replaceChild(o,i),s.push(i)}t.removeFromList("m"+e+r,s)}function Q(t,e,r){const s=[];for(const i of t.getList(e)){if(i.attributes.get("displaystyle"))continue;const e=i.childNodes[i.base],n=e.coreMO();if(e.getProperty("movablelimits")&&!n.attributes.hasExplicit("movablelimits")){const e=t.nodeFactory.create("node",r,i.childNodes);V.copyAttributes(i,e),i.parent.replaceChild(e,i),s.push(i)}}t.removeFromList(e,s)}const tt={cleanStretchy(t){const e=t.data;for(const t of e.getList("fixStretchy"))if(V.getProperty(t,"fixStretchy")){const r=V.getForm(t);r&&r[3]&&r[3].stretchy&&V.setAttribute(t,"stretchy",!1);const s=t.parent;if(!(V.getTexClass(t)||r&&r[2])){const r=e.nodeFactory.create("node","TeXAtom",[t]);s.replaceChild(r,t),r.inheritAttributesFrom(t)}V.removeProperties(t,"fixStretchy")}},cleanAttributes(t){t.data.root.walkTree(((t,e)=>{const r=t.attributes,s=new Set((r.get("mjx-keep-attrs")||"").split(/ /));r.unset("mjx-keep-attrs");for(const e of r.getExplicitNames())s.has(e)||r.get(e)!==t.attributes.getInherited(e)||r.unset(e)}),{})},combineRelations(t){const e=[];for(const r of t.data.getList("mo")){if(r.getProperty("relationsCombined")||!r.parent||r.parent&&!V.isType(r.parent,"mrow")||V.getTexClass(r)!==H.REL)continue;let t;const s=r.parent.childNodes,i=s.indexOf(r)+1,n=V.getProperty(r,"variantForm");for(;i"data-latex"!==t.substring(0,10))).length){const i=t.childNodes[0].childNodes[0];s.forEach((t=>i.attributes.set(t,e.get(t)))),t.parent.replaceChild(i,t),r.push(t)}}e.removeFromList("mstyle",r)}},et=tt;var rt,st;!function(t){t.HANDLER="handler",t.FALLBACK="fallback",t.ITEMS="items",t.TAGS="tags",t.OPTIONS="options",t.NODES="nodes",t.PREPROCESSORS="preprocessors",t.POSTPROCESSORS="postprocessors",t.INIT="init",t.CONFIG="config",t.PRIORITY="priority",t.PARSER="parser"}(rt||(rt={})),function(t){t.DELIMITER="delimiter",t.MACRO="macro",t.CHARACTER="character",t.ENVIRONMENT="environment"}(st||(st={}));const it=7.2;const nt={UNIT_CASES:new class{constructor(t){this.num="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",this.unit="",this.dimenEnd=/./,this.dimenRest=/./,this.map=new Map(t),this.updateDimen()}updateDimen(){this.unit=`(${Array.from(this.map.keys()).join("|")})`,this.dimenEnd=RegExp("^\\s*"+this.num+"\\s*"+this.unit+"\\s*$"),this.dimenRest=RegExp("^\\s*"+this.num+"\\s*"+this.unit+" ?")}set(t,e){return this.map.set(t,e),this.updateDimen(),this}get(t){return this.map.get(t)||this.map.get("pt")}delete(t){return!!this.map.delete(t)&&(this.updateDimen(),!0)}}([["em",1],["ex",.43],["pt",.1],["pc",1.2],["px",.1],["in",it],["cm",it/2.54],["mm",it/25.4],["mu",1/18]]),matchDimen(t,e=!1){const r=t.match(e?nt.UNIT_CASES.dimenRest:nt.UNIT_CASES.dimenEnd);return r?function([t,e,r]){return"mu"!==e?[t,e,r]:[nt.em(nt.UNIT_CASES.get(e)*parseFloat(t)).slice(0,-2),"em",r]}([r[1].replace(/,/,"."),r[4],r[0].length]):[null,null,0]},dimen2em(t){const[e,r]=nt.matchDimen(t),s=parseFloat(e||"1");return nt.UNIT_CASES.get(r)*s},em:t=>Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em",trimSpaces(t){if("string"!=typeof t)return t;let e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e}};class at{constructor(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}set env(t){this._env=t}get env(){return this._env}Push(...t){for(const e of t){if(!e)continue;const t=V.isNode(e)?this._factory.create("mml",e):e;t.global=this.global;const[r,s]=this.stack.length?this.Top().checkItem(t):[null,!0];s&&(r?(this.Pop(),this.Push(...r)):(t.isKind("null")||this.stack.push(t),t.env?(t.copyEnv&&Object.assign(t.env,this.env),this.env=t.env):t.env=this.env))}}Pop(){const t=this.stack.pop();return t.isOpen||delete t.env,this.env=this.stack.length?this.Top().env:{},t}Top(t=1){return this.stack.length="0"&&s<="9")r[t]=e[parseInt(r[t],10)-1],"number"==typeof r[t]&&(r[t]=r[t].toString());else if("{"===s)if(s=r[t].substring(1),s>="0"&&s<="9")r[t]=e[parseInt(r[t].substring(1,r[t].length-1),10)-1],"number"==typeof r[t]&&(r[t]=r[t].toString());else{r[t].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(r[t]="%"+r[t])}}return r.join("")}constructor(t,e,...r){this.id=t,this.message=ot.processString(e,r)}}ot.pattern=/%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;const ct=ot;class lt{constructor(t){this._nodes=t,this.startStr="",this.startI=0,this.stopI=0}get nodes(){return this._nodes}Push(...t){this._nodes.push(...t)}Pop(){return this._nodes.pop()}get First(){return this._nodes[this.Size()-1]}set First(t){this._nodes[this.Size()-1]=t}get Last(){return this._nodes[0]}set Last(t){this._nodes[0]=t}Peek(t){return null==t&&(t=1),this._nodes.slice(this.Size()-t)}Size(){return this._nodes.length}Clear(){this._nodes=[]}toMml(t=!0,e){return 1!==this._nodes.length||e?this.create("node",t?"inferredMrow":"mrow",this._nodes,{}):this.First}create(t,...e){return this.factory.configuration.nodeFactory.create(t,...e)}}class ht extends lt{constructor(t,...e){super(e),this.factory=t,this.global={},this._properties={},this.isOpen&&(this._env={})}get kind(){return"base"}get env(){return this._env}set env(t){this._env=t}get copyEnv(){return!0}getProperty(t){return this._properties[t]}setProperty(t,e){return this._properties[t]=e,this}get isOpen(){return!1}get isClose(){return!1}get isFinal(){return!1}isKind(t){return t===this.kind}checkItem(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 ht.fail;throw new ct("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){const[e,r]=this.getErrors(t.kind);throw new ct(e,r,t.getName())}return t.isFinal?(this.Push(t.First),ht.fail):ht.success}clearEnv(){for(const t of Object.keys(this.env))delete this.env[t]}setProperties(t){return Object.assign(this._properties,t),this}getName(){return this.getProperty("name")}toString(){return this.kind+"["+this.nodes.join("; ")+"]"}getErrors(t){return this.constructor.errors[t]||ht.errors[t]}}ht.fail=[null,!1],ht.success=[null,!0],ht.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"]};const ut={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"},Form:{PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},LineBreak:{AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},LineBreakStyle:{BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},IndentAlign:{LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},IndentShift:{INDENTSHIFT:"indentshift"},LineThickness:{THIN:"thin",MEDIUM:"medium",THICK:"thick"},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"},Align:{TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},Lines:{NONE:"none",SOLID:"solid",DASHED:"dashed"},Side:{LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},Width:{AUTO:"auto",FIT:"fit"},Actiontype:{TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},Overflow:{LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},Unit:{EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"},Attr:{LATEX:"data-latex",LATEXITEM:"data-latex-item"}};class dt{constructor(t,e,r){this._string=t,this.configuration=r,this.macroCount=0,this.i=0,this.currentCS="",this.saveI=0;const s=Object.hasOwn(e,"isInner"),i=e.isInner;let n;if(delete e.isInner,e){n={};for(const t of Object.keys(e))n[t]=e[t]}this.configuration.pushParser(this),this.stack=new at(this.itemFactory,n,!s||i),this.Parse(),this.Push(this.itemFactory.create("stop")),this.updateResult(this.string,this.i),this.stack.env=n}get options(){return this.configuration.options}get itemFactory(){return this.configuration.itemFactory}get tags(){return this.configuration.tags}set string(t){this._string=t}get string(){return this._string}parse(t,e){const r=this.saveI;this.saveI=this.i;const s=this.configuration.handlers.get(t).parse(e);return this.updateResult(e[1],r),this.saveI=r,s}lookup(t,e){return this.configuration.handlers.get(t).lookup(e)}contains(t,e){return this.configuration.handlers.get(t).contains(e)}toString(){let t="";for(const e of Array.from(this.configuration.handlers.keys()))t+=e+": "+this.configuration.handlers.get(e)+"\n";return t}Parse(){let t;for(;this.it.includes(e)),(t=>t))}constructor(t,e,r){this.name=t,this.verify=e,this.convert=r}}const vt={boolean:new kt("boolean",(t=>"true"===t||"false"===t),(t=>"true"===t)),number:new kt("number",(t=>!!t.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/)),(t=>parseFloat(t))),integer:new kt("integer",(t=>!!t.match(/^[-+]?\d+$/)),(t=>parseInt(t))),string:new kt("string",(t=>!0),(t=>t)),dimen:new kt("dimen",(t=>null!==nt.matchDimen(t)[0]),(t=>t))};function Pt(t,e){if(0===e)return t.replace(/^\s+/,"").replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/,"$1$2");for(;e>0;)t=t.trim().slice(1,-1),e--;return t}function Tt(t,e,r=!1,s=!1){const i=t.length;let n=0,a="",o=0,c=0,l=!0;for(;on&&(c=n),l=!1}a+=s}if(n)throw new ct("ExtraOpenMissingClose","Extra open brace or missing close brace");return s&&c?["","",Pt(a,1)]:[Pt(a,r?Math.min(1,c):c),"",t.slice(o)]}const Mt={cols:(...t)=>t.map((t=>nt.em(t))).join(" "),fenced(t,e,r,s,i="",n=""){const a=t.nodeFactory,o=a.create("node","mrow",[],{open:e,close:s,texClass:H.INNER});let c;if(i)c=new dt("\\"+i+"l"+e,t.parser.stack.env,t).mml();else{const t=a.create("text",e);c=a.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:H.OPEN},t)}if(V.appendChildren(o,[c,r]),i)c=new dt("\\"+i+"r"+s,t.parser.stack.env,t).mml();else{const t=a.create("text",s);c=a.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:H.CLOSE},t)}return n&&c.attributes.set("mathcolor",n),V.appendChildren(o,[c]),o},fixedFence(t,e,r,s){const i=t.nodeFactory.create("node","mrow",[],{open:e,close:s,texClass:H.ORD});return e&&V.appendChildren(i,[Mt.mathPalette(t,e,"l")]),V.isType(r,"mrow")?V.appendChildren(i,V.getChildren(r)):V.appendChildren(i,[r]),s&&V.appendChildren(i,[Mt.mathPalette(t,s,"r")]),i},mathPalette(t,e,r){"{"!==e&&"}"!==e||(e="\\"+e);const s="{\\big"+r+" "+e+"}";return new dt("\\mathchoice"+("{\\bigg"+r+" "+e+"}")+s+s+s,{},t).mml()},fixInitialMO(t,e){for(let r=0,s=e.length;r1&&(c=[t.create("node","mrow",c)]),c},internalText(t,e,r){e=e.replace(/\n+/g," ").replace(/^ +/,At.nbsp).replace(/ +$/,At.nbsp);const s=t.create("text",e);return t.create("node","mtext",[],r,s)},underOver(t,e,r,s,i){if(Mt.checkMovableLimits(e),V.isType(e,"munderover")&&V.isEmbellished(e)){V.setProperties(V.getCoreMO(e),{lspace:0,rspace:0});const r=t.create("node","mo",[],{rspace:0});e=t.create("node","mrow",[r,e])}const n=t.create("node","munderover",[e]);V.setChild(n,"over"===s?n.over:n.under,r);let a=n;return i&&(a=t.create("node","TeXAtom",[t.create("node","mstyle",[n],{displaystyle:!0,scriptlevel:0})],{texClass:H.OP,movesupsub:!0})),V.setProperty(a,"subsupOK",!0),a},checkMovableLimits(t){const e=V.isType(t,"mo")?V.getForm(t):null;(V.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&V.setProperties(t,{movablelimits:!1})},setArrayAlign:(t,e,r)=>(r||(e=nt.trimSpaces(e||"")),"t"===e?t.arraydef.align="baseline 1":"b"===e?t.arraydef.align="baseline -1":"c"===e?t.arraydef.align="axis":e&&(r?(r.string=`[${e}]`+r.string.slice(r.i),r.i=0):t.arraydef.align=e),t),substituteArgs(t,e,r){let s="",i="",n=0;for(;ne.length)throw new ct("IllegalMacroParam","Illegal macro parameter reference");i=Mt.addArgs(t,Mt.addArgs(t,i,s),e[parseInt(a,10)-1]),s=""}else s+=a}return Mt.addArgs(t,i,s)},addArgs(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 ct("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+r},checkMaxMacros(t,e=!0){if(!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new ct("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new ct("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},checkEqnEnv(t,e=!0){const r=t.stack.Top(),s=r.First;if(!(r.getProperty("nestable")&&e&&!s||r.getProperty("nestStart"))&&(!r.isKind("start")||s))throw new ct("ErroneousNestingEq","Erroneous nesting of equation structures")},copyNode(t,e){const r=t.copy(),s=e.configuration;return r.walkTree((t=>{s.addNode(t.kind,t);const e=(t.getProperty("in-lists")||"").split(/,/);for(const r of e)r&&s.addNode(r,t)})),r},mmlFilterAttribute:(t,e,r)=>r,getFontDef(t){const e=t.stack.env.font;return e?{mathvariant:e}:{}},keyvalOptions(t,e=null,r=!1,s=!1){const i=function(t,e=!1){const r={};let s,i,n,a=t,o=!0;for(;a;)[i,s,a]=Tt(a,["=",","],e,o),o=!1,"="===s?([n,s,a]=Tt(a,[","],e),n="false"===n||"true"===n?JSON.parse(n):n,r[i]=n):i&&(r[i]=!0);return r}(t,s);if(e)for(const t of Object.keys(i))if(Object.hasOwn(e,t)){if(e[t]instanceof kt){const r=e[t],s=String(i[t]);if(!r.verify(s))throw new ct("InvalidValue","Value for key '%1' is not of the expected type",t);i[t]=r.convert(s)}}else{if(r)throw new ct("InvalidOption","Invalid option: %1",t);delete i[t]}return i},isLatinOrGreekChar:t=>!!t.normalize("NFD").match(/[a-zA-Z\u0370-\u03F0]/)};class wt{constructor(){this.columnHandler={l:t=>t.calign[t.j++]="left",c:t=>t.calign[t.j++]="center",r:t=>t.calign[t.j++]="right",p:t=>this.getColumn(t,"top"),m:t=>this.getColumn(t,"middle"),b:t=>this.getColumn(t,"bottom"),w:t=>this.getColumn(t,"top",""),W:t=>this.getColumn(t,"top",""),"|":t=>this.addRule(t,"solid"),":":t=>this.addRule(t,"dashed"),">":t=>t.cstart[t.j]=(t.cstart[t.j]||"")+this.getBraces(t),"<":t=>t.cend[t.j-1]=(t.cend[t.j-1]||"")+this.getBraces(t),"@":t=>this.addAt(t,this.getBraces(t)),"!":t=>this.addBang(t,this.getBraces(t)),"*":t=>this.repeat(t),P:t=>this.macroColumn(t,">{$}p{#1}<{$}",1),M:t=>this.macroColumn(t,">{$}m{#1}<{$}",1),B:t=>this.macroColumn(t,">{$}b{#1}<{$}",1)," ":t=>{}},this.MAXCOLUMNS=1e4}process(t,e,r){const s={parser:t,template:e,i:0,j:0,c:"",cwidth:[],calign:[],cspace:[],clines:[],cstart:r.cstart,cend:r.cend,ralign:r.ralign,cextra:r.cextra};let i=0;for(;s.ithis.MAXCOLUMNS)throw new ct("MaxColumns","Too many column specifiers (perhaps looping column definitions?)");const t=s.template.codePointAt(s.i),e=s.c=String.fromCodePoint(t);if(s.i+=e.length,!Object.hasOwn(this.columnHandler,e))throw new ct("BadPreamToken","Illegal pream-token (%1)",e);this.columnHandler[e](s)}this.setColumnAlign(s,r),this.setColumnWidths(s,r),this.setColumnSpacing(s,r),this.setColumnLines(s,r),this.setPadding(s,r)}setColumnAlign(t,e){e.arraydef.columnalign=t.calign.join(" ")}setColumnWidths(t,e){if(!t.cwidth.length)return;const r=[...t.cwidth];r.lengtht||"auto")).join(" ")}setColumnSpacing(t,e){if(!t.cspace.length)return;const r=[...t.cspace];r.lengtht||"1em")).join(" ")}setColumnLines(t,e){if(!t.clines.length)return;const r=[...t.clines];r[0]&&e.frame.push(["left",r[0]]),r.length>t.calign.length?e.frame.push(["right",r.pop()]):r.length1&&(e.arraydef.columnlines=r.slice(1).map((t=>t||"none")).join(" "))}setPadding(t,e){if(!t.cextra[0]&&!t.cextra[t.calign.length-1])return;const r=t.calign.length-1,s=t.cspace,i=t.cextra[r]?s[r]:null;e.arraydef["data-array-padding"]=`${s[0]||".5em"} ${i||".5em"}`}getColumn(t,e,r="left"){t.calign[t.j]=r||this.getAlign(t),t.cwidth[t.j]=this.getDimen(t),t.ralign[t.j]=[e,t.cwidth[t.j],t.calign[t.j]],t.j++}getDimen(t){const e=this.getBraces(t);if(!nt.matchDimen(e)[0])throw new ct("MissingColumnDimOrUnits","Missing dimension or its units for %1 column declaration",t.c);return e}getAlign(t){const e=this.getBraces(t);return F(e.toLowerCase(),{l:"left",c:"center",r:"right"},"")}getBraces(t){for(;" "===t.template[t.i];)t.i++;if(t.i>=t.template.length)throw new ct("MissingArgForColumn","Missing argument for %1 column declaration",t.c);if("{"!==t.template[t.i])return t.template[t.i++];const e=++t.i;let r=1;for(;t.i0&&r--;)s.push(this.getBraces(t));t.template=Mt.substituteArgs(t.parser,s,e)+t.template.slice(t.i),t.i=0}addRule(t,e){t.clines[t.j]&&this.addAt(t,"\\,"),t.clines[t.j]=e,"0"===t.cspace[t.j]&&(t.cstart[t.j]="\\hspace{.5em}")}addAt(t,e){const{cstart:r,cspace:s,j:i}=t;t.cextra[i]=!0,t.calign[i]="center",t.clines[i]&&(".5em"===s[i]?r[i-1]+="\\hspace{.25em}":s[i]||(t.cend[i-1]=(t.cend[i-1]||"")+"\\hspace{.5em}")),r[i]=e,s[i]="0",s[++t.j]="0"}addBang(t,e){const{cstart:r,cspace:s,j:i}=t;t.cextra[i]=!0,t.calign[i]="center",r[i]=("0"===s[i]&&t.clines[i]?"\\hspace{.25em}":"")+e,s[i]||(s[i]=".5em"),s[++t.j]=".5em"}repeat(t){const e=this.getBraces(t),r=this.getBraces(t),s=parseInt(e);if(String(s)!==e)throw new ct("ColArgNotNum","First argument to %1 column specifier must be a number","*");t.template=new Array(s).fill(r).join("")+t.template.substring(t.i),t.i=0}}const xt=ut.Variant;class Ot{constructor(t,e=[]){this.options={},this.columnParser=new wt,this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new bt,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new ft(t.items),this.itemFactory.configuration=this,I(this.options,...e),I(this.options,t.options),this.mathStyle=Ot.getVariant.get(this.options.mathStyle)||Ot.getVariant.get("TeX")}pushParser(t){this.parsers.unshift(t)}popParser(){this.parsers.shift()}get parser(){return this.parsers[0]}clear(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()}addNode(t,e){let r=this.nodeLists[t];if(r||(r=this.nodeLists[t]=[]),r.push(e),e.kind!==t){const r=V.getProperty(e,"in-lists")||"",s=(r?r.split(/,/):[]).concat(t).join(",");V.setProperty(e,"in-lists",s)}}getList(t){const e=this.nodeLists[t]||[],r=[];for(const t of e)this.inTree(t)&&r.push(t);return this.nodeLists[t]=r,r}removeFromList(t,e){const r=this.nodeLists[t]||[];for(const t of e){const e=r.indexOf(t);e>=0&&r.splice(e,1)}}inTree(t){for(;t&&t!==this.root;)t=t.parent;return!!t}}Ot.getVariant=new Map([["TeX",(t,e)=>e&&t.match(/^[\u0391-\u03A9\u03F4]/)?xt.NORMAL:""],["ISO",t=>xt.ITALIC],["French",t=>t.normalize("NFD").match(/^[a-z]/)?xt.ITALIC:xt.NORMAL],["upright",t=>xt.NORMAL]]);const Et=Ot;class St{constructor(t="???",e=""){this.tag=t,this.id=e}}class Ct{constructor(t="",e=!1,r=!1,s=null,i="",n="",a=!1,o=""){this.env=t,this.taggable=e,this.defaultTags=r,this.tag=s,this.tagId=i,this.tagFormat=n,this.noTag=a,this.labelId=o}}class It{constructor(){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 Ct,this.history=[],this.stack=[],this.enTag=function(t,e){const r=this.configuration.nodeFactory,s=r.create("node","mtd",[t]),i=r.create("node","mlabeledtr",[e,s]);return r.create("node","mtable",[i],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}start(t,e,r){this.currentTag&&this.stack.push(this.currentTag);const s=this.label;this.currentTag=new Ct(t,e,r),this.label=s}get env(){return this.currentTag.env}end(){this.history.push(this.currentTag);const t=this.label;this.currentTag=this.stack.pop(),t&&!this.label&&(this.label=t)}tag(t,e){this.currentTag.tag=t,this.currentTag.tagFormat=e?t:this.formatTag(t),this.currentTag.noTag=!1}notag(){this.tag("",!0),this.currentTag.noTag=!0}get noTag(){return this.currentTag.noTag}set label(t){this.currentTag.labelId=t}get label(){return this.currentTag.labelId}formatUrl(t,e){return e+"#"+encodeURIComponent(t)}formatTag(t){return"("+t+")"}formatRef(t){return this.formatTag(t)}formatId(t){return"mjx-eqn:"+t.replace(/\s/g,"_")}formatNumber(t){return t.toString()}autoTag(){null==this.currentTag.tag&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))}clearTag(){this.tag(null,!0),this.currentTag.tagId=""}getTag(t=!1){if(t)return this.autoTag(),this.makeTag();const e=this.currentTag;return e.taggable&&!e.noTag&&(e.defaultTags&&this.autoTag(),e.tag)?this.makeTag():null}resetTag(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()}reset(t=0){this.resetTag(),this.counter=this.allCounter=t,this.allLabels={},this.allIds={},this.label=""}startEquation(t){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new Ct("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;const e=t.inputData.recompile;e&&(this.refUpdate=!0,this.counter=e.counter)}finishEquation(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)}finalize(t,e){if(!e.display||this.currentTag.env||null==this.currentTag.tag)return t;const r=this.makeTag();return this.enTag(t,r)}makeId(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)}makeTag(){this.makeId(),this.label&&(this.labels[this.label]=new St(this.currentTag.tag,this.currentTag.tagId),this.label="");const t=new dt("\\text{"+this.currentTag.tagFormat+"}",{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[t],{id:this.currentTag.tagId,rowalign:this.configuration.options.tagAlign})}}class Lt extends It{autoTag(){}getTag(){return this.currentTag.tag?super.getTag():null}}class Nt extends It{finalize(t,e){if(!e.display||this.history.find((function(t){return t.taggable})))return t;const r=this.getTag(!0);return this.enTag(t,r)}}const Ft=new Map([["none",Lt],["all",Nt]]);let Rt="none";const Bt={OPTIONS:{tags:Rt,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1,tagAlign:"baseline"},add(t,e){Ft.set(t,e)},addTags(t){for(const e of Object.keys(t))Bt.add(e,t[e])},create(t){const e=Ft.get(t)||Ft.get(Rt);if(!e)throw Error("Unknown tags class");return new e},setDefault(t){Rt=t},getDefault:()=>Bt.create(Rt)};class Dt{constructor(t,e,r){this._token=t,this._char=e,this._attributes=r}get token(){return this._token}get char(){return this._char}get attributes(){return this._attributes}}class Gt{constructor(t,e,r=[]){this._token=t,this._func=e,this._args=r}get token(){return this._token}get func(){return this._func}get args(){return this._args}}function Ut(t){return void 0===t||t}class _t{constructor(t,e){this._name=t,this._parser=e,Zt.register(this)}get name(){return this._name}parserFor(t){return this.contains(t)?this.parser:null}parse([t,e]){const r=this.parserFor(e),s=this.lookup(e);return r&&s?Ut(r(t,s)):null}set parser(t){this._parser=t}get parser(){return this._parser}}class jt extends _t{constructor(t,e,r){super(t,e),this._regExp=r}contains(t){return this._regExp.test(t)}lookup(t){return this.contains(t)?t:null}}class Kt extends _t{constructor(){super(...arguments),this.map=new Map}lookup(t){return this.map.get(t)}contains(t){return this.map.has(t)}add(t,e){this.map.set(t,e)}remove(t){this.map.delete(t)}}class Xt extends Kt{constructor(t,e,r){super(t,e);for(const t of Object.keys(r)){const e=r[t],[s,i]="string"==typeof e?[e,null]:e,n=new Dt(t,s,i);this.add(t,n)}}}class Ht extends Xt{parse([t,e]){return super.parse([t,"\\"+e])}}class zt extends Kt{constructor(t,e,r={}){super(t,null);const s=t=>"string"==typeof t?r[t]:t;for(const[t,r]of Object.entries(e)){let e,i;Array.isArray(r)?(e=s(r[0]),i=r.slice(1)):(e=s(r),i=[]);const n=new Gt(t,e,i);this.add(t,n)}}parserFor(t){const e=this.lookup(t);return e?e.func:null}parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);return r&&s?Ut(s(t,r.token,...r.args)):null}}class qt extends zt{parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);if(!r||!s)return null;const i=t.currentCS;t.currentCS="\\"+e;const n=s(t,"\\"+r.token,...r.args);return t.currentCS=i,Ut(n)}}class $t extends zt{constructor(t,e,r,s={}){super(t,r,s),this.parser=e}parse([t,e]){const r=this.lookup(e),s=this.parserFor(e);return r&&s?Ut(this.parser(t,r.token,s,r.args)):null}}const Jt=MathJax._.util.PrioritizedList.PrioritizedList,Vt=MathJax._.util.FunctionList.FunctionList,Wt=new Map,Zt={register(t){Wt.set(t.name,t)},getMap:t=>Wt.get(t)};class Yt{constructor(){this._configuration=new Jt,this._fallback=new Vt}add(t,e,r=Jt.DEFAULTPRIORITY){for(const e of t.slice().reverse()){const t=Zt.getMap(e);if(!t)return void this.warn(`Configuration '${e}' not found! Omitted.`);this._configuration.add(t,r)}e&&this._fallback.add(e,r)}remove(t,e=null){for(const e of t){const t=this.retrieve(e);t&&this._configuration.remove(t)}e&&this._fallback.remove(e)}parse(t){for(const{item:e}of this._configuration){const r=e.parse(t);if(r===Yt.FALLBACK)break;if(r)return r}const[e,r]=t;Array.from(this._fallback)[0].item(e,r)}lookup(t){const e=this.applicable(t);return e?e.lookup(t):null}contains(t){const e=this.applicable(t);return!(!e||e instanceof Xt&&null===e.lookup(t).char)}toString(){const t=[];for(const{item:e}of this._configuration)t.push(e.name);return t.join(", ")}applicable(t){for(const{item:e}of this._configuration)if(e.contains(t))return e;return null}retrieve(t){for(const{item:e}of this._configuration)if(e.name===t)return e;return null}warn(t){console.log("TexParser Warning: "+t)}}Yt.FALLBACK=Symbol("fallback");class Qt{constructor(){this.map=new Map}add(t,e,r=Jt.DEFAULTPRIORITY){for(const s of Object.keys(t)){const i=s;let n=this.get(i);n||(n=new Yt,this.set(i,n)),n.add(t[i],e[i],r)}}remove(t,e){for(const r of Object.keys(t)){const s=this.get(r);s&&s.remove(t[r],e[r])}}set(t,e){this.map.set(t,e)}get(t){return this.map.get(t)}retrieve(t){for(const e of this.map.values()){const r=e.retrieve(t);if(r)return r}return null}keys(){return this.map.keys()}}class te{static makeProcessor(t,e){return Array.isArray(t)?t:[t,e]}static _create(t,e={}){var r;const s=null!==(r=e.priority)&&void 0!==r?r:Jt.DEFAULTPRIORITY,i=e.init?this.makeProcessor(e.init,s):null,n=e.config?this.makeProcessor(e.config,s):null,a=(e.preprocessors||[]).map((t=>this.makeProcessor(t,s))),o=(e.postprocessors||[]).map((t=>this.makeProcessor(t,s))),c=e.parser||"tex";return new te(t,e[rt.HANDLER]||{},e[rt.FALLBACK]||{},e[rt.ITEMS]||{},e[rt.TAGS]||{},e[rt.OPTIONS]||{},e[rt.NODES]||{},a,o,i,n,s,c)}static create(t,e={}){const r=te._create(t,e);return re.set(t,r),r}static local(t={}){return te._create("",t)}constructor(t,e={},r={},s={},i={},n={},a={},o=[],c=[],l=null,h=null,u,d){this.name=t,this.handler=e,this.fallback=r,this.items=s,this.tags=i,this.options=n,this.nodes=a,this.preprocessors=o,this.postprocessors=c,this.initMethod=l,this.configMethod=h,this.priority=u,this.parser=d,this.handler=Object.assign({[st.CHARACTER]:[],[st.DELIMITER]:[],[st.MACRO]:[],[st.ENVIRONMENT]:[]},e)}get init(){return this.initMethod?this.initMethod[0]:null}get config(){return this.configMethod?this.configMethod[0]:null}}const ee=new Map,re={set(t,e){ee.set(t,e)},get:t=>ee.get(t),keys:()=>ee.keys()};class se{constructor(t,e=["tex"]){this.initMethod=new Vt,this.configMethod=new Vt,this.configurations=new Jt,this.parsers=[],this.handlers=new Qt,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=e;for(const e of t.slice().reverse())this.addPackage(e);for(const{item:t,priority:e}of this.configurations)this.append(t,e)}init(){this.initMethod.execute(this)}config(t){this.configMethod.execute(this,t);for(const e of this.configurations)this.addFilters(t,e.item)}addPackage(t){const e="string"==typeof t?t:t[0],r=this.getPackage(e);r&&this.configurations.add(r,"string"==typeof t?r.priority:t[1])}add(t,e,r={}){const s=this.getPackage(t);this.append(s),this.configurations.add(s,s.priority),this.init();const i=e.parseOptions;i.nodeFactory.setCreators(s.nodes);for(const t of Object.keys(s.items))i.itemFactory.setNodeClass(t,s.items[t]);Bt.addTags(s.tags),I(i.options,s.options),L(i.options,r),this.addFilters(e,s),s.config&&s.config(this,e)}getPackage(t){const e=re.get(t);if(e&&!this.parsers.includes(e.parser))throw Error(`Package '${t}' doesn't target the proper parser`);return e||this.warn(`Package '${t}' not found. Omitted.`),e}append(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),I(this.options,t.options),Object.assign(this.nodes,t.nodes)}addFilters(t,e){for(const[r,s]of e.preprocessors)t.preFilters.add(r,s);for(const[r,s]of e.postprocessors)t.postFilters.add(r,s)}warn(t){console.warn("MathJax Warning: "+t)}}const ie=MathJax._.util.Styles,ne=ie.TRBL;ie.WSC,ie.Styles;class ae extends ht{constructor(t,e){super(t),this.global=e}get kind(){return"start"}get isOpen(){return!0}checkItem(t){if(t.isKind("stop")){let t=this.toMml();return this.global.isInner||(t=this.factory.configuration.tags.finalize(t,this.env)),[[this.factory.create("mml",t)],!0]}return super.checkItem(t)}}class oe extends ht{get kind(){return"stop"}get isClose(){return!0}}class ce extends ht{get kind(){return"open"}get isOpen(){return!0}checkItem(t){if(t.isKind("close")){const e=this.toMml(),r=this.create("node","TeXAtom",[e]);return Le(r,t),[[this.factory.create("mml",r)],!0]}return super.checkItem(t)}}ce.errors=Object.assign(Object.create(ht.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]});class le extends ht{get kind(){return"close"}get isClose(){return!0}}class he extends ht{get kind(){return"null"}}class ue extends ht{get kind(){return"prime"}checkItem(t){const[e,r]=this.Peek(2),s=(V.isType(e,"msubsup")||V.isType(e,"msup"))&&!V.getChildAt(e,e.sup),i=(V.isType(e,"munderover")||V.isType(e,"mover"))&&!V.getChildAt(e,e.over)&&!V.getProperty(e,"subsupOK");if(!s&&!i){return[[this.create("node",e.getProperty("movesupsub")?"mover":"msup",[e,r]),t],!0]}const n=s?e.sup:e.over;return V.setChild(e,n,r),[[e,t],!0]}}class de extends ht{get kind(){return"subsup"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ht.success;const e=this.First,r=this.getProperty("position");if(t.isKind("mml")){if(this.getProperty("primes"))if(2!==r)V.setChild(e,2,this.getProperty("primes"));else{V.setProperty(this.getProperty("primes"),"variantForm",!0);const e=this.create("node","mrow",[this.getProperty("primes"),t.First]);t.First=e}V.setChild(e,r,t.First),null!=this.getProperty("movesupsub")&&V.setProperty(e,"movesupsub",this.getProperty("movesupsub"));return[[this.factory.create("mml",e)],!0]}super.checkItem(t);const s=this.getErrors(["","sub","sup"][r]);throw new ct(s[0],s[1],...s.splice(2))}}de.errors=Object.assign(Object.create(ht.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]});class me extends ht{constructor(t){super(t),this.setProperty("name","\\over")}get kind(){return"over"}get isClose(){return!0}checkItem(t){if(t.isKind("over"))throw new ct("AmbiguousUseOf","Ambiguous use of %1",t.getName());if(t.isClose){let e=this.create("node","mfrac",[this.getProperty("num"),this.toMml(!1)]);return null!=this.getProperty("thickness")&&V.setAttribute(e,"linethickness",this.getProperty("thickness")),(this.getProperty("ldelim")||this.getProperty("rdelim"))&&(V.setProperty(e,"withDelims",!0),e=Mt.fixedFence(this.factory.configuration,this.getProperty("ldelim"),e,this.getProperty("rdelim"))),e.attributes.set(ut.Attr.LATEXITEM,this.getProperty("name")),[[this.factory.create("mml",e),t],!0]}return super.checkItem(t)}toString(){return"over["+this.getProperty("num")+" / "+this.nodes.join("; ")+"]"}}class pe extends ht{constructor(t,e){super(t),this.setProperty("delim",e)}get kind(){return"left"}get isOpen(){return!0}checkItem(t){if(t.isKind("right")){const e=Mt.fenced(this.factory.configuration,this.getProperty("delim"),this.toMml(),t.getProperty("delim"),"",t.getProperty("color")),r=e.childNodes[0],s=e.childNodes[e.childNodes.length-1],i=this.factory.create("mml",e);return Le(r,this,"\\left"),Le(s,t,"\\right"),i.Peek()[0].attributes.set(ut.Attr.LATEXITEM,"\\left"+t.startStr.slice(this.startI,t.stopI)),[[i],!0]}if(t.isKind("middle")){const e={stretchy:!0};t.getProperty("color")&&(e.mathcolor=t.getProperty("color"));const r=this.create("token","mo",e,t.getProperty("delim"));return Le(r,t,"\\middle"),this.Push(this.create("node","TeXAtom",[],{texClass:H.CLOSE}),r,this.create("node","TeXAtom",[],{texClass:H.OPEN})),this.env={},[[this],!0]}return super.checkItem(t)}}pe.errors=Object.assign(Object.create(ht.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]});class ge extends ht{constructor(t,e,r){super(t),this.setProperty("delim",e),r&&this.setProperty("color",r)}get kind(){return"middle"}get isClose(){return!0}}class fe extends ht{constructor(t,e,r){super(t),this.setProperty("delim",e),r&&this.setProperty("color",r)}get kind(){return"right"}get isClose(){return!0}}class be extends ht{get kind(){return"break"}constructor(t,e,r){super(t),this.setProperty("linebreak",e),this.setProperty("insert",r)}checkItem(t){var e,r;const s=this.getProperty("linebreak");if(t.isKind("mml")){const i=t.First;if(i.isKind("mo")){if("after"!==((null===(r=null===(e=V.getOp(i))||void 0===e?void 0:e[3])||void 0===r?void 0:r.linebreakstyle)||V.getAttribute(i,"linebreakstyle")))return V.setAttribute(i,"linebreak",s),[[t],!0];if(!this.getProperty("insert"))return[[t],!0]}}const i=this.create("token","mspace",{linebreak:s});return[[this.factory.create("mml",i),t],!0]}}class ye extends ht{get kind(){return"begin"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new ct("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());const e=this.toMml();return Le(e,t),[[this.factory.create("mml",e)],!0]}if(t.isKind("stop"))throw new ct("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}class Ae extends ht{get kind(){return"end"}get isClose(){return!0}}class ke extends ht{get kind(){return"style"}checkItem(t){if(!t.isClose)return super.checkItem(t);const e=this.create("node","mstyle",this.nodes,this.getProperty("styles"));return[[this.factory.create("mml",e),t],!0]}}class ve extends ht{get kind(){return"position"}checkItem(t){if(t.isClose)throw new ct("MissingBoxFor","Missing box for %1",this.getName());if(t.isFinal){let e=t.toMml();switch(this.getProperty("move")){case"vertical":return e=this.create("node","mpadded",[e],{height:this.getProperty("dh"),depth:this.getProperty("dd"),voffset:this.getProperty("dh")}),[[this.factory.create("mml",e)],!0];case"horizontal":return[[this.factory.create("mml",this.getProperty("left")),t,this.factory.create("mml",this.getProperty("right"))],!0]}}return super.checkItem(t)}}class Pe extends ht{get kind(){return"cell"}get isClose(){return!0}}class Te extends ht{get isFinal(){return!0}get kind(){return"mml"}}class Me extends ht{get kind(){return"fn"}checkItem(t){const e=this.First;if(e){if(t.isOpen)return ht.success;if(!t.isKind("fn")){let r=t.First;if(!t.isKind("mml")||!r)return[[e,t],!0];if(V.isType(r,"mstyle")&&r.childNodes.length&&V.isType(r.childNodes[0].childNodes[0],"mspace")||V.isType(r,"mspace"))return[[e,t],!0];V.isEmbellished(r)&&(r=V.getCoreMO(r));const s=V.getForm(r);if(null!=s&&[0,0,1,1,0,1,1,0,0,0][s[2]])return[[e,t],!0]}return[[e,this.create("token","mo",{texClass:H.NONE},At.ApplyFunction),t],!0]}return super.checkItem(t)}}class we extends ht{constructor(){super(...arguments),this.remap=Zt.getMap("not_remap")}get kind(){return"not"}checkItem(t){let e,r,s;if(t.isKind("open")||t.isKind("left"))return ht.success;if(t.isKind("mml")&&(V.isType(t.First,"mo")||V.isType(t.First,"mi")||V.isType(t.First,"mtext"))&&(e=t.First,r=V.getText(e),1===r.length&&!V.getProperty(e,"movesupsub")&&1===V.getChildren(e).length))return this.remap.contains(r)?(s=this.create("text",this.remap.lookup(r).char),V.setChild(e,0,s)):(s=this.create("text","\u0338"),V.appendChildren(e,[s])),[[t],!0];s=this.create("text","\u29f8");const i=this.create("node","mtext",[],{},s),n=this.create("node","mpadded",[i],{width:0});return e=this.create("node","TeXAtom",[n],{texClass:H.REL}),[[e,t],!0]}}class xe extends ht{get kind(){return"nonscript"}checkItem(t){if(t.isKind("mml")&&1===t.Size()){let e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=V.getChildren(V.getChildren(e)[0])[0]),e.isKind("mspace")){if(e!==t.First){const e=this.create("node","mrow",[t.Pop()]);t.Push(e)}this.factory.configuration.addNode("nonscript",t.First)}}return[[t],!0]}}class Oe extends ht{get kind(){return"dots"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ht.success;let e=this.getProperty("ldots");const r=t.First;if(t.isKind("mml")&&V.isEmbellished(r)){const t=V.getTexClass(V.getCoreMO(r));t!==H.BIN&&t!==H.REL||(e=this.getProperty("cdots"))}return[[e,t],!0]}}class Ee extends ht{constructor(){super(...arguments),this.table=[],this.row=[],this.frame=[],this.hfill=[],this.arraydef={},this.cstart=[],this.cend=[],this.cextra=[],this.atEnd=!1,this.ralign=[],this.breakAlign={cell:"",row:"",table:""},this.templateSubs=0}get kind(){return"array"}get isOpen(){return!0}get copyEnv(){return!1}checkItem(t){if(t.isClose&&!t.isKind("over")){if(t.getProperty("isEntry"))return this.EndEntry(),this.clearEnv(),this.StartEntry(),ht.fail;if(t.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),this.StartEntry(),ht.fail;this.EndTable(),this.clearEnv();const e=this.factory.create("mml",this.createMml());if(this.getProperty("requireClose")){if(t.isKind("close"))return[[e],!0];throw new ct("MissingCloseBrace","Missing close brace")}return[[e,t],!0]}return super.checkItem(t)}createMml(){const t=this.arraydef.scriptlevel;delete this.arraydef.scriptlevel;let e=this.create("node","mtable",this.table,this.arraydef);return t&&e.setProperty("smallmatrix",!0),this.breakAlign.table&&V.setAttribute(e,"data-break-align",this.breakAlign.table),this.getProperty("arrayPadding")&&(V.setAttribute(e,"data-frame-styles",""),V.setAttribute(e,"framespacing",this.getProperty("arrayPadding"))),e=this.handleFrame(e),void 0!==t&&(e=this.create("node","mstyle",[e],{scriptlevel:t})),(this.getProperty("open")||this.getProperty("close"))&&(e=Mt.fenced(this.factory.configuration,this.getProperty("open"),e,this.getProperty("close"))),e}handleFrame(t){if(!this.frame.length)return t;const e=new Map(this.frame),r=this.frame.reduce(((t,[,e])=>e===t?e:""),this.frame[0][1]);if(r){if(4===this.frame.length)return V.setAttribute(t,"frame",r),V.removeAttribute(t,"data-frame-styles"),t;if("solid"===r)return V.setAttribute(t,"data-frame-styles",""),t=this.create("node","menclose",[t],{notation:Array.from(e.keys()).join(" "),"data-padding":0})}const s=ne.map((t=>e.get(t)||"none")).join(" ");return V.setAttribute(t,"data-frame-styles",s),t}StartEntry(){const t=this.row.length;let e=this.cstart[t],r=this.cend[t];const s=this.ralign[t],i=this.cextra;if(!(e||r||s||i[t]||i[t+1]))return;let[n,a,o,c]=this.getEntry();if(!i[t]||this.atEnd&&!i[t+1]||(e+="&"),"&"!==o&&(c=!!a.trim()||!!(t||o&&"\\end"!==o.substring(0,4)),i[t+1]&&!i[t]&&(r=(r||"")+"&",this.atEnd=!0)),!c&&!n)return;const l=this.parser;if(c&&(e&&(a=Mt.addArgs(l,e,a)),r&&(a=Mt.addArgs(l,a,r)),s&&(a="\\text{"+a.trim()+"}"),(e||r||s)&&++this.templateSubs>l.configuration.options.maxTemplateSubtitutions))throw new ct("MaxTemplateSubs","Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?");n&&(a=Mt.addArgs(l,n,a)),l.string=Mt.addArgs(l,a,l.string),l.i=0}getEntry(){const t=this.parser,e=/^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;let r,s=0,i=0,n=t.i;const a=["","","",!1];for(;null!==(r=t.string.slice(n).match(e));)switch(n+=r[0].length,r[2]){case"\\":n++;break;case"{":s++;break;case"}":if(!s)return a;s--;break;case"\\begin{array}":s||i++;break;case"\\end{array}":if(!s&&i){i--;break}default:{if(s||i)continue;n-=r[2].length;let e=t.string.slice(t.i,n).trim();const a=e.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);return a&&(e=e.slice(a[0].length)),t.string=t.string.slice(n),t.i=0,[(null==a?void 0:a[0])||"",e,r[2],!0]}}return a}EndEntry(){const t=this.create("node","mtd",this.nodes);this.hfill.length&&(0===this.hfill[0]&&V.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&V.setAttribute(t,"columnalign",V.getAttribute(t,"columnalign")?"center":"left"));const e=this.ralign[this.row.length];if(e){const[r,s,i]=e,n=this.create("node","mpadded",t.childNodes[0].childNodes,{width:s,"data-overflow":"auto","data-align":i,"data-vertical-align":r});n.setProperty("vbox",r),t.childNodes[0].childNodes=[],t.appendChild(n)}else this.breakAlign.cell&&V.setAttribute(t,"data-vertical-align",this.breakAlign.cell);this.breakAlign.cell="",this.row.push(t),this.Clear(),this.hfill=[]}EndRow(){let t="mtr";this.getProperty("isNumbered")&&3===this.row.length?(this.row.unshift(this.row.pop()),t="mlabeledtr"):this.getProperty("isLabeled")&&(t="mlabeledtr",this.setProperty("isLabeled",!1));const e=this.create("node",t,this.row);this.breakAlign.row&&(V.setAttribute(e,"data-break-align",this.breakAlign.row),this.breakAlign.row=""),Le(e,this),this.table.push(e),this.row=[],this.atEnd=!1}EndTable(){(this.Size()||this.row.length)&&(this.EndEntry(),this.EndRow()),this.checkLines()}checkLines(){if(this.arraydef.rowlines){const t=this.arraydef.rowlines.split(/ /);t.length===this.table.length?(this.frame.push(["bottom",t.pop()]),t.length?this.arraydef.rowlines=t.join(" "):delete this.arraydef.rowlines):t.lengththis.maxrow&&(this.maxrow=this.row.length);const t=this.factory.configuration.tags.getTag();t&&(this.row=[t].concat(this.row),this.setProperty("isLabeled",!0)),this.factory.configuration.tags.clearTag(),super.EndRow()}EndTable(){super.EndTable(),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1),this.extendArray("data-break-align",this.maxrow),this.addIndentshift()}extendArray(t,e){if(!this.arraydef[t])return;const r=this.arraydef[t].split(/ /),s=[...r];if(s.length>1){for(;s.length0){const t="center"===e?".7em":"2em";for(const e of this.table){const s=e.childNodes[e.isKind("mlabeledtr")?r+1:r];if(s){const e=this.create("node","mstyle",s.childNodes[0].childNodes,{indentshift:t});s.childNodes[0].childNodes=[],s.appendChild(e)}}}e=t[r]}}}class Ce extends ye{get kind(){return"mstyle"}constructor(t,e,r){super(t),this.attrList=e,this.setProperty("name",r)}checkItem(t){if(t.isKind("end")&&t.getName()===this.getName()){return[[this.create("node","mstyle",[this.toMml()],this.attrList)],!0]}return super.checkItem(t)}}class Ie extends ht{constructor(t,...e){super(t),this.factory.configuration.tags.start("equation",!0,e[0])}get kind(){return"equation"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){const e=this.toMml(),r=this.factory.configuration.tags.getTag();return this.factory.configuration.tags.end(),[[r?this.factory.configuration.tags.enTag(e,r):e,t],!0]}if(t.isKind("stop"))throw new ct("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}function Le(t,e,r=""){const s=e.startStr.slice(e.startI,e.stopI);s&&(t.attributes.set(ut.Attr.LATEXITEM,r?r+s:s),t.attributes.set(ut.Attr.LATEX,r?r+s:s))}const Ne=MathJax._.util.lengths,Fe=(Ne.BIGDIMEN,Ne.UNITS,Ne.RELUNITS,Ne.MATHSPACE),Re=(Ne.length2em,Ne.percent,Ne.em),Be=(Ne.px,1.2/.85),De={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function Ge(t,e=1/0){const r=t.replace(/\s+/g,"").split("").map((t=>{const e={t:"top",b:"bottom",m:"middle",c:"center"}[t];if(!e)throw new ct("BadBreakAlign","Invalid alignment character: %1",t);return e}));if(r.length>e)throw new ct("TooManyAligns","Too many alignment characters: %1",t);return 1===e?r[0]:r.join(" ")}function Ue(t,e){const r=t.stack.env,s=r.inRoot;r.inRoot=!0;const i=new dt(e,r,t.configuration);let n=i.mml();const a=i.stack.global;if(a.leftRoot||a.upRoot){const e={};a.leftRoot&&(e.width=a.leftRoot),a.upRoot&&(e.voffset=a.upRoot,e.height=a.upRoot),n=t.create("node","mpadded",[n],e)}return r.inRoot=s,n}const _e={Open(t,e){t.Push(t.itemFactory.create("open"))},Close(t,e){t.Push(t.itemFactory.create("close"))},Bar(t,e){t.Push(t.create("token","mo",{stretchy:!1,texClass:H.ORD},e))},Tilde(t,e){t.Push(t.create("token","mtext",{},At.nbsp))},Space(t,e){},Superscript(t,e){let r,s;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const i=t.stack.Top();i.isKind("prime")?([s,r]=i.Peek(2),t.stack.Pop()):(s=t.stack.Prev(),s||(s=t.create("token","mi",{},"")));const n=V.getProperty(s,"movesupsub");let a=V.isType(s,"msubsup")?s.sup:s.over;if(V.isType(s,"msubsup")&&!V.isType(s,"msup")&&V.getChildAt(s,s.sup)||V.isType(s,"munderover")&&!V.isType(s,"mover")&&V.getChildAt(s,s.over)&&!V.getProperty(s,"subsupOK"))throw new ct("DoubleExponent","Double exponent: use braces to clarify");V.isType(s,"msubsup")&&!V.isType(s,"msup")||(n?((!V.isType(s,"munderover")||V.isType(s,"mover")||V.getChildAt(s,s.over))&&(s=t.create("node","munderover",[s],{movesupsub:!0})),a=s.over):(s=t.create("node","msubsup",[s]),a=s.sup)),t.Push(t.itemFactory.create("subsup",s).setProperties({position:a,primes:r,movesupsub:n}))},Subscript(t,e){let r,s;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const i=t.stack.Top();i.isKind("prime")?([s,r]=i.Peek(2),t.stack.Pop()):(s=t.stack.Prev(),s||(s=t.create("token","mi",{},"")));const n=V.getProperty(s,"movesupsub");let a=V.isType(s,"msubsup")?s.sub:s.under;if(V.isType(s,"msubsup")&&!V.isType(s,"msup")&&V.getChildAt(s,s.sub)||V.isType(s,"munderover")&&!V.isType(s,"mover")&&V.getChildAt(s,s.under)&&!V.getProperty(s,"subsupOK"))throw new ct("DoubleSubscripts","Double subscripts: use braces to clarify");V.isType(s,"msubsup")&&!V.isType(s,"msup")||(n?((!V.isType(s,"munderover")||V.isType(s,"mover")||V.getChildAt(s,s.under))&&(s=t.create("node","munderover",[s],{movesupsub:!0})),a=s.under):(s=t.create("node","msubsup",[s]),a=s.sub)),t.Push(t.itemFactory.create("subsup",s).setProperties({position:a,primes:r,movesupsub:n}))},Prime(t,e){let r=t.stack.Prev();if(r||(r=t.create("token","mi")),V.isType(r,"msubsup")&&!V.isType(r,"msup")&&V.getChildAt(r,r.sup)||V.isType(r,"munderover")&&!V.isType(r,"mover")&&V.getChildAt(r,r.over)&&!V.getProperty(r,"subsupOK"))throw new ct("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");let s="";t.i--;do{s+=At.prime,t.i++,e=t.GetNext()}while("'"===e||e===At.rsquo);s=["","\u2032","\u2033","\u2034","\u2057"][s.length]||s;const i=t.create("token","mo",{variantForm:!0},s);t.Push(t.itemFactory.create("prime",r,i))},Comment(t,e){for(;t.in.macroColumn(t,i,parseInt(s)),t.Push(t.itemFactory.create("null"))},BeginEnd(t,e){const r=t.GetArgument(e);if(r.match(/\\/))throw new ct("InvalidEnv","Invalid environment name '%1'",r);const s=t.configuration.handlers.get(st.ENVIRONMENT).lookup(r);if(s&&"\\end"===e){if(!s.args[0]){const e=t.itemFactory.create("end").setProperty("name",r);return void t.Push(e)}t.stack.env.closing=r}Mt.checkMaxMacros(t,!1),t.parse(st.ENVIRONMENT,[t,r])},Array(t,e,r,s,i,n,a,o,c){i||(i=t.GetArgument("\\begin{"+e.getName()+"}"));const l=t.itemFactory.create("array");return"array"===e.getName()&&l.setProperty("arrayPadding",".5em .125em"),l.parser=t,l.arraydef={columnspacing:n||"1em",rowspacing:a||"4pt"},t.configuration.columnParser.process(t,i,l),r&&l.setProperty("open",t.convertDelimiter(r)),s&&l.setProperty("close",t.convertDelimiter(s)),"'"===(o||"").charAt(1)&&(l.arraydef["data-cramped"]=!0,o=o.charAt(0)),"D"===o?l.arraydef.displaystyle=!0:o&&(l.arraydef.displaystyle=!1),l.arraydef.scriptlevel="S"===o?1:0,c&&(l.arraydef.useHeight=!1),t.Push(e),l.StartEntry(),l},AlignedArray(t,e,r=""){const s=t.GetBrackets("\\begin{"+e.getName()+"}"),i=_e.Array(t,e,null,null,null,null,null,r);return Mt.setArrayAlign(i,s)},IndentAlign(t,e){const r=`\\begin{${e.getName()}}`,s=t.GetBrackets(r,""),i=t.GetBrackets(r,""),n=t.GetBrackets(r,"");if(s&&!nt.matchDimen(s)[0]||i&&!nt.matchDimen(i)[0]||n&&!nt.matchDimen(n)[0])throw new ct("BracketMustBeDimension","Bracket argument to %1 must be a dimension",r);const a=t.GetArgument(r);if(a&&!a.match(/^([lcr]{1,3})?$/))throw new ct("BadAlignment","Alignment must be one to three copies of l, c, or r");const o=[...a].map((t=>({l:"left",c:"center",r:"right"}[t])));1===o.length&&o.push(o[0]);const c={};for(const[t,e]of[["indentshiftfirst",s],["indentshift",i||s],["indentshiftlast",n],["indentalignfirst",o[0]],["indentalign",o[1]],["indentalignlast",o[2]]])e&&(c[t]=e);t.Push(t.itemFactory.create("mstyle",c,e.getName()))},Equation:(t,e,r,s=!0)=>(t.configuration.mathItem.display=s,t.stack.env.display=s,Mt.checkEqnEnv(t),t.Push(e),t.itemFactory.create("equation",r).setProperty("name",e.getName())),EqnArray(t,e,r,s,i,n,a){const o=e.getName(),c="gather"===o||"gather*"===o;s&&Mt.checkEqnEnv(t,!c),t.Push(e),i=(i=i.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center"),n=Ge(n);const l=t.itemFactory.create("eqnarray",o,r,s,t.stack.global);return l.arraydef={displaystyle:!0,columnalign:i,columnspacing:a||"1em",rowspacing:"3pt","data-break-align":n,side:t.options.tagSide,minlabelspacing:t.options.tagIndent},c&&l.setProperty("nestable",!0),l},HandleNoTag(t,e){t.tags.notag()},HandleLabel(t,e){const r=t.GetArgument(e);if(""!==r&&!t.tags.refUpdate){if(t.tags.label)throw new ct("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=r,(t.tags.allLabels[r]||t.tags.labels[r])&&!t.options.ignoreDuplicateLabels)throw new ct("MultipleLabel","Label '%1' multiply defined",r);t.tags.labels[r]=new St}},HandleRef(t,e,r){const s=t.GetArgument(e);let i=t.tags.allLabels[s]||t.tags.labels[s];i||(t.tags.refUpdate||(t.tags.redo=!0),i=new St);let n=i.tag;r&&(n=t.tags.formatRef(n));const a=t.create("node","mrow",Mt.internalMath(t,n),{href:t.tags.formatUrl(i.id,t.options.baseURL),class:"MathJax_ref"});t.Push(a)},Macro(t,e,r,s,i){if(s){const n=[];if(null!=i){const r=t.GetBrackets(e);n.push(null==r?i:r)}for(let r=n.length;r1&&(s.autoOP=!1)),!s.mathvariant&&Mt.isLatinOrGreekChar(e)){const r=t.configuration.mathStyle(e);r&&(s.mathvariant=r)}const n=t.create("token","mi",s,e);t.Push(n)},digit(t,e){const r=t.configuration.options.numberPattern,s=t.string.slice(t.i-1).match(r),i=Mt.getFontDef(t);if(!s)return!1;const n=t.create("token","mn",i,s[0].replace(/[{}]/g,""));return t.i+=s[0].length-1,t.Push(n),!0},controlSequence(t,e){const r=t.GetCS();t.parse(st.MACRO,[t,r])},lcGreek(t,e){const r={mathvariant:t.configuration.mathStyle(e.char)||Ke.ITALIC},s=t.create("token","mi",r,e.char);t.Push(s)},ucGreek(t,e){const r={mathvariant:t.stack.env.font||t.configuration.mathStyle(e.char,!0)||Ke.NORMAL},s=t.create("token","mi",r,e.char);t.Push(s)},mathchar0mi(t,e){const r=e.attributes||{mathvariant:Ke.ITALIC},s=t.create("token","mi",r,e.char);t.Push(s)},mathchar0mo(t,e){const r=e.attributes||{};r.stretchy=!1;const s=t.create("token","mo",r,e.char);V.setProperty(s,"fixStretchy",!0),t.configuration.addNode("fixStretchy",s),t.Push(s)},mathchar7(t,e){const r=e.attributes||{mathvariant:Ke.NORMAL};t.stack.env.font&&(r.mathvariant=t.stack.env.font);const s=t.create("token","mi",r,e.char);t.Push(s)},delimiter(t,e){let r=e.attributes||{};r=Object.assign({fence:!1,stretchy:!1},r);const s=t.create("token","mo",r,e.char);t.Push(s)},environment(t,e,r,s){const i=t.itemFactory.create("begin").setProperty("name",e);t.Push(r(t,i,...s.slice(1)))}},He=Xe,ze=Re(Fe.thickmathspace),qe=ut.Variant;new jt("letter",He.variable,/[a-z]/i),new jt("digit",He.digit,/[0-9.,]/),new jt("command",He.controlSequence,/^\\/),new zt("special",{"{":je.Open,"}":je.Close,"~":je.Tilde,"^":je.Superscript,_:je.Subscript,"|":je.Bar," ":je.Space,"\t":je.Space,"\r":je.Space,"\n":je.Space,"'":je.Prime,"%":je.Comment,"&":je.Entry,"#":je.Hash,"\xa0":je.Space,"\u2019":je.Prime}),new Xt("lcGreek",He.lcGreek,{alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03f5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03d5",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",varepsilon:"\u03b5",vartheta:"\u03d1",varpi:"\u03d6",varrho:"\u03f1",varsigma:"\u03c2",varphi:"\u03c6"}),new Xt("ucGreek",He.ucGreek,{Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039b",Xi:"\u039e",Pi:"\u03a0",Sigma:"\u03a3",Upsilon:"\u03a5",Phi:"\u03a6",Psi:"\u03a8",Omega:"\u03a9"}),new Xt("mathchar0mi",He.mathchar0mi,{AA:"\u212b",S:["\xa7",{mathvariant:qe.NORMAL}],aleph:["\u2135",{mathvariant:qe.NORMAL}],hbar:["\u210f",{variantForm:!0}],imath:"\u0131",jmath:"\u0237",ell:"\u2113",wp:["\u2118",{mathvariant:qe.NORMAL}],Re:["\u211c",{mathvariant:qe.NORMAL}],Im:["\u2111",{mathvariant:qe.NORMAL}],partial:["\u2202",{mathvariant:qe.ITALIC}],infty:["\u221e",{mathvariant:qe.NORMAL}],prime:["\u2032",{variantForm:!0}],emptyset:["\u2205",{mathvariant:qe.NORMAL}],nabla:["\u2207",{mathvariant:qe.NORMAL}],top:["\u22a4",{mathvariant:qe.NORMAL}],bot:["\u22a5",{mathvariant:qe.NORMAL}],angle:["\u2220",{mathvariant:qe.NORMAL}],triangle:["\u25b3",{mathvariant:qe.NORMAL}],backslash:["\\",{mathvariant:qe.NORMAL}],forall:["\u2200",{mathvariant:qe.NORMAL}],exists:["\u2203",{mathvariant:qe.NORMAL}],neg:["\xac",{mathvariant:qe.NORMAL}],lnot:["\xac",{mathvariant:qe.NORMAL}],flat:["\u266d",{mathvariant:qe.NORMAL}],natural:["\u266e",{mathvariant:qe.NORMAL}],sharp:["\u266f",{mathvariant:qe.NORMAL}],clubsuit:["\u2663",{mathvariant:qe.NORMAL}],diamondsuit:["\u2662",{mathvariant:qe.NORMAL}],heartsuit:["\u2661",{mathvariant:qe.NORMAL}],spadesuit:["\u2660",{mathvariant:qe.NORMAL}]}),new Xt("mathchar0mo",He.mathchar0mo,{surd:"\u221a",coprod:["\u2210",{movesupsub:!0}],bigvee:["\u22c1",{movesupsub:!0}],bigwedge:["\u22c0",{movesupsub:!0}],biguplus:["\u2a04",{movesupsub:!0}],bigcap:["\u22c2",{movesupsub:!0}],bigcup:["\u22c3",{movesupsub:!0}],int:"\u222b",intop:["\u222b",{movesupsub:!0,movablelimits:!0}],iint:"\u222c",iiint:"\u222d",prod:["\u220f",{movesupsub:!0}],sum:["\u2211",{movesupsub:!0}],bigotimes:["\u2a02",{movesupsub:!0}],bigoplus:["\u2a01",{movesupsub:!0}],bigodot:["\u2a00",{movesupsub:!0}],oint:"\u222e",ointop:["\u222e",{movesupsub:!0,movablelimits:!0}],oiint:"\u222f",oiiint:"\u2230",bigsqcup:["\u2a06",{movesupsub:!0}],smallint:["\u222b",{largeop:!1}],triangleleft:"\u25c3",triangleright:"\u25b9",bigtriangleup:"\u25b3",bigtriangledown:"\u25bd",wedge:"\u2227",land:"\u2227",vee:"\u2228",lor:"\u2228",cap:"\u2229",cup:"\u222a",ddagger:"\u2021",dagger:"\u2020",sqcap:"\u2293",sqcup:"\u2294",uplus:"\u228e",amalg:"\u2a3f",diamond:"\u22c4",bullet:"\u2219",wr:"\u2240",div:"\xf7",odot:["\u2299",{largeop:!1}],oslash:["\u2298",{largeop:!1}],otimes:["\u2297",{largeop:!1}],ominus:["\u2296",{largeop:!1}],oplus:["\u2295",{largeop:!1}],mp:"\u2213",pm:"\xb1",circ:"\u2218",bigcirc:"\u25ef",setminus:"\u2216",cdot:"\u22c5",ast:"\u2217",times:"\xd7",star:"\u22c6",propto:"\u221d",sqsubseteq:"\u2291",sqsupseteq:"\u2292",parallel:"\u2225",mid:"\u2223",dashv:"\u22a3",vdash:"\u22a2",leq:"\u2264",le:"\u2264",geq:"\u2265",ge:"\u2265",lt:"<",gt:">",succ:"\u227b",prec:"\u227a",approx:"\u2248",succeq:"\u2ab0",preceq:"\u2aaf",supset:"\u2283",subset:"\u2282",supseteq:"\u2287",subseteq:"\u2286",in:"\u2208",ni:"\u220b",notin:"\u2209",owns:"\u220b",gg:"\u226b",ll:"\u226a",sim:"\u223c",simeq:"\u2243",perp:"\u27c2",equiv:"\u2261",asymp:"\u224d",smile:"\u2323",frown:"\u2322",ne:"\u2260",neq:"\u2260",cong:"\u2245",doteq:"\u2250",bowtie:"\u22c8",models:"\u22a7",notChar:"\u29f8",Leftrightarrow:"\u21d4",Leftarrow:"\u21d0",Rightarrow:"\u21d2",leftrightarrow:"\u2194",leftarrow:"\u2190",gets:"\u2190",rightarrow:"\u2192",to:["\u2192",{accent:!1}],mapsto:"\u21a6",leftharpoonup:"\u21bc",leftharpoondown:"\u21bd",rightharpoonup:"\u21c0",rightharpoondown:"\u21c1",nearrow:"\u2197",searrow:"\u2198",nwarrow:"\u2196",swarrow:"\u2199",rightleftharpoons:"\u21cc",hookrightarrow:"\u21aa",hookleftarrow:"\u21a9",longleftarrow:"\u27f5",Longleftarrow:"\u27f8",longrightarrow:"\u27f6",Longrightarrow:"\u27f9",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",ldots:"\u2026",cdots:"\u22ef",vdots:"\u22ee",ddots:"\u22f1",iddots:"\u22f0",dotsc:"\u2026",dotsb:"\u22ef",dotsm:"\u22ef",dotsi:"\u22ef",dotso:"\u2026",ldotp:[".",{texClass:H.PUNCT}],cdotp:["\u22c5",{texClass:H.PUNCT}],colon:[":",{texClass:H.PUNCT}]}),new Xt("mathchar7",He.mathchar7,{_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new Ht("delimiter",He.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"\u27e8",">":"\u27e9","\\lt":"\u27e8","\\gt":"\u27e9","/":"/","|":["|",{texClass:H.ORD}],".":"","\\lmoustache":"\u23b0","\\rmoustache":"\u23b1","\\lgroup":"\u27ee","\\rgroup":"\u27ef","\\arrowvert":"\u23d0","\\Arrowvert":"\u2016","\\bracevert":"\u23aa","\\Vert":["\u2016",{texClass:H.ORD}],"\\|":["\u2016",{texClass:H.ORD}],"\\vert":["|",{texClass:H.ORD}],"\\uparrow":"\u2191","\\downarrow":"\u2193","\\updownarrow":"\u2195","\\Uparrow":"\u21d1","\\Downarrow":"\u21d3","\\Updownarrow":"\u21d5","\\backslash":"\\","\\rangle":"\u27e9","\\langle":"\u27e8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"\u2309","\\lceil":"\u2308","\\rfloor":"\u230b","\\lfloor":"\u230a","\\lbrack":"[","\\rbrack":"]"}),new qt("macros",{displaystyle:[je.SetStyle,"D",!0,0],textstyle:[je.SetStyle,"T",!1,0],scriptstyle:[je.SetStyle,"S",!1,1],scriptscriptstyle:[je.SetStyle,"SS",!1,2],rm:[je.SetFont,qe.NORMAL],mit:[je.SetFont,qe.ITALIC],oldstyle:[je.SetFont,qe.OLDSTYLE],cal:[je.SetFont,qe.CALLIGRAPHIC],it:[je.SetFont,qe.MATHITALIC],bf:[je.SetFont,qe.BOLD],sf:[je.SetFont,qe.SANSSERIF],tt:[je.SetFont,qe.MONOSPACE],frak:[je.MathFont,qe.FRAKTUR],Bbb:[je.MathFont,qe.DOUBLESTRUCK],mathrm:[je.MathFont,qe.NORMAL],mathup:[je.MathFont,qe.NORMAL],mathnormal:[je.MathFont,""],mathbf:[je.MathFont,qe.BOLD],mathbfup:[je.MathFont,qe.BOLD],mathit:[je.MathFont,qe.MATHITALIC],mathbfit:[je.MathFont,qe.BOLDITALIC],mathbb:[je.MathFont,qe.DOUBLESTRUCK],mathfrak:[je.MathFont,qe.FRAKTUR],mathbffrak:[je.MathFont,qe.BOLDFRAKTUR],mathscr:[je.MathFont,qe.SCRIPT],mathbfscr:[je.MathFont,qe.BOLDSCRIPT],mathsf:[je.MathFont,qe.SANSSERIF],mathsfup:[je.MathFont,qe.SANSSERIF],mathbfsf:[je.MathFont,qe.BOLDSANSSERIF],mathbfsfup:[je.MathFont,qe.BOLDSANSSERIF],mathsfit:[je.MathFont,qe.SANSSERIFITALIC],mathbfsfit:[je.MathFont,qe.SANSSERIFBOLDITALIC],mathtt:[je.MathFont,qe.MONOSPACE],mathcal:[je.MathFont,qe.CALLIGRAPHIC],mathbfcal:[je.MathFont,qe.BOLDCALLIGRAPHIC],symrm:[je.MathFont,qe.NORMAL],symup:[je.MathFont,qe.NORMAL],symnormal:[je.MathFont,""],symbf:[je.MathFont,qe.BOLD,qe.BOLDITALIC],symbfup:[je.MathFont,qe.BOLD],symit:[je.MathFont,qe.ITALIC],symbfit:[je.MathFont,qe.BOLDITALIC],symbb:[je.MathFont,qe.DOUBLESTRUCK],symfrak:[je.MathFont,qe.FRAKTUR],symbffrak:[je.MathFont,qe.BOLDFRAKTUR],symscr:[je.MathFont,qe.SCRIPT],symbfscr:[je.MathFont,qe.BOLDSCRIPT],symsf:[je.MathFont,qe.SANSSERIF,qe.SANSSERIFITALIC],symsfup:[je.MathFont,qe.SANSSERIF],symbfsf:[je.MathFont,qe.BOLDSANSSERIF],symbfsfup:[je.MathFont,qe.BOLDSANSSERIF],symsfit:[je.MathFont,qe.SANSSERIFITALIC],symbfsfit:[je.MathFont,qe.SANSSERIFBOLDITALIC],symtt:[je.MathFont,qe.MONOSPACE],symcal:[je.MathFont,qe.CALLIGRAPHIC],symbfcal:[je.MathFont,qe.BOLDCALLIGRAPHIC],textrm:[je.HBox,null,qe.NORMAL],textup:[je.HBox,null,qe.NORMAL],textnormal:[je.HBox],textit:[je.HBox,null,qe.ITALIC],textbf:[je.HBox,null,qe.BOLD],textsf:[je.HBox,null,qe.SANSSERIF],texttt:[je.HBox,null,qe.MONOSPACE],tiny:[je.SetSize,.5],Tiny:[je.SetSize,.6],scriptsize:[je.SetSize,.7],small:[je.SetSize,.85],normalsize:[je.SetSize,1],large:[je.SetSize,1.2],Large:[je.SetSize,1.44],LARGE:[je.SetSize,1.73],huge:[je.SetSize,2.07],Huge:[je.SetSize,2.49],arcsin:je.NamedFn,arccos:je.NamedFn,arctan:je.NamedFn,arg:je.NamedFn,cos:je.NamedFn,cosh:je.NamedFn,cot:je.NamedFn,coth:je.NamedFn,csc:je.NamedFn,deg:je.NamedFn,det:je.NamedOp,dim:je.NamedFn,exp:je.NamedFn,gcd:je.NamedOp,hom:je.NamedFn,inf:je.NamedOp,ker:je.NamedFn,lg:je.NamedFn,lim:je.NamedOp,liminf:[je.NamedOp,"lim inf"],limsup:[je.NamedOp,"lim sup"],ln:je.NamedFn,log:je.NamedFn,max:je.NamedOp,min:je.NamedOp,Pr:je.NamedOp,sec:je.NamedFn,sin:je.NamedFn,sinh:je.NamedFn,sup:je.NamedOp,tan:je.NamedFn,tanh:je.NamedFn,limits:[je.Limits,!0],nolimits:[je.Limits,!1],overline:[je.UnderOver,"2015"],underline:[je.UnderOver,"2015"],overbrace:[je.UnderOver,"23DE",!0],underbrace:[je.UnderOver,"23DF",!0],overparen:[je.UnderOver,"23DC"],underparen:[je.UnderOver,"23DD"],overrightarrow:[je.UnderOver,"2192"],underrightarrow:[je.UnderOver,"2192"],overleftarrow:[je.UnderOver,"2190"],underleftarrow:[je.UnderOver,"2190"],overleftrightarrow:[je.UnderOver,"2194"],underleftrightarrow:[je.UnderOver,"2194"],overset:je.Overset,underset:je.Underset,overunderset:je.Overunderset,stackrel:[je.Macro,"\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:[je.Macro,"\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:je.Over,overwithdelims:je.Over,atop:je.Over,atopwithdelims:je.Over,above:je.Over,abovewithdelims:je.Over,brace:[je.Over,"{","}"],brack:[je.Over,"[","]"],choose:[je.Over,"(",")"],frac:je.Frac,sqrt:je.Sqrt,root:je.Root,uproot:[je.MoveRoot,"upRoot"],leftroot:[je.MoveRoot,"leftRoot"],left:je.LeftRight,right:je.LeftRight,middle:je.LeftRight,llap:je.Lap,rlap:je.Lap,raise:je.RaiseLower,lower:je.RaiseLower,moveleft:je.MoveLeftRight,moveright:je.MoveLeftRight,",":[je.Spacer,Fe.thinmathspace],":":[je.Spacer,Fe.mediummathspace],">":[je.Spacer,Fe.mediummathspace],";":[je.Spacer,Fe.thickmathspace],"!":[je.Spacer,Fe.negativethinmathspace],enspace:[je.Spacer,.5],quad:[je.Spacer,1],qquad:[je.Spacer,2],thinspace:[je.Spacer,Fe.thinmathspace],negthinspace:[je.Spacer,Fe.negativethinmathspace],"*":je.DiscretionaryTimes,allowbreak:je.AllowBreak,goodbreak:[je.Linebreak,ut.LineBreak.GOODBREAK],badbreak:[je.Linebreak,ut.LineBreak.BADBREAK],nobreak:[je.Linebreak,ut.LineBreak.NOBREAK],break:je.Break,hskip:je.Hskip,hspace:je.Hskip,kern:[je.Hskip,!0],mskip:je.Hskip,mspace:je.Hskip,mkern:[je.Hskip,!0],rule:je.rule,Rule:[je.Rule],Space:[je.Rule,"blank"],nonscript:je.Nonscript,big:[je.MakeBig,H.ORD,.85],Big:[je.MakeBig,H.ORD,1.15],bigg:[je.MakeBig,H.ORD,1.45],Bigg:[je.MakeBig,H.ORD,1.75],bigl:[je.MakeBig,H.OPEN,.85],Bigl:[je.MakeBig,H.OPEN,1.15],biggl:[je.MakeBig,H.OPEN,1.45],Biggl:[je.MakeBig,H.OPEN,1.75],bigr:[je.MakeBig,H.CLOSE,.85],Bigr:[je.MakeBig,H.CLOSE,1.15],biggr:[je.MakeBig,H.CLOSE,1.45],Biggr:[je.MakeBig,H.CLOSE,1.75],bigm:[je.MakeBig,H.REL,.85],Bigm:[je.MakeBig,H.REL,1.15],biggm:[je.MakeBig,H.REL,1.45],Biggm:[je.MakeBig,H.REL,1.75],mathord:[je.TeXAtom,H.ORD],mathop:[je.TeXAtom,H.OP],mathopen:[je.TeXAtom,H.OPEN],mathclose:[je.TeXAtom,H.CLOSE],mathbin:[je.TeXAtom,H.BIN],mathrel:[je.TeXAtom,H.REL],mathpunct:[je.TeXAtom,H.PUNCT],mathinner:[je.TeXAtom,H.INNER],vtop:[je.VBox,"top"],vcenter:[je.VBox,"center"],vbox:[je.VBox,"bottom"],hsize:je.Hsize,parbox:je.ParBox,breakAlign:je.BreakAlign,buildrel:je.BuildRel,hbox:[je.HBox,0],text:je.HBox,mbox:[je.HBox,0],fbox:je.FBox,boxed:[je.Macro,"\\fbox{$\\displaystyle{#1}$}",1],framebox:je.FrameBox,makebox:je.MakeBox,strut:je.Strut,mathstrut:[je.Macro,"\\vphantom{(}"],phantom:je.Phantom,vphantom:[je.Phantom,1,0],hphantom:[je.Phantom,0,1],smash:je.Smash,acute:[je.Accent,"00B4"],grave:[je.Accent,"0060"],ddot:[je.Accent,"00A8"],dddot:[je.Accent,"20DB"],ddddot:[je.Accent,"20DC"],tilde:[je.Accent,"007E"],bar:[je.Accent,"00AF"],breve:[je.Accent,"02D8"],check:[je.Accent,"02C7"],hat:[je.Accent,"005E"],vec:[je.Accent,"2192",!1],dot:[je.Accent,"02D9"],widetilde:[je.Accent,"007E",!0],widehat:[je.Accent,"005E",!0],matrix:je.Matrix,array:je.Matrix,pmatrix:[je.Matrix,"(",")"],cases:[je.Matrix,"{","","left left",null,".2em",null,!0],eqalign:[je.Matrix,null,null,"right left",ze,".5em","D"],displaylines:[je.Matrix,null,null,"center",null,".5em","D"],cr:je.Cr,"\\":je.CrLaTeX,newline:[je.CrLaTeX,!0],hline:je.HLine,hdashline:[je.HLine,"dashed"],eqalignno:[je.Matrix,null,null,"right left",ze,".5em","D",null,"right"],leqalignno:[je.Matrix,null,null,"right left",ze,".5em","D",null,"left"],hfill:je.HFill,hfil:je.HFill,hfilll:je.HFill,bmod:[je.Macro,'\\mmlToken{mo}[lspace="'+ze+'" rspace="'+ze+'"]{mod}'],pmod:[je.Macro,"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:[je.Macro,"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:[je.Macro,"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:[je.Macro,"\\;\\Longleftrightarrow\\;"],skew:[je.Macro,"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:[je.Macro,"\\rlap{#1}\\kern1px{#1}",1],TeX:[je.Macro,"T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:[je.Macro,"L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],not:je.Not,dots:je.Dots,space:je.Tilde,"\xa0":je.Tilde," ":je.Tilde,begin:je.BeginEnd,end:je.BeginEnd,label:je.HandleLabel,ref:je.HandleRef,nonumber:je.HandleNoTag,newcolumntype:je.NewColumnType,mathchoice:je.MathChoice,mmlToken:je.MmlToken}),new $t("environment",He.environment,{displaymath:[je.Equation,null,!1],math:[je.Equation,null,!1,!1],array:[je.AlignedArray],darray:[je.AlignedArray,null,"D"],equation:[je.Equation,null,!0],eqnarray:[je.EqnArray,null,!0,!0,"rcl","bmt",Mt.cols(0,Fe.thickmathspace),".5em"],indentalign:[je.IndentAlign]}),new Xt("not_remap",null,{"\u2190":"\u219a","\u2192":"\u219b","\u2194":"\u21ae","\u21d0":"\u21cd","\u21d2":"\u21cf","\u21d4":"\u21ce","\u2208":"\u2209","\u220b":"\u220c","\u2223":"\u2224","\u2225":"\u2226","\u223c":"\u2241","~":"\u2241","\u2243":"\u2244","\u2245":"\u2247","\u2248":"\u2249","\u224d":"\u226d","=":"\u2260","\u2261":"\u2262","<":"\u226e",">":"\u226f","\u2264":"\u2270","\u2265":"\u2271","\u2272":"\u2274","\u2273":"\u2275","\u2276":"\u2278","\u2277":"\u2279","\u227a":"\u2280","\u227b":"\u2281","\u2282":"\u2284","\u2283":"\u2285","\u2286":"\u2288","\u2287":"\u2289","\u22a2":"\u22ac","\u22a8":"\u22ad","\u22a9":"\u22ae","\u22ab":"\u22af","\u227c":"\u22e0","\u227d":"\u22e1","\u2291":"\u22e2","\u2292":"\u22e3","\u22b2":"\u22ea","\u22b3":"\u22eb","\u22b4":"\u22ec","\u22b5":"\u22ed","\u2203":"\u2204"});const $e=MathJax._.core.MmlTree.OperatorDictionary,Je=($e.OPDEF,$e.MO,$e.RANGES,$e.getRange),Ve=($e.MMLSPACING,$e.OPTABLE,MathJax._.util.context),We=(Ve.hasWindow,Ve.context),Ze=ut.Variant;function Ye(t,e){const r=t.stack.env.font,s=t.stack.env.italicFont,i=r?{mathvariant:r}:{},n=Zt.getMap("remap").lookup(e),a=Je(e),o=a[3],c=t.create("token",o,i,n?n.char:e),l=Mt.isLatinOrGreekChar(e)?t.configuration.mathStyle(e,!0)||s:"",h=a[4]||(r&&l===Ze.NORMAL?"":l);h&&c.attributes.set("mathvariant",h),"mo"===o&&(V.setProperty(c,"fixStretchy",!0),t.configuration.addNode("fixStretchy",c)),t.Push(c)}new Xt("remap",null,{"-":"\u2212","*":"\u2217","`":"\u2018"});class Qe extends It{}const tr=te.create("base",{[rt.CONFIG]:function(t,e){const r=e.parseOptions.options;r.digits&&(r.numberPattern=r.digits),new jt("digit",He.digit,r.initialDigit),new jt("letter",He.variable,r.initialLetter);t.handlers.get(st.CHARACTER).add(["letter","digit"],null,4)},[rt.HANDLER]:{[st.CHARACTER]:["command","special"],[st.DELIMITER]:["delimiter"],[st.MACRO]:["delimiter","macros","lcGreek","ucGreek","mathchar0mi","mathchar0mo","mathchar7"],[st.ENVIRONMENT]:["environment"]},[rt.FALLBACK]:{[st.CHARACTER]:Ye,[st.MACRO]:function(t,e){throw new ct("UndefinedControlSequence","Undefined control sequence %1","\\"+e)},[st.ENVIRONMENT]:function(t,e){throw new ct("UnknownEnv","Unknown environment '%1'",e)}},[rt.ITEMS]:{[ae.prototype.kind]:ae,[oe.prototype.kind]:oe,[ce.prototype.kind]:ce,[le.prototype.kind]:le,[he.prototype.kind]:he,[ue.prototype.kind]:ue,[de.prototype.kind]:de,[me.prototype.kind]:me,[pe.prototype.kind]:pe,[ge.prototype.kind]:ge,[fe.prototype.kind]:fe,[be.prototype.kind]:be,[ye.prototype.kind]:ye,[Ae.prototype.kind]:Ae,[ke.prototype.kind]:ke,[ve.prototype.kind]:ve,[Pe.prototype.kind]:Pe,[Te.prototype.kind]:Te,[Me.prototype.kind]:Me,[we.prototype.kind]:we,[xe.prototype.kind]:xe,[Oe.prototype.kind]:Oe,[Ee.prototype.kind]:Ee,[Se.prototype.kind]:Se,[Ie.prototype.kind]:Ie,[Ce.prototype.kind]:Ce},[rt.OPTIONS]:{maxMacros:1e3,digits:"",numberPattern:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,initialDigit:/[0-9.,]/,identifierPattern:/^[a-zA-Z]+/,initialLetter:/[a-zA-Z]/,baseURL:We.document&&0!==We.document.getElementsByTagName("base").length?String(We.document.location).replace(/#.*$/,""):""},[rt.TAGS]:{base:Qe},[rt.POSTPROCESSORS]:[[function({data:t}){for(const e of t.getList("nonscript"))if(e.attributes.get("scriptlevel")>0){const r=e.parent;if(r.childNodes.splice(r.childIndex(e),1),t.removeFromList(e.kind,[e]),e.isKind("mrow")){const r=e.childNodes[0];t.removeFromList("mstyle",[r]),t.removeFromList("mspace",r.childNodes[0].childNodes)}}else e.isKind("mrow")&&(e.parent.replaceChild(e.childNodes[0],e),t.removeFromList("mrow",[e]))},-4]]});class er extends E{static configure(t){const e=new se(t,["tex"]);return e.init(),e}static tags(t,e){Bt.addTags(e.tags),Bt.setDefault(t.options.tags),t.tags=Bt.getDefault(),t.tags.configuration=t}constructor(t={}){const[e,r,s]=N(t,er.OPTIONS,K.OPTIONS);super(r),this.findTeX=this.options.FindTeX||new K(s);const i=this.options.packages,n=this.configuration=er.configure(i),a=this._parseOptions=new Et(n,[this.options,Bt.OPTIONS]);L(a.options,e),n.config(this),er.tags(a,n),this.postFilters.addList([[et.cleanSubSup,-7],[et.setInherited,-6],[et.checkScriptlevel,-5],[et.moveLimits,-4],[et.cleanStretchy,-3],[et.cleanAttributes,-2],[et.combineRelations,-1]])}setMmlFactory(t){super.setMmlFactory(t),this._parseOptions.nodeFactory.setMmlFactory(t)}get parseOptions(){return this._parseOptions}reset(t=0){this.parseOptions.tags.reset(t)}compile(t,e){let r,s;this.parseOptions.clear(),this.parseOptions.mathItem=t,this.executeFilters(this.preFilters,t,e,this.parseOptions),this.latex=t.math,this.parseOptions.tags.startEquation(t);try{s=new dt(this.latex,{display:t.display,isInner:!1},this.parseOptions),r=s.mml()}catch(t){if(!(t instanceof ct))throw t;this.parseOptions.error=!0,r=this.options.formatError(this,t)}return r=this.parseOptions.nodeFactory.create("node","math",[r]),r.attributes.set(ut.Attr.LATEX,this.latex),t.display&&V.setAttribute(r,"display","block"),this.parseOptions.tags.finishEquation(t),this.parseOptions.root=r,this.executeFilters(this.postFilters,t,e,this.parseOptions),s&&s.stack.env.hsize&&(V.setAttribute(r,"maxwidth",s.stack.env.hsize),V.setAttribute(r,"overflow","linebreak")),this.mathNode=this.parseOptions.root,this.mathNode}findMath(t){return this.findTeX.findMath(t)}formatError(t){const e=t.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",e,t.id,this.latex)}}er.NAME="TeX",er.OPTIONS=Object.assign(Object.assign({},E.OPTIONS),{FindTeX:null,packages:["base"],maxBuffer:5120,maxTemplateSubtitutions:1e4,mathStyle:"TeX",formatError:(t,e)=>t.formatError(e)}),MathJax.loader&&MathJax.loader.checkVersion("input/tex-base","4.0.0","input"),O({_:{input:{tex_ts:w,tex:{ColumnParser:p,Configuration:k,FilterUtil:s,FindTeX:e,HandlerTypes:i,MapHandler:A,NodeFactory:d,NodeUtil:r,ParseMethods:T,ParseOptions:g,ParseUtil:m,Stack:a,StackItem:c,StackItemFactory:u,Tags:f,TexConstants:l,TexError:o,TexParser:h,Token:b,TokenMap:y,UnitUtil:n,base:{BaseConfiguration:M,BaseItems:v,BaseMethods:P}}}}}),function(t=[],e=!0){if(MathJax.startup){e&&(MathJax.startup.registerConstructor("tex",MathJax._.input.tex_ts.TeX),MathJax.startup.useInput("tex")),MathJax.config.tex||(MathJax.config.tex={});let r=MathJax.config.tex.packages;MathJax.config.tex.packages=t,r&&(Array.isArray(r)&&(r={"[+]":r.filter((e=>!t.includes(e)))}),C(MathJax.config.tex,{packages:r}))}}(["base"])})();