diff --git a/example/dist/assets/index-fbff7a1e.js b/example/dist/assets/index-cdacba05.js similarity index 99% rename from example/dist/assets/index-fbff7a1e.js rename to example/dist/assets/index-cdacba05.js index c014e21..c604fc5 100644 --- a/example/dist/assets/index-fbff7a1e.js +++ b/example/dist/assets/index-cdacba05.js @@ -393,4 +393,4 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, |[ \r ]+ ?)[ \r ]*`,fd="[̀-ͯ]",mC=new RegExp(fd+"+$"),gC="("+B6+"+)|"+(pC+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(fd+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(fd+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+hC)+("|"+dC+")");let y4=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(gC,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Yn("EOF",new $t(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new B("Unexpected character: '"+e[t]+"'",new Yn(e[t],new $t(this,t,t+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=e.indexOf(` `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new Yn(i,new $t(this,t,this.tokenRegex.lastIndex))}};class yC{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new B("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var vC=T6;k("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});k("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});k("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});k("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});k("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});k("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");k("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var v4={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};k("\\char",function(r){var e=r.popToken(),t,n="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new B("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=v4[e.text],n==null||n>=t)throw new B("Invalid base-"+t+" digit "+e.text);for(var i;(i=v4[r.future().text])!=null&&i{var n=r.consumeArg().tokens;if(n.length!==1)throw new B("\\newcommand's first argument must be a macro name");var i=n[0].text,s=r.isDefined(i);if(s&&!e)throw new B("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!s&&!t)throw new B("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var l="",a=r.expandNextToken();a.text!=="]"&&a.text!=="EOF";)l+=a.text,a=r.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new B("Invalid number of arguments: "+l);o=parseInt(l),n=r.consumeArg().tokens}return r.macros.set(i,{tokens:n,numArgs:o}),""};k("\\newcommand",r=>Xh(r,!1,!0));k("\\renewcommand",r=>Xh(r,!0,!1));k("\\providecommand",r=>Xh(r,!0,!0));k("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});k("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});k("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),Rn[t],ve.math[t],ve.text[t]),""});k("\\bgroup","{");k("\\egroup","}");k("~","\\nobreakspace");k("\\lq","`");k("\\rq","'");k("\\aa","\\r a");k("\\AA","\\r A");k("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");k("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");k("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");k("ℬ","\\mathscr{B}");k("ℰ","\\mathscr{E}");k("ℱ","\\mathscr{F}");k("ℋ","\\mathscr{H}");k("ℐ","\\mathscr{I}");k("ℒ","\\mathscr{L}");k("ℳ","\\mathscr{M}");k("ℛ","\\mathscr{R}");k("ℭ","\\mathfrak{C}");k("ℌ","\\mathfrak{H}");k("ℨ","\\mathfrak{Z}");k("\\Bbbk","\\Bbb{k}");k("·","\\cdotp");k("\\llap","\\mathllap{\\textrm{#1}}");k("\\rlap","\\mathrlap{\\textrm{#1}}");k("\\clap","\\mathclap{\\textrm{#1}}");k("\\mathstrut","\\vphantom{(}");k("\\underbar","\\underline{\\text{#1}}");k("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');k("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");k("\\ne","\\neq");k("≠","\\neq");k("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");k("∉","\\notin");k("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");k("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");k("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");k("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");k("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");k("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");k("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");k("⟂","\\perp");k("‼","\\mathclose{!\\mkern-0.8mu!}");k("∌","\\notni");k("⌜","\\ulcorner");k("⌝","\\urcorner");k("⌞","\\llcorner");k("⌟","\\lrcorner");k("©","\\copyright");k("®","\\textregistered");k("️","\\textregistered");k("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');k("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');k("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');k("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');k("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");k("⋮","\\vdots");k("\\varGamma","\\mathit{\\Gamma}");k("\\varDelta","\\mathit{\\Delta}");k("\\varTheta","\\mathit{\\Theta}");k("\\varLambda","\\mathit{\\Lambda}");k("\\varXi","\\mathit{\\Xi}");k("\\varPi","\\mathit{\\Pi}");k("\\varSigma","\\mathit{\\Sigma}");k("\\varUpsilon","\\mathit{\\Upsilon}");k("\\varPhi","\\mathit{\\Phi}");k("\\varPsi","\\mathit{\\Psi}");k("\\varOmega","\\mathit{\\Omega}");k("\\substack","\\begin{subarray}{c}#1\\end{subarray}");k("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");k("\\boxed","\\fbox{$\\displaystyle{#1}$}");k("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");k("\\implies","\\DOTSB\\;\\Longrightarrow\\;");k("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var x4={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};k("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in x4?e=x4[t]:(t.slice(0,4)==="\\not"||t in ve.math&&G.contains(["bin","rel"],ve.math[t].group))&&(e="\\dotsb"),e});var Qh={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};k("\\dotso",function(r){var e=r.future().text;return e in Qh?"\\ldots\\,":"\\ldots"});k("\\dotsc",function(r){var e=r.future().text;return e in Qh&&e!==","?"\\ldots\\,":"\\ldots"});k("\\cdots",function(r){var e=r.future().text;return e in Qh?"\\@cdots\\,":"\\@cdots"});k("\\dotsb","\\cdots");k("\\dotsm","\\cdots");k("\\dotsi","\\!\\cdots");k("\\dotsx","\\ldots\\,");k("\\DOTSI","\\relax");k("\\DOTSB","\\relax");k("\\DOTSX","\\relax");k("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");k("\\,","\\tmspace+{3mu}{.1667em}");k("\\thinspace","\\,");k("\\>","\\mskip{4mu}");k("\\:","\\tmspace+{4mu}{.2222em}");k("\\medspace","\\:");k("\\;","\\tmspace+{5mu}{.2777em}");k("\\thickspace","\\;");k("\\!","\\tmspace-{3mu}{.1667em}");k("\\negthinspace","\\!");k("\\negmedspace","\\tmspace-{4mu}{.2222em}");k("\\negthickspace","\\tmspace-{5mu}{.277em}");k("\\enspace","\\kern.5em ");k("\\enskip","\\hskip.5em\\relax");k("\\quad","\\hskip1em\\relax");k("\\qquad","\\hskip2em\\relax");k("\\tag","\\@ifstar\\tag@literal\\tag@paren");k("\\tag@paren","\\tag@literal{({#1})}");k("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new B("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});k("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");k("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");k("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");k("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");k("\\newline","\\\\\\relax");k("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var L6=L($r["Main-Regular"]["T".charCodeAt(0)][1]-.7*$r["Main-Regular"]["A".charCodeAt(0)][1]);k("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+L6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");k("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+L6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");k("\\hspace","\\@ifstar\\@hspacer\\@hspace");k("\\@hspace","\\hskip #1\\relax");k("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");k("\\ordinarycolon",":");k("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");k("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');k("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');k("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');k("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');k("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');k("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');k("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');k("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');k("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');k("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');k("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');k("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');k("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');k("∷","\\dblcolon");k("∹","\\eqcolon");k("≔","\\coloneqq");k("≕","\\eqqcolon");k("⩴","\\Coloneqq");k("\\ratio","\\vcentcolon");k("\\coloncolon","\\dblcolon");k("\\colonequals","\\coloneqq");k("\\coloncolonequals","\\Coloneqq");k("\\equalscolon","\\eqqcolon");k("\\equalscoloncolon","\\Eqqcolon");k("\\colonminus","\\coloneq");k("\\coloncolonminus","\\Coloneq");k("\\minuscolon","\\eqcolon");k("\\minuscoloncolon","\\Eqcolon");k("\\coloncolonapprox","\\Colonapprox");k("\\coloncolonsim","\\Colonsim");k("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");k("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");k("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");k("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");k("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");k("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");k("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");k("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");k("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");k("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");k("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");k("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");k("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");k("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");k("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");k("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");k("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");k("\\nleqq","\\html@mathml{\\@nleqq}{≰}");k("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");k("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");k("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");k("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");k("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");k("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");k("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");k("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");k("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");k("\\imath","\\html@mathml{\\@imath}{ı}");k("\\jmath","\\html@mathml{\\@jmath}{ȷ}");k("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");k("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");k("⟦","\\llbracket");k("⟧","\\rrbracket");k("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");k("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");k("⦃","\\lBrace");k("⦄","\\rBrace");k("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");k("⦵","\\minuso");k("\\darr","\\downarrow");k("\\dArr","\\Downarrow");k("\\Darr","\\Downarrow");k("\\lang","\\langle");k("\\rang","\\rangle");k("\\uarr","\\uparrow");k("\\uArr","\\Uparrow");k("\\Uarr","\\Uparrow");k("\\N","\\mathbb{N}");k("\\R","\\mathbb{R}");k("\\Z","\\mathbb{Z}");k("\\alef","\\aleph");k("\\alefsym","\\aleph");k("\\Alpha","\\mathrm{A}");k("\\Beta","\\mathrm{B}");k("\\bull","\\bullet");k("\\Chi","\\mathrm{X}");k("\\clubs","\\clubsuit");k("\\cnums","\\mathbb{C}");k("\\Complex","\\mathbb{C}");k("\\Dagger","\\ddagger");k("\\diamonds","\\diamondsuit");k("\\empty","\\emptyset");k("\\Epsilon","\\mathrm{E}");k("\\Eta","\\mathrm{H}");k("\\exist","\\exists");k("\\harr","\\leftrightarrow");k("\\hArr","\\Leftrightarrow");k("\\Harr","\\Leftrightarrow");k("\\hearts","\\heartsuit");k("\\image","\\Im");k("\\infin","\\infty");k("\\Iota","\\mathrm{I}");k("\\isin","\\in");k("\\Kappa","\\mathrm{K}");k("\\larr","\\leftarrow");k("\\lArr","\\Leftarrow");k("\\Larr","\\Leftarrow");k("\\lrarr","\\leftrightarrow");k("\\lrArr","\\Leftrightarrow");k("\\Lrarr","\\Leftrightarrow");k("\\Mu","\\mathrm{M}");k("\\natnums","\\mathbb{N}");k("\\Nu","\\mathrm{N}");k("\\Omicron","\\mathrm{O}");k("\\plusmn","\\pm");k("\\rarr","\\rightarrow");k("\\rArr","\\Rightarrow");k("\\Rarr","\\Rightarrow");k("\\real","\\Re");k("\\reals","\\mathbb{R}");k("\\Reals","\\mathbb{R}");k("\\Rho","\\mathrm{P}");k("\\sdot","\\cdot");k("\\sect","\\S");k("\\spades","\\spadesuit");k("\\sub","\\subset");k("\\sube","\\subseteq");k("\\supe","\\supseteq");k("\\Tau","\\mathrm{T}");k("\\thetasym","\\vartheta");k("\\weierp","\\wp");k("\\Zeta","\\mathrm{Z}");k("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");k("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");k("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");k("\\bra","\\mathinner{\\langle{#1}|}");k("\\ket","\\mathinner{|{#1}\\rangle}");k("\\braket","\\mathinner{\\langle{#1}\\rangle}");k("\\Bra","\\left\\langle#1\\right|");k("\\Ket","\\left|#1\\right\\rangle");var F6=r=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var a=f=>d=>{r&&(d.macros.set("|",o),i.length&&d.macros.set("\\|",l));var p=f;if(!f&&i.length){var g=d.future();g.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};e.macros.set("|",a(!1)),i.length&&e.macros.set("\\|",a(!0));var u=e.consumeArg().tokens,c=e.expandTokens([...s,...u,...t]);return e.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};k("\\bra@ket",F6(!1));k("\\bra@set",F6(!0));k("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");k("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");k("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");k("\\angln","{\\angl n}");k("\\blue","\\textcolor{##6495ed}{#1}");k("\\orange","\\textcolor{##ffa500}{#1}");k("\\pink","\\textcolor{##ff00af}{#1}");k("\\red","\\textcolor{##df0030}{#1}");k("\\green","\\textcolor{##28ae7b}{#1}");k("\\gray","\\textcolor{gray}{#1}");k("\\purple","\\textcolor{##9d38bd}{#1}");k("\\blueA","\\textcolor{##ccfaff}{#1}");k("\\blueB","\\textcolor{##80f6ff}{#1}");k("\\blueC","\\textcolor{##63d9ea}{#1}");k("\\blueD","\\textcolor{##11accd}{#1}");k("\\blueE","\\textcolor{##0c7f99}{#1}");k("\\tealA","\\textcolor{##94fff5}{#1}");k("\\tealB","\\textcolor{##26edd5}{#1}");k("\\tealC","\\textcolor{##01d1c1}{#1}");k("\\tealD","\\textcolor{##01a995}{#1}");k("\\tealE","\\textcolor{##208170}{#1}");k("\\greenA","\\textcolor{##b6ffb0}{#1}");k("\\greenB","\\textcolor{##8af281}{#1}");k("\\greenC","\\textcolor{##74cf70}{#1}");k("\\greenD","\\textcolor{##1fab54}{#1}");k("\\greenE","\\textcolor{##0d923f}{#1}");k("\\goldA","\\textcolor{##ffd0a9}{#1}");k("\\goldB","\\textcolor{##ffbb71}{#1}");k("\\goldC","\\textcolor{##ff9c39}{#1}");k("\\goldD","\\textcolor{##e07d10}{#1}");k("\\goldE","\\textcolor{##a75a05}{#1}");k("\\redA","\\textcolor{##fca9a9}{#1}");k("\\redB","\\textcolor{##ff8482}{#1}");k("\\redC","\\textcolor{##f9685d}{#1}");k("\\redD","\\textcolor{##e84d39}{#1}");k("\\redE","\\textcolor{##bc2612}{#1}");k("\\maroonA","\\textcolor{##ffbde0}{#1}");k("\\maroonB","\\textcolor{##ff92c6}{#1}");k("\\maroonC","\\textcolor{##ed5fa6}{#1}");k("\\maroonD","\\textcolor{##ca337c}{#1}");k("\\maroonE","\\textcolor{##9e034e}{#1}");k("\\purpleA","\\textcolor{##ddd7ff}{#1}");k("\\purpleB","\\textcolor{##c6b9fc}{#1}");k("\\purpleC","\\textcolor{##aa87ff}{#1}");k("\\purpleD","\\textcolor{##7854ab}{#1}");k("\\purpleE","\\textcolor{##543b78}{#1}");k("\\mintA","\\textcolor{##f5f9e8}{#1}");k("\\mintB","\\textcolor{##edf2df}{#1}");k("\\mintC","\\textcolor{##e0e5cc}{#1}");k("\\grayA","\\textcolor{##f6f7f7}{#1}");k("\\grayB","\\textcolor{##f0f1f2}{#1}");k("\\grayC","\\textcolor{##e3e5e6}{#1}");k("\\grayD","\\textcolor{##d6d8da}{#1}");k("\\grayE","\\textcolor{##babec2}{#1}");k("\\grayF","\\textcolor{##888d93}{#1}");k("\\grayG","\\textcolor{##626569}{#1}");k("\\grayH","\\textcolor{##3b3e40}{#1}");k("\\grayI","\\textcolor{##21242c}{#1}");k("\\kaBlue","\\textcolor{##314453}{#1}");k("\\kaGreen","\\textcolor{##71B307}{#1}");var $6={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class xC{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new yC(vC,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new y4(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:t,end:n}=this.consumeArg());return this.pushToken(new Yn("EOF",n.loc)),this.pushTokens(i),t.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),s,o=0,l=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new B("Extra }",s)}else if(s.text==="EOF")throw new B("Unexpected end of input in a macro argument, expected '"+(e&&n?e[l]:"}")+"'",s);if(e&&n)if((o===0||o===1&&e[l]==="{")&&s.text===e[l]){if(++l,l===e.length){t.splice(-l,l);break}}else l=0}while(o!==0||n);return i.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new B("The length of delimiters doesn't match the number of args!");for(var n=t[0],i=0;ithis.settings.maxExpand)throw new B("Too many expansions: infinite loop or need to increase maxExpand setting");var s=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var l=s.length-1;l>=0;--l){var a=s[l];if(a.text==="#"){if(l===0)throw new B("Incomplete placeholder at end of macro body",a);if(a=s[--l],a.text==="#")s.splice(l+1,1);else if(/^[1-9]$/.test(a.text))s.splice(l,2,...o[+a.text-1]);else throw new B("Not a valid argument number",a)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Yn(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),t.push(i)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(n=>n.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof t=="function"?t(this):t;if(typeof i=="string"){var s=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var l=new y4(i,this.settings),a=[],u=l.lex();u.text!=="EOF";)a.push(u),u=l.lex();a.reverse();var c={tokens:a,numArgs:s};return c}return i}isDefined(e){return this.macros.has(e)||Rn.hasOwnProperty(e)||ve.math.hasOwnProperty(e)||ve.text.hasOwnProperty(e)||$6.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Rn.hasOwnProperty(e)&&!Rn[e].primitive}}var k4=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ca=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ac={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},w4={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};let V6=class dd{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new xC(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new B("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Yn("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(dd.endOfExpression.indexOf(i.text)!==-1||t&&i.text===t||e&&Rn[i.text]&&Rn[i.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var l=ve[this.mode][t].group,a=$t.range(e),u;if(lT.hasOwnProperty(l)){var c=l;u={type:"atom",mode:this.mode,family:c,loc:a,text:t}}else u={type:l,mode:this.mode,loc:a,text:t};o=u}else if(t.charCodeAt(0)>=128)this.settings.strict&&(J5(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:$t.range(e),text:t};else return null;if(this.consume(),s)for(var f=0;f.5?t+=i.toLowerCase():t+=i}return t}var U6={},tp={},El={};Object.defineProperty(El,"__esModule",{value:!0});var MC=function(){function r(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:"";TC(this,r),this.type=e,this.value=t,this.name=null}return MC(r,[{key:"equals",value:function(t){return this.type===t.type&&this.value===t.value}},{key:"toString",value:function(){if(CC.indexOf(this.type)>=0)return this.type;var t=typeof this.value=="function"?this.name:this.value;return this.type+"["+t+"]"}}]),r}();fe.TYPE_LPAREN="LPAREN";fe.TYPE_RPAREN="RPAREN";fe.TYPE_PLUS="PLUS";fe.TYPE_MINUS="MINUS";fe.TYPE_TIMES="TIMES";fe.TYPE_DIVIDE="DIVIDE";fe.TYPE_COMMAND="COMMAND";fe.TYPE_SYMBOL="SYMBOL";fe.TYPE_WHITESPACE="WHITESPACE";fe.TYPE_ABS="ABSOLUTEVAL";fe.TYPE_BANG="BANG";fe.TYPE_COMMA="COMMA";fe.TYPE_POWER="POWER";fe.TYPE_NUMBER="NUMBER";fe.patterns=new Map([[fe.TYPE_LPAREN,/(\(|\[|{|\\left\(|\\left\[)/],[fe.TYPE_RPAREN,/(\)|]|}|\\right\)|\\right])/],[fe.TYPE_PLUS,/\+/],[fe.TYPE_MINUS,/-/],[fe.TYPE_TIMES,/\*/],[fe.TYPE_DIVIDE,/\//],[fe.TYPE_COMMAND,/\\[A-Za-z]+/],[fe.TYPE_SYMBOL,/[A-Za-z_][A-Za-z_0-9]*/],[fe.TYPE_WHITESPACE,/\s+/],[fe.TYPE_ABS,/\|/],[fe.TYPE_BANG,/!/],[fe.TYPE_COMMA,/,/],[fe.TYPE_POWER,/\^/],[fe.TYPE_NUMBER,/\d+(\.\d+)?/]]);El.default=fe;var CC=["TPLUS","TMINUS","TTIMES","TDIVIDE","TWS","TABS","TBANG","TCOMMA","TPOWER"],lu={};Object.defineProperty(lu,"__esModule",{value:!0});lu.default={frac:2,sqrt:1,sin:1,cos:1,tan:1,asin:1,acos:1,atan:1,sec:1,csc:1,cot:1,asec:1,acsc:1,acot:1};var Er={};Object.defineProperty(Er,"__esModule",{value:!0});var EC=Er.fact=function(e){e=Math.round(e);var t=1;if(e<0)throw"Can't factorial a negative.";for(e;e>1;e--)t*=e;return t},NC=Er.frac=function(e,t){return e/t},AC=Er.logn=function(e,t){return Math.log(e)/Math.log(t)},OC=Er.rootn=function(e,t){return Math.pow(e,1/t)},zC=Er.sec=function(e){return 1/Math.cos(e)},IC=Er.csc=function(e){return 1/Math.sin(e)},DC=Er.cot=function(e){return 1/Math.tan(e)},W6={fact:EC,frac:NC,logn:AC,rootn:OC,sec:zC,csc:IC,cot:DC},Oc=!0,S4=!1,b4=void 0;try{for(var zc=Object.getOwnPropertyNames(Math)[Symbol.iterator](),M4;!(Oc=(M4=zc.next()).done);Oc=!0){var T4=M4.value;W6[T4]=Math[T4]}}catch(r){S4=!0,b4=r}finally{try{!Oc&&zc.return&&zc.return()}finally{if(S4)throw b4}}Er.default=W6;var rp={};Object.defineProperty(rp,"__esModule",{value:!0});rp.default=BC;var RC=El,Ic=PC(RC);function PC(r){return r&&r.__esModule?r:{default:r}}function BC(r){return r.type===Ic.default.TYPE_COMMAND&&["\\cdot","\\times"].includes(r.value)?new Ic.default(Ic.default.TYPE_TIMES,"*"):r}Object.defineProperty(tp,"__esModule",{value:!0});var LC=function(){function r(e,t){var n=[],i=!0,s=!1,o=void 0;try{for(var l=e[Symbol.iterator](),a;!(i=(a=l.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(u){s=!0,o=u}finally{try{!i&&l.return&&l.return()}finally{if(s)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),FC=function(){function r(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:JC,n=new GC(r,e,t);return n.lex(),n.tokens.toString=function(){return n.tokens.map(function(i){return i.toString()}).join(" ")},n.tokens}var GC=function(){function r(e,t,n){jC(this,r),this.buffer=e,this.constants=Object.assign({},t,_C.default),this.opts=n,this.tokens=[]}return FC(r,[{key:"lex",value:function(){this.lexExpression(),this.replaceConstants(),this.replaceCommands()}},{key:"lexExpression",value:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.hasNext();){var n=t?this.nextCharToken():this.next();if(this.tokens.push((0,WC.default)(n)),this.opts.latex&&XC(n)){var i=1;n.type===Bt.default.TYPE_COMMAND&&(i=HC.default[n.value.substr(1).toLowerCase()]);for(var s=0;s0}},{key:"next",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;if(this.skipWhitespace(),!this.hasNext())throw"Lexer error: reached end of stream";var n=!0,i=!1,s=void 0;try{for(var o=Bt.default.patterns[Symbol.iterator](),l;!(n=(l=o.next()).done);n=!0){var a=l.value,u=LC(a,2),c=u[0],f=u[1],d=new RegExp(/^/.source+f.source),p=d.exec(this.buffer.substr(0,t));if(p)return this.buffer=this.buffer.substr(p[0].length),new Bt.default(c,p[0])}}catch(g){i=!0,s=g}finally{try{!n&&o.return&&o.return()}finally{if(i)throw s}}throw"Lexer error: can't match any token"}},{key:"nextCharToken",value:function(){return this.skipWhitespace(),this.buffer.charAt(0)==="\\"?this.next():this.next(1)}},{key:"replaceCommands",value:function(){var t=!0,n=!1,i=void 0;try{for(var s=this.tokens[Symbol.iterator](),o;!(t=(o=s.next()).done);t=!0){var l=o.value;l.type===Bt.default.TYPE_COMMAND&&(l.value=l.value.substr(1).toLowerCase(),l.name=l.value,l.value=this.constants[l.name])}}catch(a){n=!0,i=a}finally{try{!t&&s.return&&s.return()}finally{if(n)throw i}}}},{key:"replaceConstants",value:function(){var t=!0,n=!1,i=void 0;try{for(var s=this.tokens[Symbol.iterator](),o;!(t=(o=s.next()).done);t=!0){var l=o.value;l.type===Bt.default.TYPE_SYMBOL&&(typeof this.constants[l.value]=="function"?(l.type=Bt.default.TYPE_FUNCTION,l.name=l.value,l.value=this.constants[l.value]):typeof this.constants[l.value]=="number"&&(l.type=Bt.default.TYPE_NUMBER,l.value=l.fn=this.constants[l.value]))}}catch(a){n=!0,i=a}finally{try{!t&&s.return&&s.return()}finally{if(n)throw i}}}},{key:"skipWhitespace",value:function(){var t=new RegExp(/^/.source+Bt.default.patterns.get(Bt.default.TYPE_WHITESPACE).source);this.buffer=this.buffer.replace(t,"")}}]),r}();function XC(r){return YC.indexOf(r.type)!==-1}function QC(r){return r.type===Bt.default.TYPE_LPAREN&&r.value==="{"}function ZC(r){return r.type===Bt.default.TYPE_RPAREN&&r.value==="}"}var np={},ip={};Object.defineProperty(ip,"__esModule",{value:!0});var eE=function(){function r(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:"";tE(this,r),this.type=e,this.value=t,this.name=null,this.children=[]}return eE(r,[{key:"addChild",value:function(t){return this.children.push(t),this}},{key:"evaluate",value:function(t){var n=0;switch(this.type){case r.TYPE_FUNCTION:var i=this.children.map(function(s){return s.evaluate(t)});n=this.value.apply(this,i);break;case r.TYPE_INVERSE:n=1/this.child.evaluate(t);break;case r.TYPE_NEGATE:n=-this.child.evaluate(t);break;case r.TYPE_NUMBER:n=this.value;break;case r.TYPE_POWER:n=Math.pow(this.children[0].evaluate(t),this.children[1].evaluate(t));break;case r.TYPE_PRODUCT:n=this.children.reduce(function(s,o){return s*o.evaluate(t)},1);break;case r.TYPE_SUM:n=this.children.reduce(function(s,o){return s+o.evaluate(t)},0);break;case r.TYPE_SYMBOL:if(isFinite(t[this.value]))return t[this.value];throw new Error("Symbol "+this.value+" is undefined or not a number")}return n}},{key:"isUnary",value:function(){return rE.indexOf(this.type)>=0}},{key:"printTree",value:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n="",i=" ",s=0;s1||this.isUnary()){var t=new r(this.type,this.value);for(var n in this.children)t.addChild(this.children[n].simplify());return t}else return this.children.length===1?this.children[0].simplify():this}},{key:"toString",value:function(){var t=typeof this.value=="function"?this.name:this.value;return this.children.length+" "+this.type+" ["+t+"]"}},{key:"child",get:function(){return this.children[0]}},{key:"nodeCount",get:function(){var t=1,n=!0,i=!1,s=void 0;try{for(var o=this.children[Symbol.iterator](),l;!(n=(l=o.next()).done);n=!0){var a=l.value;t+=a.nodeCount}}catch(u){i=!0,s=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw s}}return t}}]),r}();xn.TYPE_FUNCTION="FUNCTION";xn.TYPE_INVERSE="INVERSE";xn.TYPE_NEGATE="NEGATE";xn.TYPE_NUMBER="NUMBER";xn.TYPE_POWER="POWER";xn.TYPE_PRODUCT="PRODUCT";xn.TYPE_SUM="SUM";xn.TYPE_SYMBOL="SYMBOL";ip.default=xn;var rE=["FACTORIAL","FUNCTION","INVERSE","NEGATE"];Object.defineProperty(np,"__esModule",{value:!0});var nE=function(){function r(e,t){for(var n=0;n0&&arguments[0]!==void 0?arguments[0]:[];uE(this,r),this.cursor=0,this.tokens=e}return nE(r,[{key:"parse",value:function(){var t=this.sum();if(t=t.simplify(),this.currentToken!==void 0)throw console.log(t.printTree()),"Parsing error: Expected end of input, but got "+this.currentToken.type+" "+this.currentToken.value;return t}},{key:"accept",value:function(t){return this.currentToken&&this.currentToken.type===t?(this.cursor++,!0):!1}},{key:"expect",value:function(t){if(!this.accept(t))throw"Expected "+t+" but got "+(this.currentToken?this.currentToken.toString():"end of input.")}},{key:"sum",value:function(){var t=new be.default(be.default.TYPE_SUM);for(t.addChild(this.product());;)if(this.accept(ze.default.TYPE_PLUS))t.addChild(this.product());else if(this.accept(ze.default.TYPE_MINUS))t.addChild(new be.default(be.default.TYPE_NEGATE).addChild(this.product()));else break;return t}},{key:"product",value:function(){var t=new be.default(be.default.TYPE_PRODUCT);for(t.addChild(this.power());;)if(this.accept(ze.default.TYPE_TIMES))t.addChild(this.power());else if(this.accept(ze.default.TYPE_DIVIDE))t.addChild(new be.default(be.default.TYPE_INVERSE).addChild(this.power()));else if(this.accept(ze.default.TYPE_LPAREN))this.cursor--,t.addChild(this.power());else if(this.accept(ze.default.TYPE_SYMBOL)||this.accept(ze.default.TYPE_NUMBER)||this.accept(ze.default.TYPE_FUNCTION))this.cursor--,t.addChild(this.power());else break;return t}},{key:"power",value:function(){var t=new be.default(be.default.TYPE_POWER);return t.addChild(this.val()),this.accept(ze.default.TYPE_POWER)&&t.addChild(this.power()),t}},{key:"val",value:function(){var t={};if(this.accept(ze.default.TYPE_SYMBOL))t=new be.default(be.default.TYPE_SYMBOL,this.prevToken.value);else if(this.accept(ze.default.TYPE_NUMBER))t=new be.default(be.default.TYPE_NUMBER,parseFloat(this.prevToken.value));else if(this.accept(ze.default.TYPE_COMMAND)){var n=this.prevToken;t=new be.default(be.default.TYPE_FUNCTION,n.value),t.name=n.name;for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=(0,pE.default)(r,e,t),i=(0,gE.default)(n).simplify(),s=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i.evaluate(l)};return s.ast=i,s.expression=r,s.tokens=n,s}function C4(r,e,t){try{const n=/\\pi({})?/g;let i=r.replace(n,"{PI}").trim(),s;const l=/^(.*)\s*:=\s*/.exec(i);l&&l[0]&&(i=i.substring(l[0].length),s=l[1].trim());const a=i.split("=");a[a.length-1].length>0?i=a[a.length-1]:a.length>=2&&(i=a[a.length-2]);const u={};let c,f=[];s&&(f=vE(s)),i=Ns(i.replace("}","}")),console.log({aliases:f,changedLatex:i,variables:e});for(const v in e){const T=e[v];u[v]=T.value;for(const x of T.aliases){const w=x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),S=new RegExp("(^|(?<=[^a-zA-Z]))"+w+"($|(?=[^a-zA-Z]))","g");console.log("changedLatex before",i),i=i.replace(S,v),console.log("changedLatex after",i);for(const E of f)x===E&&(c=v)}}const d=dE(i,{},{latex:!0}),p=new Set(d.tokens.filter(v=>v.type==="SYMBOL").map(v=>v.value));console.log({usedVars:p,res:d});const g=d(u);if(s!==void 0){if(c===void 0&&(c=_6()),p.has(c))return;e[c]={value:g,aliases:f};const v=t[c];if(v!=null)for(const T of v)T.onUpdate()}return{definedVariableID:c,variablesUsed:p,result:g}}catch(n){console.log(n);return}}function vE(r){return[Ns(r),Ns(r,!0)]}function Y6(r,e=!1){r=r.trim();let t="main",n=0,i=!1,s="",o="",l="",a="",u=!1;for(const p of r){let g=!0;p==="\\"?(!i&&n===0&&(u=!0),i=!i):i=!1,p===" "&&n===0&&(u=!1),i||(p==="_"&&n===0&&t==="main"&&(t="sub",g=!1),p==="^"&&n===0&&t==="main"&&(t="sup",g=!1),p==="{"&&n++,p==="}"&&(n--,n===0&&(u=!1))),t==="main"&&p===" "&&n===0&&(t="after",g=!1),t==="main"&&p==="\\"&&n===0&&s!=""&&(t="after"),g&&(t==="main"?s+=p:t==="sub"?l+=p:t==="sup"?o+=p:t==="after"&&(a+=p),(t==="sub"||t=="sup")&&n===0&&!u&&(t="main"))}o.startsWith("{")&&o.endsWith("}")&&(o=o.substring(1,o.length-1)),l.startsWith("{")&&l.endsWith("}")&&(l=l.substring(1,l.length-1));let c=l.trim(),f=o.trim();e&&c.indexOf(" ")===-1?c=l!==""?`_${c}`:"":c=l!==""?`_{${c}}`:"",e&&f.indexOf(" ")===-1?f=o!==""?`^${o.trim()}`:"":f=o!==""?`^{${o.trim()}}`:"";const d=a!==""?" "+Y6(a):"";return`${s}${c}${f}${d}`}function Ns(r,e=!1){if(r=r.trim(),r.startsWith("{")&&r.endsWith("}"))return Ns(r.substring(1,r.length-1));const t=/(?![^\\])\\color{\w*}/g;if(t.test(r))return Ns(r.replace(t," "));const n=/\\textcolor{\w*}/g;return n.test(r)?Ns(r.replace(n," ")):Y6(r,e)}function xE(r,e,t,n,i){let s=C4(r,i.variables,i.variableListeners);const o=()=>{var l;s!=null&&s.result?((l=s.result.toString().split(".")[1])==null?void 0:l.length)>5?t.innerText="="+s.result.toFixed(4):t.innerText="="+s.result.toString():t.innerText="=Error",n?t.style.display="inline-block":t.style.display="none"};if(o(),s!=null&&s.variablesUsed)for(const l of s.variablesUsed){let a=i.variableListeners[l];a==null&&(a=[]),a.push({id:e,onUpdate:()=>{s=C4(r,i.variables,i.variableListeners),o()}}),i.variableListeners[l]=a}return s}const J6={addInlineMath:!0,evaluation:!1},kE=TM.create({name:"inlineMath",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return J6},addAttributes(){return{latex:{default:"x_1",parseHTML:r=>r.getAttribute("data-latex"),renderHTML:r=>({"data-latex":r.latex})},evaluate:{default:"no",parseHTML:r=>r.getAttribute("data-evaluate"),renderHTML:r=>({"data-evaluate":r.evaluate})},display:{default:"no",parseHTML:r=>r.getAttribute("data-display"),renderHTML:r=>({"data-display":r.display})}}},addInputRules(){return[new Lm({find:new RegExp("\\$([^\\s])([^$]*)\\$$",""),handler:r=>{if(r.match[1].startsWith("$"))return;let e=r.match[1]+r.match[2];e=e.trim();const t=e.endsWith("=");t&&(e=e.substring(0,e.length-1));let n=[{type:"inlineMath",attrs:{latex:e,evaluate:t?"yes":"no",display:"no"}}];r.chain().insertContentAt({from:r.range.from,to:r.range.to},n,{updateSelection:!0}).run()}}),new Lm({find:new RegExp("\\$\\$([^\\s])([^$]*)\\$\\$$",""),handler:r=>{let e=r.match[1]+r.match[2];const t=e.endsWith("=");t&&(e=e.substring(0,e.length-1));let n=[{type:"inlineMath",attrs:{latex:e,evaluate:t?"yes":"no",display:"yes"}}];r.chain().insertContentAt({from:r.range.from,to:r.range.to},n,{updateSelection:!0}).run()}})]},addPasteRules(){return[new dc({find:new RegExp("\\$([^\\s])([^$]*)\\$$","g"),handler:r=>{const e=r.match[1]+r.match[2];r.chain().insertContentAt({from:r.range.from,to:r.range.to},[{type:"inlineMath",attrs:{latex:e,evaluate:"no",display:"no"}}],{updateSelection:!0}).run()}}),new dc({find:new RegExp("\\$\\$([^\\s])([^$]*)\\$\\$$","g"),handler:r=>{const e=r.match[1]+r.match[2];r.chain().insertContentAt({from:r.range.from,to:r.range.to},[{type:"inlineMath",attrs:{latex:e,evaluate:"no",display:"yes"}}],{updateSelection:!0}).run()}}),new dc({find:/\\\(((.|[\r\n])*?)\\\)/g,handler:r=>{r.chain().insertContentAt({from:r.range.from,to:r.range.to},[{type:"inlineMath",attrs:{latex:r.match[1]}}],{updateSelection:!0}).run()}})]},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:r,HTMLAttributes:e}){let t="x";return r.attrs.latex&&typeof r.attrs.latex=="string"&&(t=r.attrs.latex),["span",ab(e,{"data-type":this.name}),"$"+t+"$"]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:r,state:e})=>{let t=!1;const{selection:n}=e,{empty:i,anchor:s}=n;return i?(e.doc.nodesBetween(s-1,s,(o,l)=>{if(o.type.name===this.name){t=!0;const a=o.attrs.display==="yes",[u,c]=a?["$$","$"]:["$",""];r.insertText(u+(o.attrs.latex||"")+c,l,s)}}),t):!1})}},addNodeView(){return({HTMLAttributes:r,node:e,getPos:t,editor:n})=>{const i=document.createElement("span"),s=document.createElement("span");i.appendChild(s);let o="x_1";"data-latex"in r&&typeof r["data-latex"]=="string"&&(o=r["data-latex"]);let l=e.attrs.display==="yes";bC.render(o,s,{displayMode:l,throwOnError:!1,...this.options.katexOptions??{}}),i.classList.add("tiptap-math","latex");let a=e.attrs.evaluate==="yes";const u=_6();if(this.options.evaluation){i.title="Click to toggle result",i.style.cursor="pointer";const f=document.createElement("span");i.append(f),f.classList.add("tiptap-math","result"),f.classList.add("katex");const d=xE(o,u,f,a,this.editor.storage.inlineMath);return i.addEventListener("click",p=>{n.isEditable&&typeof t=="function"&&n.chain().command(({tr:g})=>{const v=t();return g.setNodeAttribute(v,"evaluate",a?"no":"yes"),!0}).run(),p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation()}),{dom:i,destroy:()=>{if(d!=null&&d.variablesUsed)for(const p of d.variablesUsed){let g=this.editor.storage.inlineMath.variableListeners[p];g==null&&(g=[]),this.editor.storage.inlineMath.variableListeners[p]=g.filter(v=>v.id!==u)}}}}else return{dom:i}}},addStorage(){return{variables:{},variableListeners:{}}}}),wE="mathExtension",SE=Wr.create({name:wE,addOptions(){return J6},addExtensions(){const r=[];return this.options.addInlineMath!==!1&&r.push(kE.configure(this.options)),r}});const bE=()=>{const r=vw({extensions:[yS,SE.configure({evaluation:!0,katexOptions:{macros:{"\\R":"\\mathbb{R}"}}})],content:"

Hello World!

"});return Zr.jsx(pw,{editor:r,className:"tiptap-editor"})};function ME(){return Zr.jsxs(Zr.Fragment,{children:[Zr.jsx("h1",{children:"TipTap + Math"}),Zr.jsxs("p",{children:["Visit"," ",Zr.jsx("a",{href:"https://github.com/aarkue/tiptap-math-extension/",children:"https://github.com/aarkue/tiptap-math-extension/"})," ","for more information."]}),Zr.jsx(bE,{})]})}Dc.createRoot(document.getElementById("root")).render(Zr.jsx(Gt.StrictMode,{children:Zr.jsx(ME,{})})); + please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}w4.hasOwnProperty(t[0])&&!ve[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=w4[t[0]]+t.slice(1));var s=mC.exec(t);s&&(t=t.substring(0,s.index),t==="i"?t="ı":t==="j"&&(t="ȷ"));var o;if(ve[this.mode][t]){this.settings.strict&&this.mode==="math"&&od.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var l=ve[this.mode][t].group,a=$t.range(e),u;if(lT.hasOwnProperty(l)){var c=l;u={type:"atom",mode:this.mode,family:c,loc:a,text:t}}else u={type:l,mode:this.mode,loc:a,text:t};o=u}else if(t.charCodeAt(0)>=128)this.settings.strict&&(J5(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:$t.range(e),text:t};else return null;if(this.consume(),s)for(var f=0;f.5?t+=i.toLowerCase():t+=i}return t}var U6={},tp={},El={};Object.defineProperty(El,"__esModule",{value:!0});var MC=function(){function r(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:"";TC(this,r),this.type=e,this.value=t,this.name=null}return MC(r,[{key:"equals",value:function(t){return this.type===t.type&&this.value===t.value}},{key:"toString",value:function(){if(CC.indexOf(this.type)>=0)return this.type;var t=typeof this.value=="function"?this.name:this.value;return this.type+"["+t+"]"}}]),r}();fe.TYPE_LPAREN="LPAREN";fe.TYPE_RPAREN="RPAREN";fe.TYPE_PLUS="PLUS";fe.TYPE_MINUS="MINUS";fe.TYPE_TIMES="TIMES";fe.TYPE_DIVIDE="DIVIDE";fe.TYPE_COMMAND="COMMAND";fe.TYPE_SYMBOL="SYMBOL";fe.TYPE_WHITESPACE="WHITESPACE";fe.TYPE_ABS="ABSOLUTEVAL";fe.TYPE_BANG="BANG";fe.TYPE_COMMA="COMMA";fe.TYPE_POWER="POWER";fe.TYPE_NUMBER="NUMBER";fe.patterns=new Map([[fe.TYPE_LPAREN,/(\(|\[|{|\\left\(|\\left\[)/],[fe.TYPE_RPAREN,/(\)|]|}|\\right\)|\\right])/],[fe.TYPE_PLUS,/\+/],[fe.TYPE_MINUS,/-/],[fe.TYPE_TIMES,/\*/],[fe.TYPE_DIVIDE,/\//],[fe.TYPE_COMMAND,/\\[A-Za-z]+/],[fe.TYPE_SYMBOL,/[A-Za-z_][A-Za-z_0-9]*/],[fe.TYPE_WHITESPACE,/\s+/],[fe.TYPE_ABS,/\|/],[fe.TYPE_BANG,/!/],[fe.TYPE_COMMA,/,/],[fe.TYPE_POWER,/\^/],[fe.TYPE_NUMBER,/\d+(\.\d+)?/]]);El.default=fe;var CC=["TPLUS","TMINUS","TTIMES","TDIVIDE","TWS","TABS","TBANG","TCOMMA","TPOWER"],lu={};Object.defineProperty(lu,"__esModule",{value:!0});lu.default={frac:2,sqrt:1,sin:1,cos:1,tan:1,asin:1,acos:1,atan:1,sec:1,csc:1,cot:1,asec:1,acsc:1,acot:1};var Er={};Object.defineProperty(Er,"__esModule",{value:!0});var EC=Er.fact=function(e){e=Math.round(e);var t=1;if(e<0)throw"Can't factorial a negative.";for(e;e>1;e--)t*=e;return t},NC=Er.frac=function(e,t){return e/t},AC=Er.logn=function(e,t){return Math.log(e)/Math.log(t)},OC=Er.rootn=function(e,t){return Math.pow(e,1/t)},zC=Er.sec=function(e){return 1/Math.cos(e)},IC=Er.csc=function(e){return 1/Math.sin(e)},DC=Er.cot=function(e){return 1/Math.tan(e)},W6={fact:EC,frac:NC,logn:AC,rootn:OC,sec:zC,csc:IC,cot:DC},Oc=!0,S4=!1,b4=void 0;try{for(var zc=Object.getOwnPropertyNames(Math)[Symbol.iterator](),M4;!(Oc=(M4=zc.next()).done);Oc=!0){var T4=M4.value;W6[T4]=Math[T4]}}catch(r){S4=!0,b4=r}finally{try{!Oc&&zc.return&&zc.return()}finally{if(S4)throw b4}}Er.default=W6;var rp={};Object.defineProperty(rp,"__esModule",{value:!0});rp.default=BC;var RC=El,Ic=PC(RC);function PC(r){return r&&r.__esModule?r:{default:r}}function BC(r){return r.type===Ic.default.TYPE_COMMAND&&["\\cdot","\\times"].includes(r.value)?new Ic.default(Ic.default.TYPE_TIMES,"*"):r}Object.defineProperty(tp,"__esModule",{value:!0});var LC=function(){function r(e,t){var n=[],i=!0,s=!1,o=void 0;try{for(var l=e[Symbol.iterator](),a;!(i=(a=l.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(u){s=!0,o=u}finally{try{!i&&l.return&&l.return()}finally{if(s)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),FC=function(){function r(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:JC,n=new GC(r,e,t);return n.lex(),n.tokens.toString=function(){return n.tokens.map(function(i){return i.toString()}).join(" ")},n.tokens}var GC=function(){function r(e,t,n){jC(this,r),this.buffer=e,this.constants=Object.assign({},t,_C.default),this.opts=n,this.tokens=[]}return FC(r,[{key:"lex",value:function(){this.lexExpression(),this.replaceConstants(),this.replaceCommands()}},{key:"lexExpression",value:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.hasNext();){var n=t?this.nextCharToken():this.next();if(this.tokens.push((0,WC.default)(n)),this.opts.latex&&XC(n)){var i=1;n.type===Bt.default.TYPE_COMMAND&&(i=HC.default[n.value.substr(1).toLowerCase()]);for(var s=0;s0}},{key:"next",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;if(this.skipWhitespace(),!this.hasNext())throw"Lexer error: reached end of stream";var n=!0,i=!1,s=void 0;try{for(var o=Bt.default.patterns[Symbol.iterator](),l;!(n=(l=o.next()).done);n=!0){var a=l.value,u=LC(a,2),c=u[0],f=u[1],d=new RegExp(/^/.source+f.source),p=d.exec(this.buffer.substr(0,t));if(p)return this.buffer=this.buffer.substr(p[0].length),new Bt.default(c,p[0])}}catch(g){i=!0,s=g}finally{try{!n&&o.return&&o.return()}finally{if(i)throw s}}throw"Lexer error: can't match any token"}},{key:"nextCharToken",value:function(){return this.skipWhitespace(),this.buffer.charAt(0)==="\\"?this.next():this.next(1)}},{key:"replaceCommands",value:function(){var t=!0,n=!1,i=void 0;try{for(var s=this.tokens[Symbol.iterator](),o;!(t=(o=s.next()).done);t=!0){var l=o.value;l.type===Bt.default.TYPE_COMMAND&&(l.value=l.value.substr(1).toLowerCase(),l.name=l.value,l.value=this.constants[l.name])}}catch(a){n=!0,i=a}finally{try{!t&&s.return&&s.return()}finally{if(n)throw i}}}},{key:"replaceConstants",value:function(){var t=!0,n=!1,i=void 0;try{for(var s=this.tokens[Symbol.iterator](),o;!(t=(o=s.next()).done);t=!0){var l=o.value;l.type===Bt.default.TYPE_SYMBOL&&(typeof this.constants[l.value]=="function"?(l.type=Bt.default.TYPE_FUNCTION,l.name=l.value,l.value=this.constants[l.value]):typeof this.constants[l.value]=="number"&&(l.type=Bt.default.TYPE_NUMBER,l.value=l.fn=this.constants[l.value]))}}catch(a){n=!0,i=a}finally{try{!t&&s.return&&s.return()}finally{if(n)throw i}}}},{key:"skipWhitespace",value:function(){var t=new RegExp(/^/.source+Bt.default.patterns.get(Bt.default.TYPE_WHITESPACE).source);this.buffer=this.buffer.replace(t,"")}}]),r}();function XC(r){return YC.indexOf(r.type)!==-1}function QC(r){return r.type===Bt.default.TYPE_LPAREN&&r.value==="{"}function ZC(r){return r.type===Bt.default.TYPE_RPAREN&&r.value==="}"}var np={},ip={};Object.defineProperty(ip,"__esModule",{value:!0});var eE=function(){function r(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:"";tE(this,r),this.type=e,this.value=t,this.name=null,this.children=[]}return eE(r,[{key:"addChild",value:function(t){return this.children.push(t),this}},{key:"evaluate",value:function(t){var n=0;switch(this.type){case r.TYPE_FUNCTION:var i=this.children.map(function(s){return s.evaluate(t)});n=this.value.apply(this,i);break;case r.TYPE_INVERSE:n=1/this.child.evaluate(t);break;case r.TYPE_NEGATE:n=-this.child.evaluate(t);break;case r.TYPE_NUMBER:n=this.value;break;case r.TYPE_POWER:n=Math.pow(this.children[0].evaluate(t),this.children[1].evaluate(t));break;case r.TYPE_PRODUCT:n=this.children.reduce(function(s,o){return s*o.evaluate(t)},1);break;case r.TYPE_SUM:n=this.children.reduce(function(s,o){return s+o.evaluate(t)},0);break;case r.TYPE_SYMBOL:if(isFinite(t[this.value]))return t[this.value];throw new Error("Symbol "+this.value+" is undefined or not a number")}return n}},{key:"isUnary",value:function(){return rE.indexOf(this.type)>=0}},{key:"printTree",value:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n="",i=" ",s=0;s1||this.isUnary()){var t=new r(this.type,this.value);for(var n in this.children)t.addChild(this.children[n].simplify());return t}else return this.children.length===1?this.children[0].simplify():this}},{key:"toString",value:function(){var t=typeof this.value=="function"?this.name:this.value;return this.children.length+" "+this.type+" ["+t+"]"}},{key:"child",get:function(){return this.children[0]}},{key:"nodeCount",get:function(){var t=1,n=!0,i=!1,s=void 0;try{for(var o=this.children[Symbol.iterator](),l;!(n=(l=o.next()).done);n=!0){var a=l.value;t+=a.nodeCount}}catch(u){i=!0,s=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw s}}return t}}]),r}();xn.TYPE_FUNCTION="FUNCTION";xn.TYPE_INVERSE="INVERSE";xn.TYPE_NEGATE="NEGATE";xn.TYPE_NUMBER="NUMBER";xn.TYPE_POWER="POWER";xn.TYPE_PRODUCT="PRODUCT";xn.TYPE_SUM="SUM";xn.TYPE_SYMBOL="SYMBOL";ip.default=xn;var rE=["FACTORIAL","FUNCTION","INVERSE","NEGATE"];Object.defineProperty(np,"__esModule",{value:!0});var nE=function(){function r(e,t){for(var n=0;n0&&arguments[0]!==void 0?arguments[0]:[];uE(this,r),this.cursor=0,this.tokens=e}return nE(r,[{key:"parse",value:function(){var t=this.sum();if(t=t.simplify(),this.currentToken!==void 0)throw console.log(t.printTree()),"Parsing error: Expected end of input, but got "+this.currentToken.type+" "+this.currentToken.value;return t}},{key:"accept",value:function(t){return this.currentToken&&this.currentToken.type===t?(this.cursor++,!0):!1}},{key:"expect",value:function(t){if(!this.accept(t))throw"Expected "+t+" but got "+(this.currentToken?this.currentToken.toString():"end of input.")}},{key:"sum",value:function(){var t=new be.default(be.default.TYPE_SUM);for(t.addChild(this.product());;)if(this.accept(ze.default.TYPE_PLUS))t.addChild(this.product());else if(this.accept(ze.default.TYPE_MINUS))t.addChild(new be.default(be.default.TYPE_NEGATE).addChild(this.product()));else break;return t}},{key:"product",value:function(){var t=new be.default(be.default.TYPE_PRODUCT);for(t.addChild(this.power());;)if(this.accept(ze.default.TYPE_TIMES))t.addChild(this.power());else if(this.accept(ze.default.TYPE_DIVIDE))t.addChild(new be.default(be.default.TYPE_INVERSE).addChild(this.power()));else if(this.accept(ze.default.TYPE_LPAREN))this.cursor--,t.addChild(this.power());else if(this.accept(ze.default.TYPE_SYMBOL)||this.accept(ze.default.TYPE_NUMBER)||this.accept(ze.default.TYPE_FUNCTION))this.cursor--,t.addChild(this.power());else break;return t}},{key:"power",value:function(){var t=new be.default(be.default.TYPE_POWER);return t.addChild(this.val()),this.accept(ze.default.TYPE_POWER)&&t.addChild(this.power()),t}},{key:"val",value:function(){var t={};if(this.accept(ze.default.TYPE_SYMBOL))t=new be.default(be.default.TYPE_SYMBOL,this.prevToken.value);else if(this.accept(ze.default.TYPE_NUMBER))t=new be.default(be.default.TYPE_NUMBER,parseFloat(this.prevToken.value));else if(this.accept(ze.default.TYPE_COMMAND)){var n=this.prevToken;t=new be.default(be.default.TYPE_FUNCTION,n.value),t.name=n.name;for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=(0,pE.default)(r,e,t),i=(0,gE.default)(n).simplify(),s=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i.evaluate(l)};return s.ast=i,s.expression=r,s.tokens=n,s}function C4(r,e,t){try{const n=/\\pi({})?/g;let i=r.replace(n,"{PI}").trim(),s;const l=/^(.*)\s*:=\s*/.exec(i);l&&l[0]&&(i=i.substring(l[0].length),s=l[1].trim());const a=i.split("=");a[a.length-1].length>0?i=a[a.length-1]:a.length>=2&&(i=a[a.length-2]);const u={};let c,f=[];s&&(f=vE(s)),i=Ns(i.replace("}","}")),console.log({aliases:f,changedLatex:i,variables:e});for(const v in e){const T=e[v];u[v]=T.value;for(const x of T.aliases){const w=x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),S=new RegExp("(^|(?<=[^a-zA-Z]))"+w+"($|(?=[^a-zA-Z]))","g");console.log("changedLatex before",i),i=i.replace(S,v),console.log("changedLatex after",i);for(const E of f)x===E&&(c=v)}}const d=dE(i,{},{latex:!0}),p=new Set(d.tokens.filter(v=>v.type==="SYMBOL").map(v=>v.value));console.log({usedVars:p,res:d});const g=d(u);if(s!==void 0){if(c===void 0&&(c=_6()),p.has(c))return;e[c]={value:g,aliases:f};const v=t[c];if(v!=null)for(const T of v)T.onUpdate()}return{definedVariableID:c,variablesUsed:p,result:g}}catch(n){console.log(n);return}}function vE(r){return[Ns(r),Ns(r,!0)]}function Y6(r,e=!1){r=r.trim();let t="main",n=0,i=!1,s="",o="",l="",a="",u=!1;for(const p of r){let g=!0;p==="\\"?(!i&&n===0&&(u=!0),i=!i):i=!1,p===" "&&n===0&&(u=!1),i||(p==="_"&&n===0&&t==="main"&&(t="sub",g=!1),p==="^"&&n===0&&t==="main"&&(t="sup",g=!1),p==="{"&&n++,p==="}"&&(n--,n===0&&(u=!1))),t==="main"&&p===" "&&n===0&&(t="after",g=!1),t==="main"&&p==="\\"&&n===0&&s!=""&&(t="after"),g&&(t==="main"?s+=p:t==="sub"?l+=p:t==="sup"?o+=p:t==="after"&&(a+=p),(t==="sub"||t=="sup")&&n===0&&!u&&(t="main"))}o.startsWith("{")&&o.endsWith("}")&&(o=o.substring(1,o.length-1)),l.startsWith("{")&&l.endsWith("}")&&(l=l.substring(1,l.length-1));let c=l.trim(),f=o.trim();e&&c.indexOf(" ")===-1?c=l!==""?`_${c}`:"":c=l!==""?`_{${c}}`:"",e&&f.indexOf(" ")===-1?f=o!==""?`^${o.trim()}`:"":f=o!==""?`^{${o.trim()}}`:"";const d=a!==""?" "+Y6(a):"";return`${s}${c}${f}${d}`}function Ns(r,e=!1){if(r=r.trim(),r.startsWith("{")&&r.endsWith("}"))return Ns(r.substring(1,r.length-1));const t=/(?![^\\])\\color{\w*}/g;if(t.test(r))return Ns(r.replace(t," "));const n=/\\textcolor{\w*}/g;return n.test(r)?Ns(r.replace(n," ")):Y6(r,e)}function xE(r,e,t,n,i){let s=C4(r,i.variables,i.variableListeners);const o=()=>{var l;s!=null&&s.result?((l=s.result.toString().split(".")[1])==null?void 0:l.length)>5?t.innerText="="+s.result.toFixed(4):t.innerText="="+s.result.toString():t.innerText="=Error",n?t.style.display="inline-block":t.style.display="none"};if(o(),s!=null&&s.variablesUsed)for(const l of s.variablesUsed){let a=i.variableListeners[l];a==null&&(a=[]),a.push({id:e,onUpdate:()=>{s=C4(r,i.variables,i.variableListeners),o()}}),i.variableListeners[l]=a}return s}const J6={addInlineMath:!0,evaluation:!1},kE=TM.create({name:"inlineMath",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return J6},addAttributes(){return{latex:{default:"x_1",parseHTML:r=>r.getAttribute("data-latex"),renderHTML:r=>({"data-latex":r.latex})},evaluate:{default:"no",parseHTML:r=>r.getAttribute("data-evaluate"),renderHTML:r=>({"data-evaluate":r.evaluate})},display:{default:"no",parseHTML:r=>r.getAttribute("data-display"),renderHTML:r=>({"data-display":r.display})}}},addInputRules(){return[new Lm({find:new RegExp("\\$([^\\s])([^$]*)\\$$",""),handler:r=>{if(r.match[1].startsWith("$"))return;let e=r.match[1]+r.match[2];e=e.trim();const t=e.endsWith("=");t&&(e=e.substring(0,e.length-1));let n=[{type:"inlineMath",attrs:{latex:e,evaluate:t?"yes":"no",display:"no"}}];r.chain().insertContentAt({from:r.range.from,to:r.range.to},n,{updateSelection:!0}).run()}}),new Lm({find:new RegExp("\\$\\$([^\\s])([^$]*)\\$\\$$",""),handler:r=>{let e=r.match[1]+r.match[2];const t=e.endsWith("=");t&&(e=e.substring(0,e.length-1));let n=[{type:"inlineMath",attrs:{latex:e,evaluate:t?"yes":"no",display:"yes"}}];r.chain().insertContentAt({from:r.range.from,to:r.range.to},n,{updateSelection:!0}).run()}})]},addPasteRules(){return[new dc({find:new RegExp("\\$([^\\s])([^$]*)\\$$","g"),handler:r=>{const e=r.match[1]+r.match[2];r.chain().insertContentAt({from:r.range.from,to:r.range.to},[{type:"inlineMath",attrs:{latex:e,evaluate:"no",display:"no"}}],{updateSelection:!0}).run()}}),new dc({find:new RegExp("\\$\\$([^\\s])([^$]*)\\$\\$$","g"),handler:r=>{const e=r.match[1]+r.match[2];r.chain().insertContentAt({from:r.range.from,to:r.range.to},[{type:"inlineMath",attrs:{latex:e,evaluate:"no",display:"yes"}}],{updateSelection:!0}).run()}}),new dc({find:/\\\(((.|[\r\n])*?)\\\)/g,handler:r=>{r.chain().insertContentAt({from:r.range.from,to:r.range.to},[{type:"inlineMath",attrs:{latex:r.match[1]}}],{updateSelection:!0}).run()}})]},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:r,HTMLAttributes:e}){let t="x";return r.attrs.latex&&typeof r.attrs.latex=="string"&&(t=r.attrs.latex),["span",ab(e,{"data-type":this.name}),"$"+t+"$"]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:r,state:e})=>{let t=!1;const{selection:n}=e,{empty:i,anchor:s}=n;return i?(e.doc.nodesBetween(s-1,s,(o,l)=>{if(o.type.name===this.name){t=!0;const a=o.attrs.display==="yes",[u,c]=a?["$$","$"]:["$",""];r.insertText(u+(o.attrs.latex||"")+c,l,s)}}),t):!1})}},addNodeView(){return({HTMLAttributes:r,node:e,getPos:t,editor:n})=>{const i=document.createElement("span"),s=document.createElement("span");i.appendChild(s);let o="x_1";"data-latex"in r&&typeof r["data-latex"]=="string"&&(o=r["data-latex"]);let l=e.attrs.display==="yes";bC.render(o,s,{displayMode:l,throwOnError:!1,...this.options.katexOptions??{}}),i.classList.add("tiptap-math","latex");let a=e.attrs.evaluate==="yes";const u=_6();if(this.options.evaluation){i.title="Click to toggle result",i.style.cursor="pointer";const f=document.createElement("span");i.append(f),f.classList.add("tiptap-math","result"),f.classList.add("katex");const d=xE(o,u,f,a,this.editor.storage.inlineMath);return i.addEventListener("click",p=>{n.isEditable&&typeof t=="function"&&n.chain().command(({tr:g})=>{const v=t();return g.setNodeAttribute(v,"evaluate",a?"no":"yes"),!0}).run(),p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation()}),{dom:i,destroy:()=>{if(d!=null&&d.variablesUsed)for(const p of d.variablesUsed){let g=this.editor.storage.inlineMath.variableListeners[p];g==null&&(g=[]),this.editor.storage.inlineMath.variableListeners[p]=g.filter(v=>v.id!==u)}}}}else return{dom:i}}},addStorage(){return{variables:{},variableListeners:{}}}}),wE="mathExtension",SE=Wr.create({name:wE,addOptions(){return J6},addExtensions(){const r=[];return this.options.addInlineMath!==!1&&r.push(kE.configure(this.options)),r}});const bE=()=>{const r=vw({extensions:[yS,SE.configure({evaluation:!0,katexOptions:{macros:{"\\B":"\\mathbb{B}"}}})],content:"

Hello World!

"});return Zr.jsx(pw,{editor:r,className:"tiptap-editor"})};function ME(){return Zr.jsxs(Zr.Fragment,{children:[Zr.jsx("h1",{children:"TipTap + Math"}),Zr.jsxs("p",{children:["Visit"," ",Zr.jsx("a",{href:"https://github.com/aarkue/tiptap-math-extension/",children:"https://github.com/aarkue/tiptap-math-extension/"})," ","for more information."]}),Zr.jsx(bE,{})]})}Dc.createRoot(document.getElementById("root")).render(Zr.jsx(Gt.StrictMode,{children:Zr.jsx(ME,{})})); diff --git a/example/dist/index.html b/example/dist/index.html index 2d47f1e..d861b28 100644 --- a/example/dist/index.html +++ b/example/dist/index.html @@ -4,7 +4,7 @@ TipTap Math Extension - +