MathJax.js 52 KB

1234567891011121314151617181920212223
  1. /*************************************************************
  2. *
  3. * MathJax.js
  4. *
  5. * The main code for the MathJax math-typesetting library. See
  6. * http://www.mathjax.org/ for details.
  7. *
  8. * ---------------------------------------------------------------------
  9. *
  10. * Copyright (c) 2009-2013 The MathJax Consortium
  11. *
  12. * Licensed under the Apache License, Version 2.0 (the "License");
  13. * you may not use this file except in compliance with the License.
  14. * You may obtain a copy of the License at
  15. *
  16. * http://www.apache.org/licenses/LICENSE-2.0
  17. *
  18. * Unless required by applicable law or agreed to in writing, software
  19. * distributed under the License is distributed on an "AS IS" BASIS,
  20. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. * See the License for the specific language governing permissions and
  22. * limitations under the License.
  23. */window.MathJax||(window.MathJax={});MathJax.isPacked=!0;document.getElementById&&document.childNodes&&document.createElement&&(window.MathJax||(window.MathJax={}),MathJax.Hub||(MathJax.version="2.2",MathJax.fileversion="2.2",function(a){var b=window[a];b||(b=window[a]={});var c=[];a=function(a){var b=a.constructor;b||(b=new Function(""));for(var c in a)"constructor"!==c&&a.hasOwnProperty(c)&&(b[c]=a[c]);return b};var d=function(){return new Function("return arguments.callee.Init.call(this,arguments)")},e=d();e.prototype={bug_test:1};e.prototype.bug_test||(d=function(){return function(){return arguments.callee.Init.call(this,arguments)}});b.Object=a({constructor:d(),Subclass:function(a,b){var h=d();h.SUPER=this;h.Init=this.Init;h.Subclass=this.Subclass;h.Augment=this.Augment;h.protoFunction=this.protoFunction;h.can=this.can;h.has=this.has;h.isa=this.isa;h.prototype=new this(c);h.prototype.constructor=h;h.Augment(a,b);return h},Init:function(a){var b=this;if(1===a.length&&a[0]===c)return b;b instanceof a.callee||(b=new a.callee(c));return b.Init.apply(b,a)||b},Augment:function(a,b){var c;if(null!=a){for(c in a)a.hasOwnProperty(c)&&this.protoFunction(c,a[c]);a.toString!==this.prototype.toString&&a.toString!=={}.toString&&this.protoFunction("toString",a.toString)}if(null!=b)for(c in b)b.hasOwnProperty(c)&&(this[c]=b[c]);return this},protoFunction:function(a,b){this.prototype[a]=b;"function"===typeof b&&(b.SUPER=this.SUPER.prototype)},prototype:{Init:function(){},SUPER:function(a){return a.callee.SUPER},can:function(a){return"function"===typeof this[a]},has:function(a){return"undefined"!==typeof this[a]},isa:function(a){return a instanceof Object&&this instanceof a}},can:function(a){return this.prototype.can.call(this,a)},has:function(a){return this.prototype.has.call(this,a)},isa:function(a){for(var b=this;b;){if(b===a)return!0;b=b.SUPER}return!1},SimpleSUPER:a({constructor:function(a){return this.SimpleSUPER.define(a)},define:function(a){var b={};if(null!=a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=this.wrap(c,a[c]));a.toString!==this.prototype.toString&&a.toString!=={}.toString&&(b.toString=this.wrap("toString",a.toString))}return b},wrap:function(a,b){if("function"===typeof b&&b.toString().match(/\.\s*SUPER\s*\(/)){var c=new Function(this.wrapper);c.label=a;c.original=b;b=c;c.toString=this.stringify}return b},wrapper:function(){var a=arguments.callee;this.SUPER=a.SUPER[a.label];try{var b=a.original.apply(this,arguments)}catch(c){throw delete this.SUPER,c;}delete this.SUPER;return b}.toString().replace(/^\s*function\s*\(\)\s*\{\s*/i,"").replace(/\s*\}\s*$/i,""),toString:function(){return this.original.toString.apply(this.original,arguments)}})})}("MathJax"),function(a){var b=window[a];b||(b=window[a]={});var c=function(a){var b=new Function("return arguments.callee.execute.apply(arguments.callee,arguments)"),d;for(d in c.prototype)c.prototype.hasOwnProperty(d)&&(b[d]="undefined"!==typeof a[d]?a[d]:c.prototype[d]);b.toString=c.prototype.toString;return b};c.prototype={isCallback:!0,hook:function(){},data:[],object:window,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 d=function(a){return"function"===typeof a&&a.isCallback},e=function(a){return eval.call(window,a)};e("var __TeSt_VaR__ \x3d 1");if(window.__TeSt_VaR__)try{delete window.__TeSt_VaR__}catch(q){window.__TeSt_VaR__=null}else e=window.execScript?function(c){b.__code=c;c="try {"+a+".__result \x3d eval("+a+".__code)} catch(err) {"+a+".__result \x3d err}";window.execScript(c);c=b.__result;delete b.__result;delete b.__code;if(c instanceof Error)throw c;return c}:function(c){b.__code=c;c="try {"+a+".__result \x3d eval("+a+".__code)} catch(err) {"+a+".__result \x3d err}";var d=document.getElementsByTagName("head")[0];d||(d=document.body);var h=document.createElement("script");h.appendChild(document.createTextNode(c));d.appendChild(h);d.removeChild(h);c=b.__result;delete b.__result;delete b.__code;if(c instanceof Error)throw c;return c};var f=function(a,b){1<arguments.length&&(a=2===arguments.length&&"function"!==typeof arguments[0]&&arguments[0]instanceof Object&&"number"===typeof arguments[1]?[].slice.call(a,b):[].slice.call(arguments,0));a instanceof Array&&1===a.length&&(a=a[0]);if("function"===typeof a)return a.execute===c.prototype.execute?a:c({hook:a});if(a instanceof Array){if("string"===typeof a[0]&&a[1]instanceof Object&&"function"===typeof a[1][a[0]])return c({hook:a[1][a[0]],object:a[1],data:a.slice(2)});if("function"===typeof a[0])return c({hook:a[0],data:a.slice(1)});if("function"===typeof a[1])return c({hook:a[1],object:a[0],data:a.slice(2)})}else{if("string"===typeof a)return c({hook:e,data:[a]});if(a instanceof Object)return c(a);if("undefined"===typeof a)return c({})}throw Error("Can't make callback from given data");},g=function(a,b){a=f(a);a.called||(l(a,b),b.pending++)},h=function(){var a=this.signal;delete this.signal;this.execute=this.oldExecute;delete this.oldExecute;var b=this.execute.apply(this,arguments);if(d(b)&&!b.called)l(b,a);else for(var b=0,c=a.length;b<c;b++)a[b].pending--,0>=a[b].pending&&a[b].call()},l=function(a,b){b instanceof Array||(b=[b]);a.signal?1===b.length?a.signal.push(b[0]):a.signal=a.signal.concat(b):(a.oldExecute=a.execute,a.execute=h,a.signal=b)},m=function(a){a=f(a);a.pending=0;for(var b=1,c=arguments.length;b<c;b++)arguments[b]&&g(arguments[b],a);0===a.pending&&(b=a(),d(b)&&(a=b));return a},k=MathJax.Object.Subclass({Init:function(a){this.hooks=[];this.reset=a},Add:function(a,b){null==b&&(b=10);d(a)||(a=f(a));a.priority=b;for(var c=this.hooks.length;0<c&&b<this.hooks[c-1].priority;)c--;this.hooks.splice(c,0,a);return a},Remove:function(a){for(var b=0,c=this.hooks.length;b<c;b++)if(this.hooks[b]===a){this.hooks.splice(b,1);break}},Execute:function(){for(var a=[{}],b=0,c=this.hooks.length;b<c;b++){this.reset&&this.hooks[b].reset();var h=this.hooks[b].apply(window,arguments);d(h)&&!h.called&&a.push(h)}return 1===a.length?null:2===a.length?a[1]:m.apply({},a)}}),n=b.Object.Subclass({Init:function(){this.running=this.pending=0;this.queue=[];this.Push.apply(this,arguments)},Push:function(){for(var a,b=0,c=arguments.length;b<c;b++)a=f(arguments[b]),a!==arguments[b]||a.called||(a=f(["wait",this,a])),this.queue.push(a);this.running||this.pending||this.Process();return a},Process:function(a){for(;!this.running&&!this.pending&&this.queue.length;){var b=this.queue[0];a=this.queue.slice(1);this.queue=[];this.Suspend();b=b();this.Resume();a.length&&(this.queue=a.concat(this.queue));d(b)&&!b.called&&g(b,this)}},Suspend:function(){this.running++},Resume:function(){this.running&&this.running--},call:function(){this.Process.apply(this,arguments)},wait:function(a){return a}}),p=n.Subclass({Init:function(a){n.prototype.Init.call(this);this.name=a;this.posted=[];this.listeners=k(!0)},Post:function(a,b,c){b=f(b);this.posting||this.pending?this.Push(["Post",this,a,b,c]):(this.callback=b,b.reset(),c||this.posted.push(a),this.Suspend(),this.posting=!0,a=this.listeners.Execute(a),d(a)&&!a.called&&g(a,this),this.Resume(),delete this.posting,this.pending||this.call());return b},Clear:function(a){a=f(a);this.posting||this.pending?a=this.Push(["Clear",this,a]):(this.posted=[],a());return a},call:function(){this.callback(this);this.Process()},Interest:function(a,b,c){a=f(a);this.listeners.Add(a,c);if(!b)for(b=0,c=this.posted.length;b<c;b++){a.reset();var h=a(this.posted[b]);d(h)&&b===this.posted.length-1&&g(h,this)}return a},NoInterest:function(a){this.listeners.Remove(a)},MessageHook:function(a,b,c){b=f(b);this.hooks||(this.hooks={},this.Interest(["ExecuteHooks",this]));this.hooks[a]||(this.hooks[a]=k(!0));this.hooks[a].Add(b,c);c=0;for(var d=this.posted.length;c<d;c++)this.posted[c]==a&&(b.reset(),b(this.posted[c]));return b},ExecuteHooks:function(a,b){var c=a instanceof Array?a[0]:a;return this.hooks[c]?this.hooks[c].Execute(a):null}},{signals:{},find:function(a){p.signals[a]||(p.signals[a]=new p(a));return p.signals[a]}});b.Callback=b.CallBack=f;b.Callback.Delay=function(a,b){b=f(b);b.timeout=setTimeout(b,a);return b};b.Callback.After=m;b.Callback.Queue=n;b.Callback.Signal=p.find;b.Callback.Hooks=k;b.Callback.ExecuteHooks=function(a,b,c){if(!a)return null;a instanceof Array||(a=[a]);b instanceof Array||(b=null==b?[]:[b]);c=k(c);for(var d=0,h=a.length;d<h;d++)c.Add(a[d]);return c.Execute.apply(c,b)}}("MathJax"),function(a){var b=window[a];b||(b=window[a]={});var c="Apple Computer, Inc."===navigator.vendor&&"undefined"===typeof navigator.vendorSub,d=0,e=function(a){document.styleSheets&&document.styleSheets.length>d&&(d=document.styleSheets.length);a||(a=document.getElementsByTagName("head")[0],a||(a=document.body));return a},f=[],g=function(){for(var a=0,c=f.length;a<c;a++)b.Ajax.head.removeChild(f[a]);f=[]};b.Ajax={loaded:{},loading:{},loadHooks:{},timeout:15E3,styleDelay:1,config:{root:""},STATUS:{OK:1,ERROR:-1},rootPattern:new RegExp("^\\["+a+"\\]"),fileURL:function(a){return a.replace(this.rootPattern,this.config.root)},Require:function(a,c){c=b.Callback(c);var d;if(a instanceof Object)for(var e in a)a.hasOwnProperty(e)&&(d=e.toUpperCase(),a=a[e]);else d=a.split(/\./).pop().toUpperCase();a=this.fileURL(a);this.loaded[a]?c(this.loaded[a]):(e={},e[d]=a,this.Load(e,c));return c},Load:function(a,c){c=b.Callback(c);var d;if(a instanceof Object)for(var g in a)a.hasOwnProperty(g)&&(d=g.toUpperCase(),a=a[g]);else d=a.split(/\./).pop().toUpperCase();a=this.fileURL(a);if(this.loading[a])this.addHook(a,c);else if(this.head=e(this.head),this.loader[d])this.loader[d].call(this,a,c);else throw Error("Can't load files of type "+d);return c},LoadHook:function(a,c,d){c=b.Callback(c);if(a instanceof Object)for(var e in a)a.hasOwnProperty(e)&&(a=a[e]);a=this.fileURL(a);this.loaded[a]?c(this.loaded[a]):this.addHook(a,c,d);return c},addHook:function(a,b,c){this.loadHooks[a]||(this.loadHooks[a]=MathJax.Callback.Hooks());this.loadHooks[a].Add(b,c)},Preloading:function(){for(var a=0,b=arguments.length;a<b;a++){var c=this.fileURL(arguments[a]);this.loading[c]||(this.loading[c]={preloaded:!0})}},loader:{JS:function(a,c){var d=document.createElement("script"),e=b.Callback(["loadTimeout",this,a]);this.loading[a]={callback:c,timeout:setTimeout(e,this.timeout),status:this.STATUS.OK,script:d};this.loading[a].message=b.Message.File(a);d.onerror=e;d.type="text/javascript";d.src=a;this.head.appendChild(d)},CSS:function(a,c){var d=document.createElement("link");d.rel="stylesheet";d.type="text/css";d.href=a;this.loading[a]={callback:c,message:b.Message.File(a),status:this.STATUS.OK};this.head.appendChild(d);this.timer.create.call(this,[this.timer.file,a],d)}},timer:{create:function(a,e){a=b.Callback(a);"STYLE"===e.nodeName&&e.styleSheet&&"undefined"!==typeof e.styleSheet.cssText?a(this.STATUS.OK):window.chrome&&"undefined"!==typeof window.sessionStorage&&"STYLE"===e.nodeName?a(this.STATUS.OK):c?this.timer.start(this,[this.timer.checkSafari2,d++,a],this.styleDelay):this.timer.start(this,[this.timer.checkLength,e,a],this.styleDelay);return a},start:function(a,c,d,e){c=b.Callback(c);c.execute=this.execute;c.time=this.time;c.STATUS=a.STATUS;c.timeout=e||a.timeout;c.delay=c.total=0;d?setTimeout(c,d):c()},time:function(a){this.total+=this.delay;this.delay=Math.floor(1.05*this.delay+5);return this.total>=this.timeout?(a(this.STATUS.ERROR),1):0},file:function(a,c){0>c?b.Ajax.loadTimeout(a):b.Ajax.loadComplete(a)},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(a,b,c){a.time(c)||(document.styleSheets.length>b&&document.styleSheets[b].cssRules&&document.styleSheets[b].cssRules.length?c(a.STATUS.OK):setTimeout(a,a.delay))},checkLength:function(a,c,d){if(!a.time(d)){var e=0;c=c.sheet||c.styleSheet;try{0<(c.cssRules||c.rules||[]).length&&(e=1)}catch(g){g.message.match(/protected variable|restricted URI/)?e=1:g.message.match(/Security error/)&&(e=1)}e?setTimeout(b.Callback([d,a.STATUS.OK]),0):setTimeout(a,a.delay)}}},loadComplete:function(a){a=this.fileURL(a);var c=this.loading[a];c&&!c.preloaded?(b.Message.Clear(c.message),clearTimeout(c.timeout),c.script&&(0===f.length&&setTimeout(g,0),f.push(c.script)),this.loaded[a]=c.status,delete this.loading[a],this.addHook(a,c.callback)):(c&&delete this.loading[a],this.loaded[a]=this.STATUS.OK,c={status:this.STATUS.OK});return this.loadHooks[a]?this.loadHooks[a].Execute(c.status):null},loadTimeout:function(a){this.loading[a].timeout&&clearTimeout(this.loading[a].timeout);this.loading[a].status=this.STATUS.ERROR;this.loadError(a);this.loadComplete(a)},loadError:function(a){b.Message.Set(["LoadFailed","File failed to load: %1",a],null,2E3);b.Hub.signal.Post(["file load error",a])},Styles:function(a,c){var d=this.StyleString(a);if(""===d)c=b.Callback(c),c();else{var g=document.createElement("style");g.type="text/css";this.head=e(this.head);this.head.appendChild(g);g.styleSheet&&"undefined"!==typeof g.styleSheet.cssText?g.styleSheet.cssText=d:g.appendChild(document.createTextNode(d));c=this.timer.create.call(this,c,g)}return c},StyleString:function(a){if("string"===typeof a)return a;var b="",c,d;for(c in a)if(a.hasOwnProperty(c))if("string"===typeof a[c])b+=c+" {"+a[c]+"}\n";else if(a[c]instanceof Array)for(var e=0;e<a[c].length;e++)d={},d[c]=a[c][e],b+=this.StyleString(d);else if("@media"===c.substr(0,6))b+=c+" {"+this.StyleString(a[c])+"}\n";else if(null!=a[c]){d=[];for(var g in a[c])a[c].hasOwnProperty(g)&&null!=a[c][g]&&(d[d.length]=g+": "+a[c][g]);b+=c+" {"+d.join("; ")+"}\n"}return b}}}("MathJax"),MathJax.HTML={Element:function(a,b,c){var d=document.createElement(a);if(b){if(b.style){var e=b.style;b.style={};for(var f in e)e.hasOwnProperty(f)&&(b.style[f.replace(/-([a-z])/g,this.ucMatch)]=e[f])}MathJax.Hub.Insert(d,b)}if(c)for(c instanceof Array||(c=[c]),b=0;b<c.length;b++)c[b]instanceof Array?d.appendChild(this.Element(c[b][0],c[b][1],c[b][2])):"script"===a?this.setScript(d,c[b]):d.appendChild(document.createTextNode(c[b]));return d},ucMatch:function(a,b){return b.toUpperCase()},addElement:function(a,b,c,d){return a.appendChild(this.Element(b,c,d))},TextNode:function(a){return document.createTextNode(a)},addText:function(a,b){return a.appendChild(this.TextNode(b))},setScript:function(a,b){if(this.setScriptBug)a.text=b;else{for(;a.firstChild;)a.removeChild(a.firstChild);this.addText(a,b)}},getScript:function(a){return(""===a.text?a.innerHTML:a.text).replace(/^\s+/,"").replace(/\s+$/,"")},Cookie:{prefix:"mjx",expires:365,Set:function(a,b){var c=[];if(b)for(var d in b)b.hasOwnProperty(d)&&c.push(d+":"+b[d].toString().replace(/&/g,"\x26\x26"));c=this.prefix+"."+a+"\x3d"+escape(c.join("\x26;"));this.expires&&(d=new Date,d.setDate(d.getDate()+this.expires),c+="; expires\x3d"+d.toGMTString());try{document.cookie=c+"; path\x3d/"}catch(e){}},Get:function(a,b){b||(b={});var c=(new RegExp("(?:^|;\\s*)"+this.prefix+"\\."+a+"\x3d([^;]*)(?:;|$)")).exec(document.cookie);if(c&&""!==c[1])for(var d=unescape(c[1]).split("\x26;"),e=0,f=d.length;e<f;e++){var c=d[e].match(/([^:]+):(.*)/),g=c[2].replace(/&&/g,"\x26");"true"===g?g=!0:"false"===g?g=!1:g.match(/^-?(\d+(\.\d+)?|\.\d+)$/)&&(g=parseFloat(g));b[c[1]]=g}return b}}},MathJax.Localization={locale:"en",directory:"[MathJax]/localization",strings:{en:{menuTitle:"English",isLoaded:!0},de:{menuTitle:"Deutsch"},fr:{menuTitle:"Fran\u00e7ais"}},pattern:/%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,SPLIT:3==="axb".split(/(x)/).length?function(a,b){return a.split(b)}:function(a,b){var c=[],d,e=0;for(b.lastIndex=0;d=b.exec(a);)c.push(a.substr(e,d.index)),c.push.apply(c,d.slice(1)),e=d.index+d[0].length;c.push(a.substr(e));return c},_:function(a,b){return b instanceof Array?this.processSnippet(a,b):this.processString(this.lookupPhrase(a,b),[].slice.call(arguments,2))},processString:function(a,b,c){var d,e;d=0;for(e=b.length;d<e;d++)c&&b[d]instanceof Array&&(b[d]=this.processSnippet(c,b[d]));a=this.SPLIT(a,this.pattern);d=1;for(e=a.length;d<e;d+=2){var f=a[d].charAt(0);if("0"<=f&&"9">=f)a[d]=b[a[d]-1],"number"===typeof a[d]&&(a[d]=this.number(a[d]));else if("{"===f)if(f=a[d].substr(1),"0"<=f&&"9">=f)a[d]=b[a[d].substr(1,a[d].length-2)-1],"number"===typeof a[d]&&(a[d]=this.number(a[d]));else{var g=a[d].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);g&&("plural"===g[1]?(f=b[g[2]-1],"undefined"===typeof f?a[d]="???":(f=this.plural(f)-1,g=g[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uefef").split(/\|/),a[d]=0<=f&&f<g.length?this.processString(g[f].replace(/\uEFEF/g,"|"),b,c):"???")):a[d]="%"+a[d])}null==a[d]&&(a[d]="???")}if(!c)return a.join("");b=[];c="";for(d=0;d<e;d++)c+=a[d],d++,d<e&&(a[d]instanceof Array?(b.push(c),b=b.concat(a[d]),c=""):c+=a[d]);""!==c&&b.push(c);return b},processSnippet:function(a,b){for(var c=[],d=0,e=b.length;d<e;d++)if(b[d]instanceof Array){var f=b[d];if("string"===typeof f[1]){var g=f[0];g instanceof Array||(g=[a,g]);g=this.lookupPhrase(g,f[1]);c=c.concat(this.processMarkdown(g,f.slice(2),a))}else f[1]instanceof Array?c=c.concat(this.processSnippet.apply(this,f)):3<=f.length?c.push([f[0],f[1],this.processSnippet(a,f[2])]):c.push(b[d])}else c.push(b[d]);return c},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(a,b,c){for(var d=[],e=a.split(this.markdownPattern),f=e[0],g=1,h=e.length;g<h;g+=8)e[g+1]?(a=this.processString(e[g+2],b,c),a instanceof Array||(a=[a]),a=[["b","i","i"][e[g+1].length-1],{},a],3===e[g+1].length&&(a=["b",{},a])):e[g+3]?(a=this.processString(e[g+4].replace(/^\s/,"").replace(/\s$/,""),b,c),a instanceof Array||(a=[a]),a=["code",{},a]):e[g+5]?(a=this.processString(e[g+5],b,c),a instanceof Array||(a=[a]),a=["a",{href:this.processString(e[g+6],b),target:"_blank"},a]):(f+=e[g],a=null),a&&(d=this.concatString(d,f,b,c),d.push(a),f=""),""!==e[g+7]&&(f+=e[g+7]);return d=this.concatString(d,f,b,c)},concatString:function(a,b,c,d){""!=b&&(b=this.processString(b,c,d),b instanceof Array||(b=[b]),a=a.concat(b));return a},lookupPhrase:function(a,b,c){c||(c="_");a instanceof Array&&(c=a[0]||"_",a=a[1]||"");var d=this.loadDomain(c);d&&MathJax.Hub.RestartAfter(d);(d=this.strings[this.locale])&&d.domains&&c in d.domains&&(c=d.domains[c],c.strings&&a in c.strings&&(b=c.strings[a]));return b},loadFile:function(a,b,c){c=MathJax.Callback(c||{});a=b.file||a;a.match(/\.js$/)||(a+=".js");a.match(/^([a-z]+:|\[MathJax\])/)||(a=(this.strings[this.locale].directory||this.directory+"/"+this.locale||"[MathJax]/localization/"+this.locale)+"/"+a);a=MathJax.Ajax.Require(a,function(){b.isLoaded=!0;return c()});return a.called?null:a},loadDomain:function(a,b){var c,d=this.strings[this.locale];if(d){if(!d.isLoaded&&(c=this.loadFile(this.locale,d)))return MathJax.Callback.Queue(c,["loadDomain",this,a]).Push(b);if(d.domains&&a in d.domains&&(c=d.domains[a],!c.isLoaded&&(c=this.loadFile(a,c))))return MathJax.Callback.Queue(c).Push(b)}return MathJax.Callback(b)()},Try:function(a){a=MathJax.Callback(a);a.autoReset=!0;try{a()}catch(b){if(!b.restart)throw b;MathJax.Callback.After(["Try",this,a],b.restart)}},setLocale:function(a){this.strings[a]&&(this.locale=a);MathJax.Menu&&this.loadDomain("MathMenu")},addTranslation:function(a,b,c){var d=this.strings[a],e=!1;d||(d=this.strings[a]={},e=!0);d.domains||(d.domains={});b&&(d.domains[b]||(d.domains[b]={}),d=d.domains[b]);MathJax.Hub.Insert(d,c);e&&MathJax.Menu.menu&&MathJax.Menu.CreateLocaleMenu()},setCSS:function(a){var b=this.strings[this.locale];b&&(b.fontFamily&&(a.style.fontFamily=b.fontFamily),b.fontDirection&&(a.style.direction=b.fontDirection,"rtl"===b.fontDirection&&(a.style.textAlign="right")));return a},fontFamily:function(){var a=this.strings[this.locale];return a?a.fontFamily:null},fontDirection:function(){var a=this.strings[this.locale];return a?a.fontDirection:null},plural:function(a){var b=this.strings[this.locale];return b&&b.plural?b.plural(a):1==a?1:2},number:function(a){var b=this.strings[this.locale];return b&&b.number?b.number(a):a}},MathJax.Message={ready:!1,log:[{}],current:null,textNodeBug:"Apple Computer, Inc."===navigator.vendor&&"undefined"===typeof navigator.vendorSub||window.hasOwnProperty&&window.hasOwnProperty("konqueror"),styles:{"#MathJax_Message":{position:"fixed",left:"1px",bottom:"2px","background-color":"#E6E6E6",border:"1px solid #959595",margin:"0px",padding:"2px 8px","z-index":"102",color:"black","font-size":"80%",width:"auto","white-space":"nowrap"},"#MathJax_MSIE_Frame":{position:"absolute",top:0,left:0,width:"0px","z-index":101,border:"0px",margin:"0px",padding:"0px"}},browsers:{MSIE:function(a){MathJax.Hub.config.styles["#MathJax_Message"].position="absolute";MathJax.Message.quirks="BackCompat"===document.compatMode},Chrome:function(a){MathJax.Hub.config.styles["#MathJax_Message"].bottom="1.5em";MathJax.Hub.config.styles["#MathJax_Message"].left="1em"}},Init:function(a){a&&(this.ready=!0);if(!document.body||!this.ready)return!1;this.div&&null==this.div.parentNode&&(this.div=document.getElementById("MathJax_Message"))&&(this.text=this.div.firstChild);this.div||(a=document.body,MathJax.Hub.Browser.isMSIE&&(a=this.frame=this.addDiv(document.body),a.removeAttribute("id"),a.style.position="absolute",a.style.border=a.style.margin=a.style.padding="0px",a.style.zIndex="101",a.style.height="0px",a=this.addDiv(a),a.id="MathJax_MSIE_Frame",window.attachEvent("onscroll",this.MoveFrame),window.attachEvent("onresize",this.MoveFrame),this.MoveFrame()),this.div=this.addDiv(a),this.div.style.display="none",this.text=this.div.appendChild(document.createTextNode("")));return!0},addDiv:function(a){var b=document.createElement("div");b.id="MathJax_Message";a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b);return b},MoveFrame:function(){var a=MathJax.Message.quirks?document.body:document.documentElement,b=MathJax.Message.frame;b.style.left=a.scrollLeft+"px";b.style.top=a.scrollTop+"px";b.style.width=a.clientWidth+"px";b=b.firstChild;b.style.height=a.clientHeight+"px"},localize:function(a){return MathJax.Localization._(a,a)},filterText:function(a,b,c){"simple"===MathJax.Hub.config.messageStyle&&("LoadFile"===c?(this.loading||(this.loading=this.localize("Loading")+" "),a=this.loading,this.loading+="."):"ProcessMath"===c?(this.processing||(this.processing=this.localize("Processing")+" "),a=this.processing,this.processing+="."):"TypesetMath"===c&&(this.typesetting||(this.typesetting=this.localize("Typesetting")+" "),a=this.typesetting,this.typesetting+="."));return a},Set:function(a,b,c){null==b&&(b=this.log.length,this.log[b]={});var d="";if(a instanceof Array){d=a[0];d instanceof Array&&(d=d[1]);try{a=MathJax.Localization._.apply(MathJax.Localization,a)}catch(e){if(!e.restart)throw e;if(!e.restart.called)return null==this.log[b].restarted&&(this.log[b].restarted=0),this.log[b].restarted++,delete this.log[b].cleared,MathJax.Callback.After(["Set",this,a,b,c],e.restart),b}}this.timer&&(clearTimeout(this.timer),delete this.timer);this.log[b].text=a;this.log[b].filteredText=a=this.filterText(a,b,d);"undefined"===typeof this.log[b].next&&(this.log[b].next=this.current,null!=this.current&&(this.log[this.current].prev=b),this.current=b);this.current===b&&"none"!==MathJax.Hub.config.messageStyle&&(this.Init()?(this.textNodeBug?this.div.innerHTML=a:this.text.nodeValue=a,this.div.style.display="",this.status&&(window.status="",delete this.status)):(window.status=a,this.status=!0));this.log[b].restarted&&(this.log[b].cleared&&(c=0),0===--this.log[b].restarted&&delete this.log[b].cleared);c?setTimeout(MathJax.Callback(["Clear",this,b]),c):0==c&&this.Clear(b,0);return b},Clear:function(a,b){null!=this.log[a].prev&&(this.log[this.log[a].prev].next=this.log[a].next);null!=this.log[a].next&&(this.log[this.log[a].next].prev=this.log[a].prev);this.current===a&&(this.current=this.log[a].next,this.text?(null==this.div.parentNode&&this.Init(),null==this.current?(this.timer&&(clearTimeout(this.timer),delete this.timer),null==b&&(b=600),0===b?this.Remove():this.timer=setTimeout(MathJax.Callback(["Remove",this]),b)):"none"!==MathJax.Hub.config.messageStyle&&(this.textNodeBug?this.div.innerHTML=this.log[this.current].filteredText:this.text.nodeValue=this.log[this.current].filteredText),this.status&&(window.status="",delete this.status)):this.status&&(window.status=null==this.current?"":this.log[this.current].text));delete this.log[a].next;delete this.log[a].prev;delete this.log[a].filteredText;this.log[a].restarted&&(this.log[a].cleared=!0)},Remove:function(){this.text.nodeValue="";this.div.style.display="none"},File:function(a){var b=MathJax.Ajax.config.root;a.substr(0,b.length)===b&&(a="[MathJax]"+a.substr(b.length));return this.Set(["LoadFile","Loading %1",a],null,null)},Log:function(){for(var a=[],b=1,c=this.log.length;b<c;b++)a[b]=this.log[b].text;return a.join("\n")}},MathJax.Hub={config:{root:"",config:[],styleSheets:[],styles:{".MathJax_Preview":{color:"#888"}},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:"",font:"Auto",context:"MathJax",locale:"en",mpContext:!1,mpMouse:!1,texHints:!0},errorSettings:{message:["[",["MathProcessingError","Math Processing Error"],"]"],style:{color:"#CC0000","font-style":"italic"}}},preProcessors:MathJax.Callback.Hooks(!0),inputJax:{},outputJax:{order:{}},processUpdateTime:250,processUpdateDelay:10,signal:MathJax.Callback.Signal("Hub"),Config:function(a){this.Insert(this.config,a);this.config.Augment&&this.Augment(this.config.Augment)},CombineConfig:function(a,b){var c=this.config,d,e;a=a.split(/\./);for(var f=0,g=a.length;f<g;f++)d=a[f],c[d]||(c[d]={}),e=c,c=c[d];return e[d]=c=this.Insert(b,c)},Register:{PreProcessor:function(){MathJax.Hub.preProcessors.Add.apply(MathJax.Hub.preProcessors,arguments)},MessageHook:function(){return MathJax.Hub.signal.MessageHook.apply(MathJax.Hub.signal,arguments)},StartupHook:function(){return MathJax.Hub.Startup.signal.MessageHook.apply(MathJax.Hub.Startup.signal,arguments)},LoadHook:function(){return MathJax.Ajax.LoadHook.apply(MathJax.Ajax,arguments)}},getAllJax:function(a){var b=[];a=this.elementScripts(a);for(var c=0,d=a.length;c<d;c++)a[c].MathJax&&a[c].MathJax.elementJax&&b.push(a[c].MathJax.elementJax);return b},getJaxByType:function(a,b){for(var c=[],d=this.elementScripts(b),e=0,f=d.length;e<f;e++)d[e].MathJax&&d[e].MathJax.elementJax&&d[e].MathJax.elementJax.mimeType===a&&c.push(d[e].MathJax.elementJax);return c},getJaxByInputType:function(a,b){for(var c=[],d=this.elementScripts(b),e=0,f=d.length;e<f;e++)d[e].MathJax&&d[e].MathJax.elementJax&&d[e].type&&d[e].type.replace(/ *;(.|\s)*/,"")===a&&c.push(d[e].MathJax.elementJax);return c},getJaxFor:function(a){"string"===typeof a&&(a=document.getElementById(a));if(a&&a.MathJax)return a.MathJax.elementJax;if(a&&a.isMathJax){for(;a&&!a.jaxID;)a=a.parentNode;if(a)return MathJax.OutputJax[a.jaxID].getJaxFromMath(a)}return null},isJax:function(a){"string"===typeof a&&(a=document.getElementById(a));if(a&&a.isMathJax)return 1;if(a&&null!=a.tagName&&"script"===a.tagName.toLowerCase()){if(a.MathJax)return a.MathJax.state===MathJax.ElementJax.STATE.PROCESSED?1:-1;if(a.type&&this.inputJax[a.type.replace(/ *;(.|\s)*/,"")])return-1}return 0},setRenderer:function(a,b){if(a){if(MathJax.OutputJax[a]){this.config.menuSettings.renderer=a;null==b&&(b="jax/mml");var c=this.outputJax;return c[b]&&c[b].length&&a!==c[b][0].id?(c[b].unshift(MathJax.OutputJax[a]),this.signal.Post(["Renderer Selected",a])):null}this.config.menuSettings.renderer="";return MathJax.Ajax.Require("[MathJax]/jax/output/"+a+"/config.js",["setRenderer",this,a,b])}},Queue:function(){return this.queue.Push.apply(this.queue,arguments)},Typeset:function(a,b){if(!MathJax.isReady)return null;for(var c=this.elementCallback(a,b),d=MathJax.Callback.Queue(),e=0,f=c.elements.length;e<f;e++)c.elements[e]&&d.Push(["PreProcess",this,c.elements[e]],["Process",this,c.elements[e]]);return d.Push(c.callback)},PreProcess:function(a,b){for(var c=this.elementCallback(a,b),d=MathJax.Callback.Queue(),e=0,f=c.elements.length;e<f;e++)c.elements[e]&&d.Push(["Post",this.signal,["Begin PreProcess",c.elements[e]]],arguments.callee.disabled?{}:["Execute",this.preProcessors,c.elements[e]],["Post",this.signal,["End PreProcess",c.elements[e]]]);return d.Push(c.callback)},Process:function(a,b){return this.takeAction("Process",a,b)},Update:function(a,b){return this.takeAction("Update",a,b)},Reprocess:function(a,b){return this.takeAction("Reprocess",a,b)},Rerender:function(a,b){return this.takeAction("Rerender",a,b)},takeAction:function(a,b,c){b=this.elementCallback(b,c);c=MathJax.Callback.Queue(["Clear",this.signal]);for(var d=0,e=b.elements.length;d<e;d++)if(b.elements[d]){var f={scripts:[],start:(new Date).getTime(),i:0,j:0,jax:{},jaxIDs:[]};c.Push(["Post",this.signal,["Begin "+a,b.elements[d]]],["Post",this.signal,["Begin Math",b.elements[d],a]],["prepareScripts",this,a,b.elements[d],f],["Post",this.signal,["Begin Math Input",b.elements[d],a]],["processInput",this,f],["Post",this.signal,["End Math Input",b.elements[d],a]],["prepareOutput",this,f,"preProcess"],["Post",this.signal,["Begin Math Output",b.elements[d],a]],["processOutput",this,f],["Post",this.signal,["End Math Output",b.elements[d],a]],["prepareOutput",this,f,"postProcess"],["Post",this.signal,["End Math",b.elements[d],a]],["Post",this.signal,["End "+a,b.elements[d]]])}return c.Push(b.callback)},scriptAction:{Process:function(a){},Update:function(a){var b=a.MathJax.elementJax;b&&b.needsUpdate()?(b.Remove(!0),a.MathJax.state=b.STATE.UPDATE):a.MathJax.state=b.STATE.PROCESSED},Reprocess:function(a){var b=a.MathJax.elementJax;b&&(b.Remove(!0),a.MathJax.state=b.STATE.UPDATE)},Rerender:function(a){var b=a.MathJax.elementJax;b&&(b.Remove(!0),a.MathJax.state=b.STATE.OUTPUT)}},prepareScripts:function(a,b,c){if(!arguments.callee.disabled)for(var d=this.elementScripts(b),e=MathJax.ElementJax.STATE,f=0,g=d.length;f<g;f++){var h=d[f];if(h.type&&this.inputJax[h.type.replace(/ *;(.|\n)*/,"")]){if(h.MathJax&&(h.MathJax.elementJax&&h.MathJax.elementJax.hover&&MathJax.Extension.MathEvents.Hover.ClearHover(h.MathJax.elementJax),h.MathJax.state!==e.PENDING))this.scriptAction[a](h);h.MathJax||(h.MathJax={state:e.PENDING});h.MathJax.state!==e.PROCESSED&&c.scripts.push(h)}}},checkScriptSiblings:function(a){if(!a.MathJax.checked){var b=this.config,c=a.previousSibling;if(c&&"#text"===c.nodeName){var d,e,f=a.nextSibling;f&&"#text"!==f.nodeName&&(f=null);b.preJax&&("string"===typeof b.preJax&&(b.preJax=new RegExp(b.preJax+"$")),d=c.nodeValue.match(b.preJax));b.postJax&&f&&("string"===typeof b.postJax&&(b.postJax=new RegExp("^"+b.postJax)),e=f.nodeValue.match(b.postJax));!d||b.postJax&&!e||(c.nodeValue=c.nodeValue.replace(b.preJax,1<d.length?d[1]:""),c=null);!e||b.preJax&&!d||(f.nodeValue=f.nodeValue.replace(b.postJax,1<e.length?e[1]:""));c&&!c.nodeValue.match(/\S/)&&(c=c.previousSibling)}b.preRemoveClass&&c&&c.className===b.preRemoveClass&&(a.MathJax.preview=c);a.MathJax.checked=1}},processInput:function(a){var b,c=MathJax.ElementJax.STATE,d,e,f=a.scripts.length;try{for(;a.i<f;)if(d=a.scripts[a.i])if((e=d.previousSibling)&&"MathJax_Error"===e.className&&e.parentNode.removeChild(e),d.MathJax&&d.MathJax.state!==c.PROCESSED){if(d.MathJax.elementJax&&d.MathJax.state!==c.UPDATE)d.MathJax.state===c.OUTPUT&&this.saveScript(d.MathJax.elementJax,a,d,c);else{this.checkScriptSiblings(d);var g=d.type.replace(/ *;(.|\s)*/,"");b=this.inputJax[g].Process(d,a);if("function"===typeof b){if(b.called)continue;this.RestartAfter(b)}b.Attach(d,this.inputJax[g].id);this.saveScript(b,a,d,c)}a.i++;var h=(new Date).getTime();h-a.start>this.processUpdateTime&&a.i<a.scripts.length&&(a.start=h,this.RestartAfter(MathJax.Callback.Delay(1)))}else a.i++;else a.i++}catch(l){return this.processError(l,a,"Input")}a.scripts.length&&this.config.showProcessingMessages&&MathJax.Message.Set(["ProcessMath","Processing math: %1%%",100],0);a.start=(new Date).getTime();a.i=a.j=0;return null},saveScript:function(a,b,c,d){if(!this.outputJax[a.mimeType])throw c.MathJax.state=d.UPDATE,Error("No output jax registered for "+a.mimeType);a.outputJax=this.outputJax[a.mimeType][0].id;b.jax[a.outputJax]||(0===b.jaxIDs.length?b.jax[a.outputJax]=b.scripts:(1===b.jaxIDs.length&&(b.jax[b.jaxIDs[0]]=b.scripts.slice(0,b.i)),b.jax[a.outputJax]=[]),b.jaxIDs.push(a.outputJax));1<b.jaxIDs.length&&b.jax[a.outputJax].push(c);c.MathJax.state=d.OUTPUT},prepareOutput:function(a,b){for(;a.j<a.jaxIDs.length;){var c=a.jaxIDs[a.j],d=MathJax.OutputJax[c];if(d[b])try{var e=d[b](a);if("function"===typeof e){if(e.called)continue;this.RestartAfter(e)}}catch(f){return f.restart||(MathJax.Message.Set(["PrepError","Error preparing %1 output (%2)",c,b],null,600),MathJax.Hub.lastPrepError=f,a.j++),MathJax.Callback.After(["prepareOutput",this,a,b],f.restart)}a.j++}return null},processOutput:function(a){var b=MathJax.ElementJax.STATE,c,d=a.scripts.length;try{for(;a.i<d;)if((c=a.scripts[a.i])&&c.MathJax&&!c.MathJax.error){var e=c.MathJax.elementJax;if(e){MathJax.OutputJax[e.outputJax].Process(c,a);c.MathJax.state=b.PROCESSED;a.i++;c.MathJax.preview&&(c.MathJax.preview.innerHTML="");this.signal.Post(["New Math",e.inputID]);var f=(new Date).getTime();f-a.start>this.processUpdateTime&&a.i<a.scripts.length&&(a.start=f,this.RestartAfter(MathJax.Callback.Delay(this.processUpdateDelay)))}else a.i++}else a.i++}catch(g){return this.processError(g,a,"Output")}a.scripts.length&&this.config.showProcessingMessages&&(MathJax.Message.Set(["TypesetMath","Typesetting math: %1%%",100],0),MathJax.Message.Clear(0));a.i=a.j=0;return null},processMessage:function(a,b){var c=Math.floor(a.i/a.scripts.length*100),d="Output"===b?["TypesetMath","Typesetting math: %1%%"]:["ProcessMath","Processing math: %1%%"];this.config.showProcessingMessages&&MathJax.Message.Set(d.concat(c),0)},processError:function(a,b,c){if(!a.restart){if(!this.config.errorSettings.message)throw a;this.formatError(b.scripts[b.i],a);b.i++}this.processMessage(b,c);return MathJax.Callback.After(["process"+c,this,b],a.restart)},formatError:function(a,b){var c="Error: "+b.message+"\n";b.sourceURL&&(c+="\nfile: "+b.sourceURL);b.line&&(c+="\nline: "+b.line);a.MathJax.error=MathJax.OutputJax.Error.Jax(c,a);var c=this.config.errorSettings,c=MathJax.Localization._(c.messageId,c.message),d=MathJax.HTML.Element("span",{className:"MathJax_Error",jaxID:"Error",isMathJax:!0},c);MathJax.Extension.MathEvents?(d.oncontextmenu=MathJax.Extension.MathEvents.Event.Menu,d.onmousedown=MathJax.Extension.MathEvents.Event.Mousedown):MathJax.Ajax.Require("[MathJax]/extensions/MathEvents.js",function(){d.oncontextmenu=MathJax.Extension.MathEvents.Event.Menu;d.onmousedown=MathJax.Extension.MathEvents.Event.Mousedown});a.parentNode.insertBefore(d,a);a.MathJax.preview&&(a.MathJax.preview.innerHTML="");this.lastError=b;this.signal.Post(["Math Processing Error",a,b])},RestartAfter:function(a){throw this.Insert(Error("restart"),{restart:MathJax.Callback(a)});},elementCallback:function(a,b){if(null==b&&(a instanceof Array||"function"===typeof a))try{MathJax.Callback(a),b=a,a=null}catch(e){}null==a&&(a=this.config.elements||[]);a instanceof Array||(a=[a]);a=[].concat(a);for(var c=0,d=a.length;c<d;c++)"string"===typeof a[c]&&(a[c]=document.getElementById(a[c]));document.body||(document.body=document.getElementsByTagName("body")[0]);0==a.length&&a.push(document.body);b||(b={});return{elements:a,callback:b}},elementScripts:function(a){"string"===typeof a&&(a=document.getElementById(a));document.body||(document.body=document.getElementsByTagName("body")[0]);null==a&&(a=document.body);return null!=a.tagName&&"script"===a.tagName.toLowerCase()?[a]:a.getElementsByTagName("script")},Insert:function(a,b){for(var c in b)b.hasOwnProperty(c)&&("object"!==typeof b[c]||b[c]instanceof Array||"object"!==typeof a[c]&&"function"!==typeof a[c]?a[c]=b[c]:this.Insert(a[c],b[c]));return a},SplitList:"trim"in String.prototype?function(a){return a.trim().split(/\s+/)}:function(a){return a.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/)}},MathJax.Hub.Insert(MathJax.Hub.config.styles,MathJax.Message.styles),MathJax.Hub.Insert(MathJax.Hub.config.styles,{".MathJax_Error":MathJax.Hub.config.errorSettings.style}),MathJax.Extension={},MathJax.Hub.Configured=MathJax.Callback({}),MathJax.Hub.Startup={script:"",queue:MathJax.Callback.Queue(),signal:MathJax.Callback.Signal("Startup"),params:{},Config:function(){this.queue.Push(["Post",this.signal,"Begin Config"]);this.params.locale&&(MathJax.Localization.locale=this.params.locale,MathJax.Hub.config.menuSettings.locale=this.params.locale);var a=MathJax.HTML.Cookie.Get("user");if(a.URL||a.Config)confirm(MathJax.Localization._("CookieConfig","MathJax has found a user-configuration cookie that includes code to be run. Do you want to run it?\n\n(You should press Cancel unless you set up the cookie yourself.)"))?(a.URL&&this.queue.Push(["Require",MathJax.Ajax,a.URL]),a.Config&&this.queue.Push(new Function(a.Config))):MathJax.HTML.Cookie.Set("user",{});if(this.params.config)for(var a=this.params.config.split(/,/),b=0,c=a.length;b<c;b++)a[b].match(/\.js$/)||(a[b]+=".js"),this.queue.Push(["Require",MathJax.Ajax,this.URL("config",a[b])]);this.script.match(/\S/)&&this.queue.Push(this.script+";\n1;");this.queue.Push(["ConfigDelay",this],["ConfigBlocks",this],[function(a){return a.loadArray(MathJax.Hub.config.config,"config",null,!0)},this],["Post",this.signal,"End Config"])},ConfigDelay:function(){var a=this.params.delayStartupUntil||MathJax.Hub.config.delayStartupUntil;return"onload"===a?this.onload:"configured"===a?MathJax.Hub.Configured:a},ConfigBlocks:function(){for(var a=document.getElementsByTagName("script"),b=null,c=MathJax.Callback.Queue(),d=0,e=a.length;d<e;d++){var f=String(a[d].type).replace(/ /g,"");f.match(/^text\/x-mathjax-config(;.*)?$/)&&!f.match(/;executed=true/)&&(a[d].type+=";executed\x3dtrue",b=c.Push(a[d].innerHTML+";\n1;"))}return b},Cookie:function(){return this.queue.Push(["Post",this.signal,"Begin Cookie"],["Get",MathJax.HTML.Cookie,"menu",MathJax.Hub.config.menuSettings],[function(a){a.menuSettings.locale&&(MathJax.Localization.locale=a.menuSettings.locale);var b=a.menuSettings.renderer;a=a.jax;if(b){b="output/"+b;a.sort();for(var c=0,d=a.length;c<d&&"output/"!==a[c].substr(0,7);c++);if(c==d-1)a.pop();else for(;c<d;){if(a[c]===b){a.splice(c,1);break}c++}a.unshift(b)}},MathJax.Hub.config],["Post",this.signal,"End Cookie"])},Styles:function(){return this.queue.Push(["Post",this.signal,"Begin Styles"],["loadArray",this,MathJax.Hub.config.styleSheets,"config"],["Styles",MathJax.Ajax,MathJax.Hub.config.styles],["Post",this.signal,"End Styles"])},Jax:function(){for(var a=MathJax.Hub.config,b=MathJax.Hub.outputJax,c=0,d=a.jax.length,e=0;c<d;c++){var f=a.jax[c].substr(7);"output/"===a.jax[c].substr(0,7)&&null==b.order[f]&&(b.order[f]=e,e++)}return MathJax.Callback.Queue().Push(["Post",this.signal,"Begin Jax"],["loadArray",this,a.jax,"jax","config.js"],["Post",this.signal,"End Jax"])},Extensions:function(){return MathJax.Callback.Queue().Push(["Post",this.signal,"Begin Extensions"],["loadArray",this,MathJax.Hub.config.extensions,"extensions"],["Post",this.signal,"End Extensions"])},Message:function(){MathJax.Message.Init(!0)},Menu:function(){var a=MathJax.Hub.config.menuSettings,b=MathJax.Hub.outputJax,c,d;for(d in b)if(b.hasOwnProperty(d)&&b[d].length){c=b[d];break}c&&c.length&&(a.renderer&&a.renderer!==c[0].id&&c.unshift(MathJax.OutputJax[a.renderer]),a.renderer=c[0].id)},Hash:function(){if(MathJax.Hub.config.positionToHash&&document.location.hash&&document.body&&document.body.scrollIntoView){var a=document.location.hash.substr(1),b=document.getElementById(a);if(!b)for(var c=document.getElementsByTagName("a"),d=0,e=c.length;d<e;d++)if(c[d].name===a){b=c[d];break}if(b){for(;!b.scrollIntoView;)b=b.parentNode;(b=this.HashCheck(b))&&b.scrollIntoView&&setTimeout(function(){b.scrollIntoView(!0)},1)}}},HashCheck:function(a){if(a.isMathJax){var b=MathJax.Hub.getJaxFor(a);b&&MathJax.OutputJax[b.outputJax].hashCheck&&(a=MathJax.OutputJax[b.outputJax].hashCheck(a))}return a},MenuZoom:function(){MathJax.Extension.MathMenu?setTimeout(MathJax.Callback(["loadDomain",MathJax.Localization,"MathMenu"]),1E3):setTimeout(function(){MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/MathMenu.js",{}],["loadDomain",MathJax.Localization,"MathMenu"])},1E3);MathJax.Extension.MathZoom||setTimeout(MathJax.Callback(["Require",MathJax.Ajax,"[MathJax]/extensions/MathZoom.js",{}]),2E3)},onLoad:function(){var a=this.onload=MathJax.Callback(function(){MathJax.Hub.Startup.signal.Post("onLoad")});if(document.body&&document.readyState)if(MathJax.Hub.Browser.isMSIE){if("complete"===document.readyState)return[a]}else if("loading"!==document.readyState)return[a];window.addEventListener?(window.addEventListener("load",a,!1),this.params.noDOMContentEvent||window.addEventListener("DOMContentLoaded",a,!1)):window.attachEvent?window.attachEvent("onload",a):window.onload=a;return a},Typeset:function(a,b){return MathJax.Hub.config.skipStartupTypeset?function(){}:this.queue.Push(["Post",this.signal,"Begin Typeset"],["Typeset",MathJax.Hub,a,b],["Post",this.signal,"End Typeset"])},URL:function(a,b){b.match(/^([a-z]+:\/\/|\[|\/)/)||(b="[MathJax]/"+a+"/"+b);return b},loadArray:function(a,b,c,d){if(a&&(a instanceof Array||(a=[a]),a.length)){for(var e=MathJax.Callback.Queue(),f={},g,h=0,l=a.length;h<l;h++)g=this.URL(b,a[h]),c&&(g+="/"+c),d?e.Push(["Require",MathJax.Ajax,g,f]):e.Push(MathJax.Ajax.Require(g,f));return e.Push({})}return null}},function(a){var b=window[a];a="["+a+"]";var c=b.Hub,d=b.Ajax,e=b.Callback,f=MathJax.Object.Subclass({JAXFILE:"jax.js",require:null,config:{},Init:function(a,b){return 0===arguments.length?this:this.constructor.Subclass(a,b)()},Augment:function(a,b){var d=this.constructor,e={};if(null!=a){for(var f in a)a.hasOwnProperty(f)&&("function"===typeof a[f]?d.protoFunction(f,a[f]):e[f]=a[f]);a.toString!==d.prototype.toString&&a.toString!=={}.toString&&d.protoFunction("toString",a.toString)}c.Insert(d.prototype,e);d.Augment(null,b);return this},Translate:function(a,b){throw Error(this.directory+"/"+this.JAXFILE+" failed to define the Translate() method");},Register:function(a){},Config:function(){this.config=c.CombineConfig(this.id,this.config);this.config.Augment&&this.Augment(this.config.Augment)},Startup:function(){},loadComplete:function(a){if("config.js"===a)return d.loadComplete(this.directory+"/"+a);var b=e.Queue();b.Push(c.Register.StartupHook("End Config",{}),["Post",c.Startup.signal,this.id+" Jax Config"],["Config",this],["Post",c.Startup.signal,this.id+" Jax Require"],[function(a){return MathJax.Hub.Startup.loadArray(a.require,this.directory)},this],[function(a,b){return MathJax.Hub.Startup.loadArray(a.extensions,"extensions/"+b)},this.config||{},this.id],["Post",c.Startup.signal,this.id+" Jax Startup"],["Startup",this],["Post",c.Startup.signal,this.id+" Jax Ready"]);this.copyTranslate&&b.Push([function(a){a.preProcess=a.preTranslate;a.Process=a.Translate;a.postProcess=a.postTranslate},this.constructor.prototype]);return b.Push(["loadComplete",d,this.directory+"/"+a])}},{id:"Jax",version:"2.2",directory:a+"/jax",extensionDir:a+"/extensions"});b.InputJax=f.Subclass({elementJax:"mml",sourceMenuTitle:["OriginalForm","Original Form"],copyTranslate:!0,Process:function(a,f){var l=e.Queue(),m,k=this.elementJax;k instanceof Array||(k=[k]);for(var n=0,p=k.length;n<p;n++)m=b.ElementJax.directory+"/"+k[n]+"/"+this.JAXFILE,this.require?this.require instanceof Array||(this.require=[this.require]):this.require=[],this.require.push(m),l.Push(d.Require(m));m=this.directory+"/"+this.JAXFILE;var q=l.Push(d.Require(m));q.called||(this.constructor.prototype.Process=function(){if(!q.called)return q;throw Error(m+" failed to load properly");});(k=c.outputJax["jax/"+k[0]])&&l.Push(d.Require(k[0].directory+"/"+this.JAXFILE));return l.Push({})},needsUpdate:function(a){var c=a.SourceElement();return a.originalText!==b.HTML.getScript(c)},Register:function(a){c.inputJax||(c.inputJax={});c.inputJax[a]=this}},{id:"InputJax",version:"2.2",directory:f.directory+"/input",extensionDir:f.extensionDir});b.OutputJax=f.Subclass({copyTranslate:!0,preProcess:function(a){var b,c=this.directory+"/"+this.JAXFILE;this.constructor.prototype.preProcess=function(a){if(!b.called)return b;throw Error(c+" failed to load properly");};return b=d.Require(c)},Register:function(a){var d=c.outputJax;d[a]||(d[a]=[]);d[a].length&&(this.id===c.config.menuSettings.renderer||(d.order[this.id]||0)<(d.order[d[a][0].id]||0))?d[a].unshift(this):d[a].push(this);this.require?this.require instanceof Array||(this.require=[this.require]):this.require=[];this.require.push(b.ElementJax.directory+"/"+a.split(/\//)[1]+"/"+this.JAXFILE)},Remove:function(a){}},{id:"OutputJax",version:"2.2",directory:f.directory+"/output",extensionDir:f.extensionDir,fontDir:a+(b.isPacked?"":"/..")+"/fonts",imageDir:a+(b.isPacked?"":"/..")+"/images"});b.ElementJax=f.Subclass({Init:function(a,b){return this.constructor.Subclass(a,b)},inputJax:null,outputJax:null,inputID:null,originalText:"",mimeType:"",sourceMenuTitle:["MathMLcode","MathML Code"],Text:function(a,d){var e=this.SourceElement();b.HTML.setScript(e,a);e.MathJax.state=this.STATE.UPDATE;return c.Update(e,d)},Reprocess:function(a){var b=this.SourceElement();b.MathJax.state=this.STATE.UPDATE;return c.Reprocess(b,a)},Update:function(a){return this.Rerender(a)},Rerender:function(a){var b=this.SourceElement();b.MathJax.state=this.STATE.OUTPUT;return c.Process(b,a)},Remove:function(a){this.hover&&this.hover.clear(this);b.OutputJax[this.outputJax].Remove(this);a||(c.signal.Post(["Remove Math",this.inputID]),this.Detach())},needsUpdate:function(){return b.InputJax[this.inputJax].needsUpdate(this)},SourceElement:function(){return document.getElementById(this.inputID)},Attach:function(a,c){var d=a.MathJax.elementJax;a.MathJax.state===this.STATE.UPDATE?d.Clone(this):(d=a.MathJax.elementJax=this,a.id?this.inputID=a.id:(a.id=this.inputID=b.ElementJax.GetID(),this.newID=1));d.originalText=b.HTML.getScript(a);d.inputJax=c;d.root&&(d.root.inputID=d.inputID);return d},Detach:function(){var a=this.SourceElement();if(a){try{delete a.MathJax}catch(b){a.MathJax=null}this.newID&&(a.id="")}},Clone:function(a){for(var b in this)this.hasOwnProperty(b)&&"undefined"===typeof a[b]&&"newID"!==b&&delete this[b];for(b in a)a.hasOwnProperty(b)&&("undefined"===typeof this[b]||this[b]!==a[b]&&"inputID"!==b)&&(this[b]=a[b])}},{id:"ElementJax",version:"2.2",directory:f.directory+"/element",extensionDir:f.extensionDir,ID:0,STATE:{PENDING:1,PROCESSED:2,UPDATE:3,OUTPUT:4},GetID:function(){this.ID++;return"MathJax-Element-"+this.ID},Subclass:function(){var a=f.Subclass.apply(this,arguments);a.loadComplete=this.prototype.loadComplete;return a}});b.ElementJax.prototype.STATE=b.ElementJax.STATE;b.OutputJax.Error={id:"Error",version:"2.2",config:{},ContextMenu:function(){return b.Extension.MathEvents.Event.ContextMenu.apply(b.Extension.MathEvents.Event,arguments)},Mousedown:function(){return b.Extension.MathEvents.Event.AltContextMenu.apply(b.Extension.MathEvents.Event,arguments)},getJaxFromMath:function(a){return(a.nextSibling.MathJax||{}).error},Jax:function(a,b){return{inputJax:(MathJax.Hub.inputJax[b.type.replace(/ *;(.|\s)*/,"")]||{id:"Error"}).id,outputJax:"Error",sourceMenuTitle:["ErrorMessage","Error Message"],sourceMenuFormat:"Error",originalText:MathJax.HTML.getScript(b),errorText:a}}};b.InputJax.Error={id:"Error",version:"2.2",config:{},sourceMenuTitle:["OriginalForm","Original Form"]}}("MathJax"),function(a){var b=window[a];b||(b=window[a]={});var c=b.Hub,d=c.Startup,e=c.config,f=document.getElementsByTagName("head")[0];f||(f=document.childNodes[0]);var f=(document.documentElement||document).getElementsByTagName("script"),g=new RegExp("(^|/)"+a+"\\.js(\\?.*)?$");for(a=f.length-1;0<=a;a--)if((f[a].src||"").match(g)){d.script=f[a].innerHTML;if(RegExp.$2)for(var g=RegExp.$2.substr(1).split(/\&/),h=0,l=g.length;h<l;h++){var m=g[h].match(/(.*)=(.*)/);m&&(d.params[unescape(m[1])]=unescape(m[2]))}e.root=f[a].src.replace(/(^|\/)[^\/]*(\?.*)?$/,"");break}b.Ajax.config=e;e={isMac:"Mac"===navigator.platform.substr(0,3),isPC:"Win"===navigator.platform.substr(0,3),isMSIE:null!=window.ActiveXObject&&null!=window.clipboardData,isFirefox:null!=navigator.userAgent.match(/Gecko/)&&null==navigator.userAgent.match(/KHTML/),isSafari:null!=navigator.userAgent.match(/ (Apple)?WebKit\//)&&(!window.chrome||null==window.chrome.loadTimes),isChrome:null!=window.chrome&&null!=window.chrome.loadTimes,isOpera:null!=window.opera&&null!=window.opera.version,isKonqueror:window.hasOwnProperty&&window.hasOwnProperty("konqueror")&&"KDE"==navigator.vendor,versionAtLeast:function(a){var b=this.version.split(".");a=(new String(a)).split(".");for(var c=0,d=a.length;c<d;c++)if(b[c]!=a[c])return parseInt(b[c]||"0")>=parseInt(a[c]);return!0},Select:function(a){return(a=a[c.Browser])?a(c.Browser):null}};f=navigator.userAgent.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");c.Browser=c.Insert(c.Insert(new String("Unknown"),{version:"0.0"}),e);for(var k in e)if(e.hasOwnProperty(k)&&e[k]&&"is"===k.substr(0,2)&&(k=k.slice(2),"Mac"!==k&&"PC"!==k)){c.Browser=c.Insert(new String(k),e);e=(new RegExp(".*(Version)/((?:\\d+\\.)+\\d+)|.*("+k+")"+("MSIE"==k?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)")).exec(f)||["","","","unknown","0.0"];c.Browser.name="Version"==e[1]?k:e[3]||e[5];c.Browser.version=e[2]||e[4]||e[6];break}c.Browser.Select({Safari:function(a){var b=parseInt(String(a.version).split(".")[0]);85<b&&(a.webkit=a.version);534<=b?a.version="5.1":533<=b?a.version="5.0":526<=b?a.version="4.0":525<=b?a.version="3.1":500<b?a.version="3.0":400<b?a.version="2.0":85<b&&(a.version="1.0");a.isMobile=null!=navigator.appVersion.match(/Mobile/i);a.noContextMenu=a.isMobile},Firefox:function(a){if(("0.0"===a.version||null==navigator.userAgent.match(/Firefox/))&&"Gecko"===navigator.product){var b=navigator.userAgent.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);b?a.version=b[1]:(b=(navigator.buildID||navigator.productSub||"0").substr(0,8),"20111220"<=b?a.version="9.0":"20111120"<=b?a.version="8.0":"20110927"<=b?a.version="7.0":"20110816"<=b?a.version="6.0":"20110621"<=b?a.version="5.0":"20110320"<=b?a.version="4.0":"20100121"<=b?a.version="3.6":"20090630"<=b?a.version="3.5":"20080617"<=b?a.version="3.0":"20061024"<=b&&(a.version="2.0"))}a.isMobile=null!=navigator.appVersion.match(/Android/i)||null!=navigator.userAgent.match(/ Fennec\//)||null!=navigator.userAgent.match(/Mobile/)},Opera:function(a){a.version=opera.version()},MSIE:function(a){a.isIE9=!(!document.documentMode||!window.performance&&!window.msPerformance);MathJax.HTML.setScriptBug=!a.isIE9||9>document.documentMode;var b=!1;try{new ActiveXObject("MathPlayer.Factory.1"),a.hasMathPlayer=b=!0}catch(c){}try{if(b&&!d.params.NoMathPlayer){var e=document.createElement("object");e.id="mathplayer";e.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";document.getElementsByTagName("head")[0].appendChild(e);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");a.mpNamespace=!0;!document.readyState||"loading"!==document.readyState&&"interactive"!==document.readyState||(document.write('\x3c?import namespace\x3d"m" implementation\x3d"#MathPlayer"\x3e'),a.mpImported=!0)}else document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink")}catch(c){}}});c.Browser.Select(MathJax.Message.browsers);c.queue=b.Callback.Queue();c.queue.Push(["Post",d.signal,"Begin"],["Config",d],["Cookie",d],["Styles",d],["Message",d],function(){return b.Callback.Queue(d.Jax(),d.Extensions()).Push({})},["Menu",d],d.onLoad(),function(){MathJax.isReady=!0},["Typeset",d],["Hash",d],["MenuZoom",d],["Post",d.signal,"End"])}("MathJax")));