vditor
Version:
♏ 易于使用的 Markdown 编辑器,为适配不同的应用场景而生
1 lines • 106 kB
JavaScript
!function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=16)}([function(t,e,i){"use strict";var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)},r=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,s=i.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(a)throw a.error}}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.AsciiMath=void 0;var o=i(3),l=i(4),u=i(12),h=i(1),p=function(t){function e(i){var n=this,a=r(u.separateOptions(i,h.FindAsciiMath.OPTIONS,e.OPTIONS),3),s=a[1],o=a[2];return(n=t.call(this,o)||this).findAsciiMath=n.options.FindAsciiMath||new h.FindAsciiMath(s),n}return a(e,t),e.prototype.compile=function(t,e){return l.LegacyAsciiMath.Compile(t.math,t.display)},e.prototype.findMath=function(t){return this.findAsciiMath.findMath(t)},e.NAME="AsciiMath",e.OPTIONS=s(s({},o.AbstractInputJax.OPTIONS),{FindAsciiMath:null}),e}(o.AbstractInputJax);e.AsciiMath=p},function(t,e,i){"use strict";var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,s=i.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(a)throw a.error}}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.FindAsciiMath=void 0;var r=i(13),o=i(14),l=i(15),u=function(t){function e(e){var i=t.call(this,e)||this;return i.getPatterns(),i}return a(e,t),e.prototype.getPatterns=function(){var t=this,e=this.options,i=[];this.end={},e.delimiters.forEach((function(e){return t.addPattern(i,e,!1)})),this.start=new RegExp(i.join("|"),"g"),this.hasPatterns=i.length>0},e.prototype.addPattern=function(t,e,i){var n=s(e,2),a=n[0],r=n[1];t.push(o.quotePattern(a)),this.end[a]=[r,i,new RegExp(o.quotePattern(r),"g")]},e.prototype.findEnd=function(t,e,i,n){var a=s(n,3),r=a[1],o=a[2],u=o.lastIndex=i.index+i[0].length,h=o.exec(t);return h?l.protoItem(i[0],t.substr(u,h.index-u),h[0],e,i.index,h.index+h[0].length,r):null},e.prototype.findMathInString=function(t,e,i){var n,a;for(this.start.lastIndex=0;n=this.start.exec(i);)(a=this.findEnd(i,e,n,this.end[n[0]]))&&(t.push(a),this.start.lastIndex=a.end.n)},e.prototype.findMath=function(t){var e=[];if(this.hasPatterns)for(var i=0,n=t.length;i<n;i++)this.findMathInString(e,i,t[i]);return e},e.OPTIONS={delimiters:[["`","`"]]},e}(r.AbstractFindMath);e.FindAsciiMath=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=MathJax._.components.global.isObject,e.combineConfig=MathJax._.components.global.combineConfig,e.combineDefaults=MathJax._.components.global.combineDefaults,e.combineWithMathJax=MathJax._.components.global.combineWithMathJax,e.MathJax=MathJax._.components.global.MathJax},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractInputJax=MathJax._.core.InputJax.AbstractInputJax},function(t,e,i){(function(t){MathJax=Object.assign(t.MathJax||{},i(6).MathJax),MathJax.config&&MathJax.config.asciimath&&MathJax.Hub.Config({AsciiMath:MathJax.config.asciimath}),MathJax.Ajax.Preloading("[MathJax]/jax/input/AsciiMath/config.js","[MathJax]/jax/input/AsciiMath/jax.js","[MathJax]/jax/element/mml/jax.js"),i(7),i(8),i(9),i(10);var n=new(0,i(11).MmlFactory);e.LegacyAsciiMath={Compile:function(t,e){var i={type:"math/asciimath",innerText:t,MathJax:{}},a=MathJax.InputJax.AsciiMath.Translate(i).root.toMmlNode(n);return a.setInheritedAttributes({},e,0,!1),a},Translate:function(t,e){return this.Compile(t,e)}}}).call(this,i(5))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){var i,n,a,s,r,o,l={debug:!0},u={MathJax:l},h={},p=null;e.MathJax=l,function(t){var e=u.MathJax;e||(e=u.MathJax={});var i=[],n=function(t){var e=t.constructor;for(var i in e||(e=function(){}),t)"constructor"!==i&&t.hasOwnProperty(i)&&(e[i]=t[i]);return e};e.Object=n({constructor:function(){return arguments.callee.Init.call(this,arguments)},Subclass:function(t,e){var n=function(){return arguments.callee.Init.call(this,arguments)};return n.SUPER=this,n.Init=this.Init,n.Subclass=this.Subclass,n.Augment=this.Augment,n.protoFunction=this.protoFunction,n.can=this.can,n.has=this.has,n.isa=this.isa,n.prototype=new this(i),n.prototype.constructor=n,n.Augment(t,e),n},Init:function(t){var e=this;return 1===t.length&&t[0]===i?e:(e instanceof t.callee||(e=new t.callee(i)),e.Init.apply(e,t)||e)},Augment:function(t,e){var i;if(null!=t){for(i in t)t.hasOwnProperty(i)&&this.protoFunction(i,t[i]);t.toString!==this.prototype.toString&&t.toString!=={}.toString&&this.protoFunction("toString",t.toString)}if(null!=e)for(i in e)e.hasOwnProperty(i)&&(this[i]=e[i]);return this},protoFunction:function(t,e){this.prototype[t]=e,"function"==typeof e&&(e.SUPER=this.SUPER.prototype)},prototype:{Init:function(){},SUPER:function(t){return t.callee.SUPER},can:function(t){return"function"==typeof this[t]},has:function(t){return void 0!==this[t]},isa:function(t){return t instanceof Object&&this instanceof t}},can:function(t){return this.prototype.can.call(this,t)},has:function(t){return this.prototype.has.call(this,t)},isa:function(t){for(var e=this;e;){if(e===t)return!0;e=e.SUPER}return!1},SimpleSUPER:n({constructor:function(t){return this.SimpleSUPER.define(t)},define:function(t){var e={};if(null!=t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=this.wrap(i,t[i]));t.toString!==this.prototype.toString&&t.toString!=={}.toString&&(e.toString=this.wrap("toString",t.toString))}return e},wrap:function(t,e){if("function"!=typeof e||!e.toString().match(/\.\s*SUPER\s*\(/))return e;var i=function(){this.SUPER=i.SUPER[t];try{var n=e.apply(this,arguments)}catch(t){throw delete this.SUPER,t}return delete this.SUPER,n};return i.toString=function(){return e.toString.apply(e,arguments)},i}})}),e.Object.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.Object.Array=Array}(),function(t){var e=u.MathJax;e||(e=u.MathJax={});var i=function(t){var e=function(){return arguments.callee.execute.apply(arguments.callee,arguments)};for(var n in i.prototype)i.prototype.hasOwnProperty(n)&&(e[n]=void 0!==t[n]?t[n]:i.prototype[n]);return e.toString=i.prototype.toString,e};i.prototype={isCallback:!0,hook:function(){},data:[],object:u,execute:function(){if(!this.called||this.autoReset)return this.called=!this.autoReset,this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))},reset:function(){delete this.called},toString:function(){return this.hook.toString.apply(this.hook,arguments)}};var n=function(t){return"function"==typeof t&&t.isCallback},a=function(t){return eval.call(u,t)},s=function(){if(a("var __TeSt_VaR__ = 1"),u.__TeSt_VaR__)try{delete u.__TeSt_VaR__}catch(t){u.__TeSt_VaR__=null}else a=u.execScript?function(t){e.__code=t,t="try {MathJax.__result = eval(MathJax.__code)} catch(err) {MathJax.__result = err}",u.execScript(t);var i=e.__result;if(delete e.__result,delete e.__code,i instanceof Error)throw i;return i}:function(t){e.__code=t,t="try {MathJax.__result = eval(MathJax.__code)} catch(err) {MathJax.__result = err}";var i=p.getElementsByTagName("head")[0];i||(i=p.body);var n=p.createElement("script");n.appendChild(p.createTextNode(t)),i.appendChild(n),i.removeChild(n);var a=e.__result;if(delete e.__result,delete e.__code,a instanceof Error)throw a;return a};s=null},r=function(t,e){if(arguments.length>1&&(t=2===arguments.length&&"function"!=typeof arguments[0]&&arguments[0]instanceof Object&&"number"==typeof arguments[1]?[].slice.call(t,e):[].slice.call(arguments,0)),t instanceof Array&&1===t.length&&(t=t[0]),"function"==typeof t)return t.execute===i.prototype.execute?t:i({hook:t});if(t instanceof Array){if("string"==typeof t[0]&&t[1]instanceof Object&&"function"==typeof t[1][t[0]])return i({hook:t[1][t[0]],object:t[1],data:t.slice(2)});if("function"==typeof t[0])return i({hook:t[0],data:t.slice(1)});if("function"==typeof t[1])return i({hook:t[1],object:t[0],data:t.slice(2)})}else{if("string"==typeof t)return s&&s(),i({hook:a,data:[t]});if(t instanceof Object)return i(t);if(void 0===t)return i({})}throw Error("Can't make callback from given data")},o=function(t,e){(t=r(t)).called||(c(t,e),e.pending++)},h=function(){var t=this.signal;delete this.signal,this.execute=this.oldExecute,delete this.oldExecute;var e=this.execute.apply(this,arguments);if(n(e)&&!e.called)c(e,t);else for(var i=0,a=t.length;i<a;i++)t[i].pending--,t[i].pending<=0&&t[i].call()},c=function(t,e){e instanceof Array||(e=[e]),t.signal?1===e.length?t.signal.push(e[0]):t.signal=t.signal.concat(e):(t.oldExecute=t.execute,t.execute=h,t.signal=e)},d=function(t){(t=r(t)).pending=0;for(var e=1,i=arguments.length;e<i;e++)arguments[e]&&o(arguments[e],t);if(0===t.pending){var a=t();n(a)&&(t=a)}return t},m=l.Object.Subclass({Init:function(t){this.hooks=[],this.remove=[],this.reset=t,this.running=!1},Add:function(t,e){null==e&&(e=10),n(t)||(t=r(t)),t.priority=e;for(var i=this.hooks.length;i>0&&e<this.hooks[i-1].priority;)i--;return this.hooks.splice(i,0,t),t},Remove:function(t){for(var e=0,i=this.hooks.length;e<i;e++)if(this.hooks[e]===t)return void(this.running?this.remove.push(e):this.hooks.splice(e,1))},Execute:function(){var t=[{}];this.running=!0;for(var e=0,i=this.hooks.length;e<i;e++){this.reset&&this.hooks[e].reset();var a=this.hooks[e].apply(u,arguments);n(a)&&!a.called&&t.push(a)}return this.running=!1,this.remove.length&&this.RemovePending(),1===t.length?null:2===t.length?t[1]:d.apply({},t)},RemovePending:function(){this.remove=this.remove.sort();for(var t=this.remove.length-1;t>=0;t--)this.hooks.splice(t,1);this.remove=[]}}),f=e.Object.Subclass({Init:function(){this.pending=this.running=0,this.queue=[],this.Push.apply(this,arguments)},Push:function(){for(var t,e=0,i=arguments.length;e<i;e++)(t=r(arguments[e]))!==arguments[e]||t.called||(t=r(["wait",this,t])),this.queue.push(t);return this.running||this.pending||this.Process(),t},Process:function(t){for(;!this.running&&!this.pending&&this.queue.length;){var e=this.queue[0];t=this.queue.slice(1),this.queue=[],this.Suspend();var i=e();this.Resume(),t.length&&(this.queue=t.concat(this.queue)),n(i)&&!i.called&&o(i,this)}},Suspend:function(){this.running++},Resume:function(){this.running&&this.running--},call:function(){this.Process.apply(this,arguments)},wait:function(t){return t}}),g=f.Subclass({Init:function(t){f.prototype.Init.call(this),this.name=t,this.posted=[],this.listeners=m(!0),this.posting=!1,this.callback=null},Post:function(t,e,i){if(e=r(e),this.posting||this.pending)this.Push(["Post",this,t,e,i]);else{this.callback=e,e.reset(),i||this.posted.push(t),this.Suspend(),this.posting=!0;var a=this.listeners.Execute(t);n(a)&&!a.called&&o(a,this),this.Resume(),this.posting=!1,this.pending||this.call()}return e},Clear:function(t){return t=r(t),this.posting||this.pending?t=this.Push(["Clear",this,t]):(this.posted=[],t()),t},call:function(){this.callback(this),this.Process()},Interest:function(t,e,i){if(t=r(t),this.listeners.Add(t,i),!e)for(var a=0,s=this.posted.length;a<s;a++){t.reset();var l=t(this.posted[a]);n(l)&&a===this.posted.length-1&&o(l,this)}return t},NoInterest:function(t){this.listeners.Remove(t)},MessageHook:function(t,e,i){e=r(e),this.hooks||(this.hooks={},this.Interest(["ExecuteHooks",this])),this.hooks[t]||(this.hooks[t]=m(!0)),this.hooks[t].Add(e,i);for(var n=0,a=this.posted.length;n<a;n++)this.posted[n]==t&&(e.reset(),e(this.posted[n]));return e.msg=t,e},ExecuteHooks:function(t){var e=t instanceof Array?t[0]:t;return this.hooks[e]?this.hooks[e].Execute(t):null},RemoveHook:function(t){this.hooks[t.msg].Remove(t)}},{signals:{},find:function(t){return g.signals[t]||(g.signals[t]=new g(t)),g.signals[t]}});e.Callback=e.CallBack=r,e.Callback.Delay=function(t,e){return(e=r(e)).timeout=setTimeout(e,t),e},e.Callback.After=d,e.Callback.Queue=f,e.Callback.Signal=g.find,e.Callback.Hooks=m,e.Callback.ExecuteHooks=function(t,e,i){if(!t)return null;t instanceof Array||(t=[t]),e instanceof Array||(e=null==e?[]:[e]);for(var n=m(i),a=0,s=t.length;a<s;a++)n.Add(t[a]);return n.Execute.apply(n,e)}}(),function(t){var e=u.MathJax;e||(e=u.MathJax={});var i="Apple Computer, Inc."===h.vendor&&void 0===h.vendorSub,n=0,a=[],s=function(){for(var t=0,i=a.length;t<i;t++)e.Ajax.head.removeChild(a[t]);a=[]},r={MathJax:""};e.Ajax={loaded:{},loading:{},loadHooks:{},timeout:15e3,styleDelay:1,config:{root:"",path:r},STATUS:{OK:1,ERROR:-1},fileURL:function(t){var e=t.match(/^\[([-._a-z0-9]+)\]/i);return e&&e[1]in r&&(t=(r[e[1]]||this.config.root)+t.substr(e[1].length+2)),t},fileName:function(t){var e=this.config.root;if(t.substr(0,e.length)===e)t="[MathJax]"+t.substr(e.length);else for(var i in r)if(r.hasOwnProperty(i)&&r[i]&&t.substr(0,r[i].length)===r[i]){t="["+i+"]"+t.substr(r[i].length);break}return t},fileRev:function(t){var i=e.cdnFileVersions[name]||e.cdnVersion;return i&&(i="?rev="+i),i},urlRev:function(t){return this.fileURL(t)+this.fileRev(t)},Require:function(t,i){var n;if(i=e.Callback(i),t instanceof Object)for(var a in t)t.hasOwnProperty(a)&&(n=a.toUpperCase(),t=t[a]);else n=t.split(/\./).pop().toUpperCase();if(t=this.fileURL(t),this.loaded[t])i(this.loaded[t]);else{var s={};s[n]=t,this.Load(s,i)}return i},Load:function(t,i){var n;if(i=e.Callback(i),t instanceof Object)for(var a in t)t.hasOwnProperty(a)&&(n=a.toUpperCase(),t=t[a]);else n=t.split(/\./).pop().toUpperCase();if(t=this.fileURL(t),this.loading[t])this.addHook(t,i);else{if(this.head=(this.head,null),!this.loader[n])throw Error("Can't load files of type "+n);this.loader[n].call(this,t,i)}return i},LoadHook:function(t,i,n){if(i=e.Callback(i),t instanceof Object)for(var a in t)t.hasOwnProperty(a)&&(t=t[a]);return t=this.fileURL(t),this.loaded[t]?i(this.loaded[t]):this.addHook(t,i,n),i},addHook:function(t,e,i){this.loadHooks[t]||(this.loadHooks[t]=l.Callback.Hooks()),this.loadHooks[t].Add(e,i),e.file=t},removeHook:function(t){this.loadHooks[t.file]&&(this.loadHooks[t.file].Remove(t),this.loadHooks[t.file].hooks.length||delete this.loadHooks[t.file])},Preloading:function(){for(var t=0,e=arguments.length;t<e;t++){var i=this.fileURL(arguments[t]);this.loading[i]||this.loaded[i]||(this.loading[i]={preloaded:!0})}},loader:{JS:function(t,i){var n=this.fileName(t),a=e.Callback(["loadTimeout",this,t]);this.loading[t]={callback:i,timeout:setTimeout(a,this.timeout),status:this.STATUS.OK,script:null},this.loading[t].message=e.Message.File(n),u.System?u.System.import(t).catch(a):a()},CSS:function(t,i){var n=this.fileName(t),a=p.createElement("link");a.rel="stylesheet",a.type="text/css",a.href=t+this.fileRev(n),this.loading[t]={callback:i,message:e.Message.File(n),status:this.STATUS.OK},this.head.appendChild(a),this.timer.create.call(this,[this.timer.file,t],a)}},timer:{create:function(t,a){return t=e.Callback(t),"STYLE"===a.nodeName&&a.styleSheet&&void 0!==a.styleSheet.cssText||u.chrome&&"LINK"===a.nodeName?t(this.STATUS.OK):i?this.timer.start(this,[this.timer.checkSafari2,n++,t],this.styleDelay):this.timer.start(this,[this.timer.checkLength,a,t],this.styleDelay),t},start:function(t,i,n,a){(i=e.Callback(i)).execute=this.execute,i.time=this.time,i.STATUS=t.STATUS,i.timeout=a||t.timeout,i.delay=i.total=n||0,n?setTimeout(i,n):i()},time:function(t){return this.total+=this.delay,this.delay=Math.floor(1.05*this.delay+5),this.total>=this.timeout?(t(this.STATUS.ERROR),1):0},file:function(t,i){i<0?e.Ajax.loadTimeout(t):e.Ajax.loadComplete(t)},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(t,e,i){t.time(i)||(p.styleSheets.length>e&&p.styleSheets[e].cssRules&&p.styleSheets[e].cssRules.length?i(t.STATUS.OK):setTimeout(t,t.delay))},checkLength:function(t,i,n){if(!t.time(n)){var a=0,s=i.sheet||i.styleSheet;try{(s.cssRules||s.rules||[]).length>0&&(a=1)}catch(t){(t.message.match(/protected variable|restricted URI/)||t.message.match(/Security error/))&&(a=1)}a?setTimeout(e.Callback([n,t.STATUS.OK]),0):setTimeout(t,t.delay)}}},loadComplete:function(t){t=this.fileURL(t);var i=this.loading[t];return i&&!i.preloaded?(e.Message.Clear(i.message),i.timeout&&clearTimeout(i.timeout),i.script&&(0===a.length&&setTimeout(s,0),a.push(i.script)),this.loaded[t]=i.status,delete this.loading[t],this.addHook(t,i.callback)):(i&&delete this.loading[t],this.loaded[t]=this.STATUS.OK,i={status:this.STATUS.OK}),this.loadHooks[t]?this.loadHooks[t].Execute(i.status):null},loadTimeout:function(t){this.loading[t].timeout&&clearTimeout(this.loading[t].timeout),this.loading[t].status=this.STATUS.ERROR,this.loadError(t),this.loadComplete(t)},loadError:function(t){e.Message.Set(["LoadFailed","File failed to load: %1",t],null,2e3),e.Hub.signal.Post(["file load error",t])},Styles:function(t,i){var n=this.StyleString(t);if(""===n)(i=e.Callback(i))();else{var a=p.createElement("style");a.type="text/css",this.head=(this.head,null),this.head.appendChild(a),a.styleSheet&&void 0!==a.styleSheet.cssText?a.styleSheet.cssText=n:a.appendChild(p.createTextNode(n)),i=this.timer.create.call(this,i,a)}return i},StyleString:function(t){if("string"==typeof t)return t;var e,i,n="";for(e in t)if(t.hasOwnProperty(e))if("string"==typeof t[e])n+=e+" {"+t[e]+"}\n";else if(t[e]instanceof Array)for(var a=0;a<t[e].length;a++)(i={})[e]=t[e][a],n+=this.StyleString(i);else if("@media"===e.substr(0,6))n+=e+" {"+this.StyleString(t[e])+"}\n";else if(null!=t[e]){for(var s in i=[],t[e])t[e].hasOwnProperty(s)&&null!=t[e][s]&&(i[i.length]=s+": "+t[e][s]);n+=e+" {"+i.join("; ")+"}\n"}return n}}}(),l.HTML={setDocument:function(t){p=this.document=t},Element:function(t,e,i){var n,a=p.createElement(t);if(e){if(e.hasOwnProperty("style")){var s=e.style;for(n in e.style={},s)s.hasOwnProperty(n)&&(e.style[n.replace(/-([a-z])/g,this.ucMatch)]=s[n])}for(n in l.Hub.Insert(a,e),e)"role"!==n&&"aria-"!==n.substr(0,5)||a.setAttribute(n,e[n])}if(i){l.Object.isArray(i)||(i=[i]);for(var r=0,o=i.length;r<o;r++)l.Object.isArray(i[r])?a.appendChild(this.Element(i[r][0],i[r][1],i[r][2])):"script"===t?this.setScript(a,i[r]):a.appendChild(p.createTextNode(i[r]))}return a},ucMatch:function(t,e){return e.toUpperCase()},addElement:function(t,e,i,n){return t.appendChild(this.Element(e,i,n))},TextNode:function(t){return p.createTextNode(t)},addText:function(t,e){return t.appendChild(this.TextNode(e))},setScript:function(t,e){if(this.setScriptBug)t.text=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);this.addText(t,e)}},getScript:function(t){return t.innerText}},l.Localization={locale:"en",directory:"[MathJax]/localization",strings:{ast:{menuTitle:"asturianu"},bg:{menuTitle:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438"},bcc:{menuTitle:"\u0628\u0644\u0648\u0686\u06cc"},br:{menuTitle:"brezhoneg"},ca:{menuTitle:"catal\xe0"},cdo:{menuTitle:"M\xecng-d\u0115\u0324ng-ng\u1e73\u0304"},cs:{menuTitle:"\u010de\u0161tina"},da:{menuTitle:"dansk"},de:{menuTitle:"Deutsch"},en:{menuTitle:"English",isLoaded:!0},eo:{menuTitle:"Esperanto"},es:{menuTitle:"espa\xf1ol"},fa:{menuTitle:"\u0641\u0627\u0631\u0633\u06cc"},fi:{menuTitle:"suomi"},fr:{menuTitle:"fran\xe7ais"},gl:{menuTitle:"galego"},he:{menuTitle:"\u05e2\u05d1\u05e8\u05d9\u05ea"},ia:{menuTitle:"interlingua"},it:{menuTitle:"italiano"},ja:{menuTitle:"\u65e5\u672c\u8a9e"},kn:{menuTitle:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1"},ko:{menuTitle:"\ud55c\uad6d\uc5b4"},lb:{menuTitle:"L\xebtzebuergesch"},lt:{menuTitle:"lietuvi\u0173"},mk:{menuTitle:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438"},nl:{menuTitle:"Nederlands"},oc:{menuTitle:"occitan"},pl:{menuTitle:"polski"},pt:{menuTitle:"portugus\xea"},"pt-br":{menuTitle:"portugu\xeas do Brasil"},ru:{menuTitle:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439"},sco:{menuTitle:"Scots"},scn:{menuTitle:"sicilianu"},sl:{menuTitle:"sloven\u0161\u010dina"},sv:{menuTitle:"svenska"},tr:{menuTitle:"T\xfcrk\xe7e"},uk:{menuTitle:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},vi:{menuTitle:"Ti\u1ebfng Vi\u1ec7t"},"zh-hans":{menuTitle:"\u4e2d\u6587\uff08\u7b80\u4f53\uff09"}},pattern:/%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,SPLIT:3==="axb".split(/(x)/).length?function(t,e){return t.split(e)}:function(t,e){var i,n=[],a=0;for(e.lastIndex=0;i=e.exec(t);)n.push(t.substr(a,i.index-a)),n.push.apply(n,i.slice(1)),a=i.index+i[0].length;return n.push(t.substr(a)),n},_:function(t,e){return e instanceof Array?this.processSnippet(t,e):this.processString(this.lookupPhrase(t,e),[].slice.call(arguments,2))},processString:function(t,e,i){var n,a;for(n=0,a=e.length;n<a;n++)i&&e[n]instanceof Array&&(e[n]=this.processSnippet(i,e[n]));var s=this.SPLIT(t,this.pattern);for(n=1,a=s.length;n<a;n+=2){var r=s[n].charAt(0);if(r>="0"&&r<="9")s[n]=e[s[n]-1],"number"==typeof s[n]&&(s[n]=this.number(s[n]));else if("{"===r)if((r=s[n].substr(1))>="0"&&r<="9")s[n]=e[s[n].substr(1,s[n].length-2)-1],"number"==typeof s[n]&&(s[n]=this.number(s[n]));else{var o=s[n].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(o)if("plural"===o[1]){var l=e[o[2]-1];if(void 0===l)s[n]="???";else{l=this.plural(l)-1;var u=o[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uefef").split(/\|/);l>=0&&l<u.length?s[n]=this.processString(u[l].replace(/\uEFEF/g,"|"),e,i):s[n]="???"}}else s[n]="%"+s[n]}null==s[n]&&(s[n]="???")}if(!i)return s.join("");var h=[],p="";for(n=0;n<a;n++)p+=s[n],++n<a&&(s[n]instanceof Array?(h.push(p),h=h.concat(s[n]),p=""):p+=s[n]);return""!==p&&h.push(p),h},processSnippet:function(t,e){for(var i=[],n=0,a=e.length;n<a;n++)if(e[n]instanceof Array){var s=e[n];if("string"==typeof s[1]){var r=s[0];r instanceof Array||(r=[t,r]);var o=this.lookupPhrase(r,s[1]);i=i.concat(this.processMarkdown(o,s.slice(2),t))}else s[1]instanceof Array?i=i.concat(this.processSnippet.apply(this,s)):s.length>=3?i.push([s[0],s[1],this.processSnippet(t,s[2])]):i.push(e[n])}else i.push(e[n]);return i},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(t,e,i){for(var n,a=[],s=t.split(this.markdownPattern),r=s[0],o=1,l=s.length;o<l;o+=8)s[o+1]?((n=this.processString(s[o+2],e,i))instanceof Array||(n=[n]),n=[["b","i","i"][s[o+1].length-1],{},n],3===s[o+1].length&&(n=["b",{},n])):s[o+3]?((n=this.processString(s[o+4].replace(/^\s/,"").replace(/\s$/,""),e,i))instanceof Array||(n=[n]),n=["code",{},n]):s[o+5]?((n=this.processString(s[o+5],e,i))instanceof Array||(n=[n]),n=["a",{href:this.processString(s[o+6],e),target:"_blank"},n]):(r+=s[o],n=null),n&&((a=this.concatString(a,r,e,i)).push(n),r=""),""!==s[o+7]&&(r+=s[o+7]);return a=this.concatString(a,r,e,i)},concatString:function(t,e,i,n){return""!=e&&((e=this.processString(e,i,n))instanceof Array||(e=[e]),t=t.concat(e)),t},lookupPhrase:function(t,e,i){i||(i="_"),t instanceof Array&&(i=t[0]||"_",t=t[1]||"");var n=this.loadDomain(i);n&&l.Hub.RestartAfter(n);var a=this.strings[this.locale];if(a&&a.domains&&i in a.domains){var s=a.domains[i];s.strings&&t in s.strings&&(e=s.strings[t])}return e},loadFile:function(t,e,i){(i=l.Callback(i),(t=e.file||t).match(/\.js$/)||(t+=".js"),t.match(/^([a-z]+:|\[MathJax\])/))||(t=(this.strings[this.locale].directory||this.directory+"/"+this.locale||"[MathJax]/localization/"+this.locale)+"/"+t);var n=l.Ajax.Require(t,(function(){return e.isLoaded=!0,i()}));return n.called?null:n},loadDomain:function(t,e){var i,n=this.strings[this.locale];if(n){if(!n.isLoaded&&(i=this.loadFile(this.locale,n)))return l.Callback.Queue(i,["loadDomain",this,t]).Push(e||{});if(n.domains&&t in n.domains){var a=n.domains[t];if(!a.isLoaded&&(i=this.loadFile(t,a)))return l.Callback.Queue(i).Push(e)}}return l.Callback(e)()},Try:function(t){(t=l.Callback(t)).autoReset=!0;try{t()}catch(e){if(!e.restart)throw e;l.Callback.After(["Try",this,t],e.restart)}},resetLocale:function(t){if(t){for(t=t.toLowerCase();!this.strings[t];){var e=t.lastIndexOf("-");if(-1===e)return;t=t.substring(0,e)}var i=this.strings[t].remap;this.locale=i||t}},setLocale:function(t){this.resetLocale(t),l.Menu&&this.loadDomain("MathMenu")},addTranslation:function(t,e,i){var n=this.strings[t],a=!1;n||(n=this.strings[t]={},a=!0),n.domains||(n.domains={}),e&&(n.domains[e]||(n.domains[e]={}),n=n.domains[e]),l.Hub.Insert(n,i),a&&l.Menu.menu&&l.Menu.CreateLocaleMenu()},setCSS:function(t){var e=this.strings[this.locale];return e&&(e.fontFamily&&(t.style.fontFamily=e.fontFamily),e.fontDirection&&(t.style.direction=e.fontDirection,"rtl"===e.fontDirection&&(t.style.textAlign="right"))),t},fontFamily:function(){var t=this.strings[this.locale];return t?t.fontFamily:null},fontDirection:function(){var t=this.strings[this.locale];return t?t.fontDirection:null},plural:function(t){var e=this.strings[this.locale];return e&&e.plural?e.plural(t):1==t?1:2},number:function(t){var e=this.strings[this.locale];return e&&e.number?e.number(t):t}},l.Message={localize:function(t){return l.Localization._(t,t)},filterText:function(t,e,i){return"simple"===l.Hub.config.messageStyle&&("LoadFile"===i?(this.loading||(this.loading=this.localize("Loading")+" "),t=this.loading,this.loading+="."):"ProcessMath"===i?(this.processing||(this.processing=this.localize("Processing")+" "),t=this.processing,this.processing+="."):"TypesetMath"===i&&(this.typesetting||(this.typesetting=this.localize("Typesetting")+" "),t=this.typesetting,this.typesetting+=".")),t},Set:function(t,e,i){l.debug&&(Array.isArray(t)&&(t=l.Localization._.apply(l.Localization,t)),console.log("Message: "+t))},Clear:function(t,e){},Remove:function(){},File:function(t){return this.Set(["LoadFile","Loading %1",t],null,null)},Log:function(){}},l.Hub={config:{root:"./mathjax2/legacy",config:[],jax:[],extensions:[],preJax:null,postJax:null,displayAlign:"center",displayIndent:"0",preRemoveClass:"MathJax_Preview",showProcessingMessages:!0,messageStyle:"normal",delayStartupUntil:"none",skipStartupTypeset:!1,elements:[],positionToHash:!0,showMathMenu:!0,showMathMenuMSIE:!0,menuSettings:{zoom:"None",CTRL:!1,ALT:!1,CMD:!1,Shift:!1,discoverable:!1,zscale:"200%",renderer:null,font:"Auto",context:"MathJax",locale:null,mpContext:!1,mpMouse:!1,texHints:!0,FastPreview:null,assistiveMML:null,inTabOrder:!0,semantics:!1},errorSettings:{message:["[",["MathProcessingError","Math Processing Error"],"]"],style:{color:"#CC0000","font-style":"italic"}},ignoreMMLattributes:{}},preProcessors:l.Callback.Hooks(!0),inputJax:{},outputJax:{order:{}},processSectionDelay:50,processUpdateTime:250,processUpdateDelay:10,signal:l.Callback.Signal("Hub"),Config:function(t){this.Insert(this.config,t),this.config.Augment&&this.Augment(this.config.Augment)},CombineConfig:function(t,e){for(var i,n,a=this.config,s=0,r=(t=t.split(/\./)).length;s<r;s++)a[i=t[s]]||(a[i]={}),n=a,a=a[i];return n[i]=a=this.Insert(e,a),a},Register:{PreProcessor:function(){return l.Hub.preProcessors.Add.apply(l.Hub.preProcessors,arguments)},MessageHook:function(){return l.Hub.signal.MessageHook.apply(l.Hub.signal,arguments)},StartupHook:function(){return l.Hub.Startup.signal.MessageHook.apply(l.Hub.Startup.signal,arguments)},LoadHook:function(){return l.Ajax.LoadHook.apply(l.Ajax,arguments)}},UnRegister:{PreProcessor:function(t){l.Hub.preProcessors.Remove(t)},MessageHook:function(t){l.Hub.signal.RemoveHook(t)},StartupHook:function(t){l.Hub.Startup.signal.RemoveHook(t)},LoadHook:function(t){l.Ajax.removeHook(t)}},setRenderer:function(t,e){if(t){if(l.OutputJax[t]){this.config.menuSettings.renderer=t,null==e&&(e="jax/mml");var i=this.outputJax;return i[e]&&i[e].length&&t!==i[e][0].id?(i[e].unshift(l.OutputJax[t]),this.signal.Post(["Renderer Selected",t])):null}this.config.menuSettings.renderer="";var n="[MathJax]/jax/output/"+t+"/config.js";return l.Ajax.Require(n,["setRenderer",this,t,e])}},Queue:function(){return this.queue.Push.apply(this.queue,arguments)},RestartAfter:function(t){throw this.Insert(Error("restart"),{restart:l.Callback(t)})},Insert:function(t,e){for(var i in e)e.hasOwnProperty(i)&&("object"!=typeof e[i]||e[i]instanceof Array||"object"!=typeof t[i]&&"function"!=typeof t[i]?t[i]=e[i]:this.Insert(t[i],e[i]));return t},SplitList:"trim"in String.prototype?function(t){return t.trim().split(/\s+/)}:function(t){return t.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/)}},l.Extension={},l.Hub.Startup={queue:l.Callback.Queue(),signal:l.Callback.Signal("Startup")},l.Ajax.config.root=l.Hub.config.root,i=u.MathJax,n="[MathJax]",a=i.Hub,s=i.Ajax,r=i.Callback,o=l.Object.Subclass({JAXFILE:"jax.js",require:null,config:{},Init:function(t,e){return 0===arguments.length?this:this.constructor.Subclass(t,e)()},Augment:function(t,e){var i=this.constructor,n={};if(null!=t){for(var s in t)t.hasOwnProperty(s)&&("function"==typeof t[s]?i.protoFunction(s,t[s]):n[s]=t[s]);t.toString!==i.prototype.toString&&t.toString!=={}.toString&&i.protoFunction("toString",t.toString)}return a.Insert(i.prototype,n),i.Augment(null,e),this},Translate:function(t,e){throw Error(this.directory+"/"+this.JAXFILE+" failed to define the Translate() method")},Register:function(t){},Config:function(){this.config=a.CombineConfig(this.id,this.config),this.config.Augment&&this.Augment(this.config.Augment)},Startup:function(){},loadComplete:function(t){if("config.js"===t)return s.loadComplete(this.directory+"/"+t);var e=r.Queue();return e.Push(["Post",a.Startup.signal,this.id+" Jax Config"],["Config",this],["Post",a.Startup.signal,this.id+" Jax Startup"],["Startup",this],["Post",a.Startup.signal,this.id+" Jax Ready"]),this.copyTranslate&&e.Push([function(t){t.preProcess=t.preTranslate,t.Process=t.Translate,t.postProcess=t.postTranslate},this.constructor.prototype]),e.Push(["loadComplete",s,this.directory+"/"+t])}},{id:"Jax",version:"2.6.0",directory:n+"/jax",extensionDir:n+"/extensions"}),i.InputJax=o.Subclass({elementJax:"mml",sourceMenuTitle:["Original","Original Form"],copyTranslate:!0,Process:function(t,e){throw Error("Input jax failed to load properly")},needsUpdate:function(t){var e=t.SourceElement();return t.originalText!==i.HTML.getScript(e)},Register:function(t){a.inputJax||(a.inputJax={}),a.inputJax[t]=this}},{id:"InputJax",version:"2.6.0",directory:o.directory+"/input",extensionDir:o.extensionDir}),i.OutputJax=o.Subclass({copyTranslate:!0,preProcess:function(t){throw Error("Output jax failed to load properly")},Register:function(t){var e=a.outputJax;e[t]||(e[t]=[]),e[t].length&&(this.id===a.config.menuSettings.renderer||(e.order[this.id]||0)<(e.order[e[t][0].id]||0))?e[t].unshift(this):e[t].push(this)},Remove:function(t){}},{id:"OutputJax",version:"2.6.0",directory:o.directory+"/output",extensionDir:o.extensionDir,fontDir:n+(i.isPacked?"":"/..")+"/fonts",imageDir:n+(i.isPacked?"":"/..")+"/images"}),i.ElementJax=o.Subclass({Init:function(t,e){return this.constructor.Subclass(t,e)},inputJax:null,outputJax:null,inputID:null,originalText:"",mimeType:"",sourceMenuTitle:["MathMLcode","MathML Code"],Text:function(t,e){var n=this.SourceElement();return i.HTML.setScript(n,t),n.MathJax.state=this.STATE.UPDATE,a.Update(n,e)},Reprocess:function(t){var e=this.SourceElement();return e.MathJax.state=this.STATE.UPDATE,a.Reprocess(e,t)},Update:function(t){return this.Rerender(t)},Rerender:function(t){var e=this.SourceElement();return e.MathJax.state=this.STATE.OUTPUT,a.Process(e,t)},Remove:function(t){this.hover&&this.hover.clear(this),i.OutputJax[this.outputJax].Remove(this),t||(a.signal.Post(["Remove Math",this.inputID]),this.Detach())},needsUpdate:function(){return i.InputJax[this.inputJax].needsUpdate(this)},SourceElement:function(){return p.getElementById(this.inputID)},Attach:function(t,e){var n=t.MathJax.elementJax;return t.MathJax.state===this.STATE.UPDATE?n.Clone(this):(n=t.MathJax.elementJax=this,t.id?this.inputID=t.id:(t.id=this.inputID=i.ElementJax.GetID(),this.newID=1)),n.originalText=i.HTML.getScript(t),n.inputJax=e,n.root&&(n.root.inputID=n.inputID),n},Detach:function(){var t=this.SourceElement();if(t){try{delete t.MathJax}catch(e){t.MathJax=null}this.newID&&(t.id="")}},Clone:function(t){var e;for(e in this)this.hasOwnProperty(e)&&void 0===t[e]&&"newID"!==e&&delete this[e];for(e in t)t.hasOwnProperty(e)&&(void 0===this[e]||this[e]!==t[e]&&"inputID"!==e)&&(this[e]=t[e])}},{id:"ElementJax",version:"2.6.0",directory:o.directory+"/element",extensionDir:o.extensionDir,ID:0,STATE:{PENDING:1,PROCESSED:2,UPDATE:3,OUTPUT:4},GetID:function(){return this.ID++,"MathJax-Element-"+this.ID},Subclass:function(){var t=o.Subclass.apply(this,arguments);return t.loadComplete=this.prototype.loadComplete,t}}),i.ElementJax.prototype.STATE=i.ElementJax.STATE,l.Hub.Browser={Select:function(){}}},function(t,e){MathJax.ElementJax.mml=MathJax.ElementJax({mimeType:"jax/mml"},{id:"mml",version:"2.7.2",directory:MathJax.ElementJax.directory+"/mml",extensionDir:MathJax.ElementJax.extensionDir+"/mml",optableDir:MathJax.ElementJax.directory+"/mml/optable"}),MathJax.ElementJax.mml.Augment({Init:function(){if(1===arguments.length&&"math"===arguments[0].type?this.root=arguments[0]:this.root=MathJax.ElementJax.mml.math.apply(this,arguments),this.root.attr&&this.root.attr.mode){this.root.display||"display"!==this.root.attr.mode||(this.root.display="block",this.root.attrNames.push("display")),delete this.root.attr.mode;for(var t=0,e=this.root.attrNames.length;t<e;t++)if("mode"===this.root.attrNames[t]){this.root.attrNames.splice(t,1);break}}}},{INHERIT:"_inherit_",AUTO:"_auto_",SIZE:{INFINITY:"infinity",SMALL:"small",NORMAL:"normal",BIG:"big"},COLOR:{TRANSPARENT:"transparent"},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",CALIGRAPHIC:"-tex-caligraphic",OLDSTYLE:"-tex-oldstyle"},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",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",UPDIAGONALARROW:"updiagonalarrow",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",PHASORANGLE:"phasorangle",MADRUWB:"madruwb"},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"},LENGTH:{VERYVERYTHINMATHSPACE:"veryverythinmathspace",VERYTHINMATHSPACE:"verythinmathspace",THINMATHSPACE:"thinmathspace",MEDIUMMATHSPACE:"mediummathspace",THICKMATHSPACE:"thickmathspace",VERYTHICKMATHSPACE:"verythickmathspace",VERYVERYTHICKMATHSPACE:"veryverythickmathspace",NEGATIVEVERYVERYTHINMATHSPACE:"negativeveryverythinmathspace",NEGATIVEVERYTHINMATHSPACE:"negativeverythinmathspace",NEGATIVETHINMATHSPACE:"negativethinmathspace",NEGATIVEMEDIUMMATHSPACE:"negativemediummathspace",NEGATIVETHICKMATHSPACE:"negativethickmathspace",NEGATIVEVERYTHICKMATHSPACE:"negativeverythickmathspace",NEGATIVEVERYVERYTHICKMATHSPACE:"negativeveryverythickmathspace"},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"},TEXCLASS:{ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,VCENTER:8,NONE:-1},TEXCLASSNAMES:["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"],skipAttributes:{texClass:!0,useHeight:!0,texprimestyle:!0},copyAttributes:{displaystyle:1,scriptlevel:1,open:1,close:1,form:1,actiontype:1,fontfamily:!0,fontsize:!0,fontweight:!0,fontstyle:!0,color:!0,background:!0,id:!0,class:1,href:!0,style:!0},copyAttributeNames:["displaystyle","scriptlevel","open","close","form","actiontype","fontfamily","fontsize","fontweight","fontstyle","color","background","id","class","href","style"],nocopyAttributes:{fontfamily:!0,fontsize:!0,fontweight:!0,fontstyle:!0,color:!0,background:!0,id:!0,class:!0,href:!0,style:!0,xmlns:!0},Error:function(t,e){var i=this.merror(t),n=MathJax.Localization.fontDirection(),a=MathJax.Localization.fontFamily();return e&&(i=i.With(e)),(n||a)&&(i=this.mstyle(i),n&&(i.dir=n),a&&(i.style.fontFamily="font-family: "+a)),i}}),function(t){t.mbase=MathJax.Object.Subclass({type:"base",isToken:!1,defaults:{mathbackground:t.INHERIT,mathcolor:t.INHERIT,dir:t.INHERIT},noInherit:{},noInheritAttribute:{texClass:!0},getRemoved:{},linebreakContainer:!1,Init:function(){this.data=[],!this.inferRow||1===arguments.length&&arguments[0].inferred||this.Append(t.mrow().With({inferred:!0,notParent:!0})),this.Append.apply(this,arguments)},With:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);return this},Append:function(){if(this.inferRow&&this.data.length)this.data[0].Append.apply(this.data[0],arguments);else for(var t=0,e=arguments.length;t<e;t++)this.SetData(this.data.length,arguments[t])},SetData:function(e,i){null!=i&&(i instanceof t.mbase||(i=this.isToken||this.isChars?t.chars(i):t.mtext(i)),i.parent=this,i.setInherit(this.inheritFromMe?this:this.inherit)),this.data[e]=i},Parent:function(){for(var t=this.parent;t&&t.notParent;)t=t.parent;return t},Get:function(e,i,n){if(!n){if(null!=this[e])return this[e];if(this.attr&&null!=this.attr[e])return this.attr[e]}var a=this.Parent();if(a&&null!=a["adjustChild_"+e])return a["adjustChild_"+e](this.childPosition(),i);for(var s=this.inherit,r=s;s;){var o=s[e];if(null==o&&s.attr&&(o=s.attr[e]),s.removedStyles&&s.getRemoved[e]&&null==o&&(o=s.removedStyles[s.getRemoved[e]]),null!=o&&s.noInheritAttribute&&!s.noInheritAttribute[e]){var l=s.noInherit[this.type];if(!l||!l[e])return o}r=s,s=s.inherit}if(!i){if(this.defaults[e]===t.AUTO)return this.autoDefault(e);if(this.defaults[e]!==t.INHERIT&&null!=this.defaults[e])return this.defaults[e];if(r)return r.defaults[e]}return null},hasValue:function(t){return null!=this.Get(t,!0)},getValues:function(){for(var t={},e=0,i=arguments.length;e<i;e++)t[arguments[e]]=this.Get(arguments[e]);return t},adjustChild_scriptlevel:function(t,e){return this.Get("scriptlevel",e)},adjustChild_displaystyle:function(t,e){return this.Get("displaystyle",e)},adjustChild_texprimestyle:function(t,e){return this.Get("texprimestyle",e)},childPosition:function(){for(var t=this,e=t.parent;e.notParent;)e=(t=e).parent;for(var i=0,n=e.data.length;i<n;i++)if(e.data[i]===t)return i;return null},setInherit:function(t){if(t!==this.inherit&&null==this.inherit){this.inherit=t;for(var e=0,i=this.data.length;e<i;e++)this.data[e]&&this.data[e].setInherit&&this.data[e].setInherit(t)}},setTeXclass:function(t){return this.getPrevClass(t),void 0!==this.texClass?this:t},getPrevClass:function(t){t&&(this.prevClass=t.Get("texClass"),this.prevLevel=t.Get("scriptlevel"))},updateTeXclass:function(t){t&&(this.prevClass=t.prevClass,delete t.prevClass,this.prevLevel=t.prevLevel,delete t.prevLevel,this.texClass=t.Get("texClass"))},texSpacing:function(){var e=null!=this.prevClass?this.prevClass:t.TEXCLASS.NONE,i=this.Get("texClass")||t.TEXCLASS.ORD;if(e===t.TEXCLASS.NONE||i===t.TEXCLASS.NONE)return"";e===t.TEXCLASS.VCENTER&&(e=t.TEXCLASS.ORD),i===t.TEXCLASS.VCENTER&&(i=t.TEXCLASS.ORD);var n=this.TEXSPACE[e][i];return(this.prevLevel>0||this.Get("scriptlevel")>0)&&n>=0?"":this.TEXSPACELENGTH[Math.abs(n)]},TEXSPACELENGTH:["",t.LENGTH.THINMATHSPACE,t.LENGTH.MEDIUMMATHSPACE,t.LENGTH.THICKMATHSPACE],TEXSPACE:[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],autoDefault:function(t){return""},isSpacelike:function(){return!1},isEmbellished:function(){return!1},Core:function(){return this},CoreMO:function(){return this},childIndex:function(t){if(null!=t)for(var e=0,i=this.data.length;e<i;e++)if(t===this.data[e])return e},CoreIndex:function(){return(this.inferRow&&this.data[0]||this).childIndex(this.Core())},hasNewline:function(){if(this.isEmbellished())return this.CoreMO().hasNewline();if(this.isToken||this.linebreakContainer)return!1;for(var t=0,e=this.data.length;t<e;t++)if(this.data[t]&&this.data[t].hasNewline())return!0;return!1},array:function(){return this.inferred?this.data:[this]},toString:function(){return this.type+"("+this.data.join(",")+")"},getAnnotation:function(){return null}},{childrenSpacelike:function(){for(var t=0,e=this.data.length;t<e;t++)if(!this.data[t].isSpacelike())return!1;return!0},childEmbellished:function(){return this.data[0]&&this.data[0].isEmbellished()},childCore:function(){return this.inferRow&&this.data[0]?this.data[0].Core():this.data[0]},childCoreMO:function(){return this.data[0]?this.data[0].CoreMO():null},setChildTeXclass:function(t){return this.data[0]&&(t=this.data[0].setTeXclass(t),this.updateTeXclass(this.data[0])),t},setBaseTeXclasses:function(e){this.getPrevClass(e),this.texClass=null,this.data[0]?this.isEmbellished()||this.data[0].isa(t.mi)?(e=this.data[0].setTeXclass(e),this.updateTeXclass(this.Core())):(this.data[0].setTeXclass(),e=this):e=this;for(var i=1,n=this.data.length;i<n;i++)this.data[i]&&this.data[i].setTeXclass();return e},setSeparateTeXclasses:function(t){this.getPrevClass(t);for(var e=0,i=this.data.length;e<i;e++)this.data[e]&&this.data[e].setTeXclass();return this.isEmbellished()&&this.updateTeXclass(this.Core()),this}}),t.mi=t.mbase.Subclass({type:"mi",isToken:!0,texClass:t.TEXCLASS.ORD,defaults:{mathvariant:t.AUTO,mathsize:t.INHERIT,mathbackground:t.INHERIT,mathcolor:t.INHERIT,dir:t.INHERIT},autoDefault:function(e){if("mathvariant"===e){var i=(this.data[0]||"").toString();return 1===i.length||2===i.length&&i.charCodeAt(0)>=55296&&i.charCodeAt(0)<56320?t.VARIANT.ITALIC:t.VARIANT.NORMAL}return""},setTeXclass:function(e){this.getPrevClass(e);var i=this.data.join("");return i.length>1&&i.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===t.TEXCLASS.ORD&&(this.texClass=t.TEXCLASS.OP,this.autoOP=!0),this}}),t.mn=t.mbase.Subclass({type:"mn",isToken:!0,texClass:t.TEXCLASS.ORD,defaults:{mathvariant:t.INHERIT,mathsize:t.INHERIT,mathbackground:t.INHERIT,mathcolor:t.INHERIT,dir:t.INHERIT}}),t.mo=t.mbase.Subclass({type:"mo",isToken:!0,defaults:{mathvariant:t.INHERIT,mathsize:t.INHERIT,mathbackground:t.INHERIT,mathcolor:t.INHERIT,dir:t.INHERIT,form:t.AUTO,fence:t.AUTO,separator:t.AUTO,lspace:t.AUTO,rspace:t.AUTO,stretchy:t.AUTO,symmetric:t.AUTO,maxsize:t.AUTO,minsize:t.AUTO,largeop:t.AUTO,movablelimits:t.AUTO,accent:t.AUTO,linebreak:t.LINEBREAK.AUTO,lineleading:t.INHERIT,linebreakstyle:t.AUTO,linebreakmultchar:t.INHERIT,indentalign:t.INHERIT,indentshift:t.INHERIT,indenttarget:t.INHERIT,indentalignfirst:t.INHERIT,indentshiftfirst:t.INHERIT,indentalignlast:t.INHERIT,indentshiftlast:t.INHERIT,texClass:t.AUTO},defaultDef:{form:t.FORM.INFIX,fence:!1,separator:!1,lspace:t.LENGTH.THICKMATHSPACE,rspace:t.LENGTH.THICKMATHSPACE,stretchy:!1,symmetric:!1,maxsize:t.SIZE.INFINITY,minsize:"0em",largeop:!1,movablelimits:!1,accent:!1,linebreak:t.LINEBREAK.AUTO,lineleading:"1ex",linebreakstyle:"before",indentalign:t.INDENTALIGN.AUTO,indentshift:"0",indenttarget:"",indentalignfirst:t.INDENTALIGN.INDENTALIGN,indentshiftfirst:t.INDENTSHIFT.INDENTSHIFT,indentalignlast:t.INDENTALIGN.INDENTALIGN,indentshiftlast:t.INDENTSHIFT.INDENTSHIFT,texClass:t.TEXCLASS.REL},SPACE_ATTR:{lspace:1,rspace:2,form:4},useMMLspacing:7,autoDefault:function(e,i){var n=this.def;if(!n){if("form"===e)return this.useMMLspacing&=~this.SPACE_ATTR.form,this.getForm();for(var a=this.data.join(""),s=[this.Get("form"),t.FORM.INFIX,t.FORM.POSTFIX,t.FORM.PREFIX],r=0,o=s.length;r<o;r++){var l=this.OPTABLE[s[r]][a];if(l){n=this.makeDef(l);break}}n||(n=this.CheckRange(a)),!n&&i?n={}:(n||(n=MathJax.Hub.Insert({},this.defaultDef)),this.parent?this.def=n:n=MathJax.Hub.Insert({},n),n.form=s[0])}return this.useMMLspacing&=~(this.SPACE_ATTR[e]||0),null!=n[e]?n[e]:i?"":this.defaultDef[e]},CheckRange:function(e){var i=e.charCodeAt(0);i>=55296&&i<56320&&(i=(i-55296<<10)+(e.charCodeAt(1)-56320)+65536);for(var n=0,a=this.RANGES.length;n<a&&this.RANGES[n][0]<=i;n++)if(i<=this.RANGES[n][1]){if(this.RANGES[n][3]){var s=t.optableDir+"/"+this.RANGES[n][3]+".js";this.RANGES[n][3]=null,MathJax.Hub.RestartAfter(MathJax.Ajax.Require(s))}var r=t.TEXCLASSNAMES[this.RANGES[n][2]];return r=this.OPTABLE.infix[e]=t.mo.OPTYPES["BIN"===r?"BIN3":r],this.makeDef(r)}return null},makeDef:function(e){null==e[2]&&(e[2]=this.defaultDef.texClass),e[3]||(e[3]={});var i=MathJax.Hub.Insert({},e[3]);return i.lspace=this.SPACE[e[0]],i.rspace=this.SPACE[e[1]],i.texClass=e[2],i.texClass===t.TEXCLASS.REL&&(this.movablelimits||this.data.join("").match(/^[a-z]+$/i))&&(i.texClass=t.TEXCLASS.OP),i},getForm:function(){for(var e=this,i=this.parent,n=this.Parent();n&&n.isEmbellished();)e=i,i=n.parent,n=n.Parent();if(i&&"mrow"===i.type&&1!==i.NonSpaceLength()){if(i.FirstNonSpace()===e)return t.FORM.PREFIX;if(i.LastNonSpace()===e)return t.FORM.POSTFIX}return t.FORM.INFIX},isEmbellished:function(){return!0},hasNewline:function(){return this.Get("linebreak")===t.LINEBREAK.NEWLINE},CoreParent:function(){for(var e=this;e&&e.isEmbellished()&&e.CoreMO()===this&&!e.isa(t.math);)e=e.Parent();return e},CoreText:function(e){if(!e)return"";if(e.isEmbellished())return e.CoreMO().data.join("");for(;((e.isa(t.mrow)||e.isa(t.TeXAtom)||e.isa(t.mstyle)||e.isa(t.mphantom))&&1===e.data.length||e.isa(t.munderover))&&e.data[0];)e=e.data[0];return e.isToken?e.data.join(""):""},remapChars:{"*":"\u2217",'"':"\u2033","\xb0":"\u2218","\xb2":"2","\xb3":"3","\xb4":"\u2032","\xb9":"1"},remap:function(t,e){return t=t.replace(/-/g,"\u2212"),e&&1===(t=t.replace(/'/g,"\u2032").replace(/`/g,"\u2035")).length&&(t=e[t]||t),t},setTeXclass:function(e){var i=this.getValues("form","lspace","rspace","fence");return this.useMMLspacing?(this.texClass=t.TEXCLASS.NONE,this):(i.fence&&!this.texClass&&(i.form===t.FORM.PREFIX&&(this.texClass=t.TEXCLASS.OPEN),i.form===t.FORM.POSTFIX&&(this.texClass=t.TEXCLASS.CLOSE)),this.texClass=this.Get("texClass"),"\u2061"===this.data.join("")?(e&&(e.texClass=t.TEXCLASS.OP,e.fnOP=!0),this.texClass=this.prevClass=t.TEXCLASS.NONE,e):this.adjustTeXclass(e))},adjustTeXclass:function(e){if(this.texClass===t.TEXCLASS.NONE)return e;if(e?(!e.autoOP||this.texClass!==t.TEXCLASS.BIN&&this.texClass!==t.TEXCLASS.REL||(e.texClass=t.TEXCLASS.ORD),this.prevClass=e.texClass||t.TEXCLASS.ORD,this.prevLevel=e.Get("scriptlevel")):this.prevClass=t.TEXCLASS.NONE,this.texClass!==t.TEXCLASS.BIN||this.prevClass!==t.TEXCLASS.NONE&&this.prevClass!==t.TEXCLASS.BIN&&this.prevClass!==t.TEXCLASS.OP&&this.prevClass!==t.TEXCLASS.REL&&this.prevClass!==t.TEXCLASS.OPEN&&this.prevClass!==t.TEXCLASS.PUNCT)if(this.prevClass!==t.TEXCLASS.BIN||this.texClass!==t.TEXCLASS.REL&&this.texClass!==t.TEXCLASS.CLOSE&&this.texClass!==t.TEXCLASS.PUNCT){if(this.texClass===t.TEXCLASS.BIN){for(var i=this,n=this.parent;n&&n.parent&&n.isEmbellished()&&(1===n.data.length||"mrow"!==n.type&&n.Core()===i);)i=n,n=n.parent;n.data[n.data.length-1]===i&&(this.texClass=t.TEXCLASS.ORD)}}else e.texClass=this.prevClass=t.TEXCLASS.ORD;else this.texClass=t.TEXCLASS.ORD;return this}}),t.mtext=t.mbase.Subclass({type:"mtext",isToken:!0,isSpacelike:function(){return!0},texClass:t.TEXCLASS.ORD,defaults:{mathvariant:t.INHERIT,mathsize:t.INHERIT,mathbackground:t.INHERIT,mathcolor:t.INHERIT,dir:t.INHERIT}}),t.mspace=t.mbase.Subclass({type:"mspace",isToken:!0,isSpacelike:function(){return!0},defaults:{mathbackground:t.INHERIT,mathcolor:t.INHERIT,width:"0em",height:"0ex",depth:"0ex",linebreak:t.LINEBREAK.AUTO}