UNPKG

mathjax

Version:

Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers. This package includes the packaged components (install mathjax-full to get the source

1 lines 3.33 kB
(()=>{"use strict";var o={d:(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}};o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(o){if("object"==typeof window)return window}}(),o.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),o.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var e={};o.r(e),o.d(e,{AutoloadConfiguration:()=>T});const t=("undefined"!=typeof window?window:o.g).MathJax._.components.global,a=(t.GLOBAL,t.isObject,t.combineConfig,t.combineDefaults,t.combineWithMathJax),n=(t.MathJax,MathJax._.input.tex.HandlerTypes),r=n.ConfigurationType,i=n.HandlerType,c=MathJax._.input.tex.Configuration,s=c.Configuration,l=(c.ConfigurationHandler,c.ParserConfiguration,MathJax._.input.tex.TokenMap),u=(l.parseResult,l.AbstractTokenMap,l.RegExpMap,l.AbstractParseMap,l.CharacterMap,l.DelimiterMap,l.MacroMap,l.CommandMap),p=(l.EnvironmentMap,MathJax._.input.tex.Token),d=(p.Token,p.Macro),f=MathJax._.input.tex.require.RequireConfiguration,b=f.RequireLoad,g=(f.RequireMethods,f.options,f.RequireConfiguration),x=MathJax._.components.package,m=(x.PackageError,x.Package),h=MathJax._.util.Options,M=(h.isObject,h.APPEND,h.REMOVE,h.OPTIONS,h.Expandable,h.expandable),y=(h.makeArray,h.keys,h.copy,h.insert,h.defaultOptions);h.userOptions,h.selectOptions,h.selectOptionsFromKeys,h.separateOptions,h.lookup;function O(o,e,t,a){if(m.packages.has(o.options.require.prefix+t)){const n=o.options.autoload[t],[r,i]=2===n.length&&Array.isArray(n[0])?n:[n,[]];for(const o of r)w.remove(o);for(const o of i)k.remove(o);o.string=(a?e+" ":"\\begin{"+e.slice(1)+"}")+o.string.slice(o.i),o.i=0}b(o,t)}const w=new u("autoload-macros",{}),k=new u("autoload-environments",{}),T=s.create("autoload",{[r.HANDLER]:{[i.MACRO]:["autoload-macros"],[i.ENVIRONMENT]:["autoload-environments"]},[r.OPTIONS]:{autoload:M({action:["toggle","mathtip","texttip"],amscd:[[],["CD"]],bbox:["bbox"],boldsymbol:["boldsymbol"],braket:["bra","ket","braket","set","Bra","Ket","Braket","Set","ketbra","Ketbra"],bussproofs:[[],["prooftree"]],cancel:["cancel","bcancel","xcancel","cancelto"],color:["color","definecolor","textcolor","colorbox","fcolorbox"],enclose:["enclose"],extpfeil:["xtwoheadrightarrow","xtwoheadleftarrow","xmapsto","xlongequal","xtofrom","Newextarrow"],html:["data","href","class","style","cssId"],mhchem:["ce","pu"],newcommand:["newcommand","renewcommand","newenvironment","renewenvironment","def","let"],unicode:["unicode","U","char"],verb:["verb"]})},[r.CONFIG]:function(o,e){const t=e.parseOptions,a=t.handlers.get(i.MACRO),n=t.handlers.get(i.ENVIRONMENT),r=t.options.autoload;t.packageData.set("autoload",{Autoload:O});for(const o of Object.keys(r)){const e=r[o],[t,i]=2===e.length&&Array.isArray(e[0])?e:[e,[]];for(const e of t)a.lookup(e)&&"color"!==e||w.add(e,new d(e,O,[o,!0]));for(const e of i)n.lookup(e)||k.add(e,new d(e,O,[o,!1]))}t.packageData.get("require")||g.config(o,e)},[r.INIT]:function(o){o.options.require||y(o.options,g.options)},[r.PRIORITY]:10});MathJax.loader&&MathJax.loader.checkVersion("[tex]/autoload","4.1.0","tex-extension"),a({_:{input:{tex:{autoload:{AutoloadConfiguration:e}}}}})})();