/*
* /MathJax/jax/output/HTML-CSS/jax.js
*
* Copyright (c) 2012 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
(function(g,b,d){var f,h=b.Browser.isMobile;var e=MathJax.Object.Subclass({timeout:(h?15:8)*1000,FontInfo:{STIX:{family:"STIXSizeOneSym",testString:"() {} []"},TeX:{family:"MathJax_Size1",testString:"() {} []"}},comparisonFont:["sans-serif","monospace","script","Times","Courier","Arial","Helvetica"],testSize:["40px","50px","60px","30px","20px"],Init:function(){this.div=MathJax.HTML.addElement(document.body,"div",{id:"MathJax_Font_Test",style:{position:"absolute",visibility:"hidden",top:0,left:0,width:"auto",padding:0,border:0,margin:0,whiteSpace:"nowrap",textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal",fontSize:this.testSize[0],fontWeight:"normal",fontStyle:"normal",fontSizeAdjust:"none"}},[""]);this.text=this.div.firstChild},findFont:function(n,k){if(k&&this.testCollection(k)){return k}for(var l=0,j=n.length;l=o.HTMLCSSlast+o.HTMLCSSchunk){this.postTranslate(o);o.HTMLCSSchunk=Math.floor(o.HTMLCSSchunk*this.config.EqnChunkFactor);o.HTMLCSSdelay=true}}},postTranslate:function(q){var k=q.jax[this.id];if(!this.hideProcessedMath){return}for(var o=q.HTMLCSSlast,j=q.HTMLCSSeqn;o=0&&!this.initialSkipBug)||this.negativeBBoxes||!n.firstChild){k=n.offsetWidth;m=n.parentNode.offsetHeight}else{if(n.bbox&&l<0&&this.msieNegativeBBoxBug){k=-n.offsetWidth,m=n.parentNode.offsetHeight}else{if(this.initialSkipBug){var j=n.style.position;n.style.position="absolute";o=this.startMarker;n.insertBefore(o,n.firstChild)}n.appendChild(this.endMarker);k=this.endMarker.offsetLeft-o.offsetLeft;n.removeChild(this.endMarker);if(this.initialSkipBug){n.removeChild(o);n.style.position=j}}}if(m!=null){n.parentNode.HH=m/this.em}return k/this.em},Measured:function(l,k){var m=l.bbox;if(m.width==null&&m.w&&!m.isMultiline){var j=this.getW(l);m.rw+=j-m.w;m.w=j;m.exactW=true}if(!k){k=l.parentNode}if(!k.bbox){k.bbox=m}return l},Remeasured:function(k,j){j.bbox=this.Measured(k,j).bbox},MeasureSpans:function(n){var q=[],s,p,l,t,j,o,k;for(p=0,l=n.length;p=0&&!this.initialSkipBug)||(t.w<0&&this.msieNegativeBBoxBug)){q.push([s])}else{if(this.initialSkipBug){j=this.startMarker.cloneNode(true);o=this.endMarker.cloneNode(true);s.insertBefore(j,s.firstChild);s.appendChild(o);q.push([s,j,o,s.style.position]);s.style.position="absolute"}else{o=this.endMarker.cloneNode(true);s.appendChild(o);q.push([s,null,o])}}}for(p=0,l=q.length;p=0&&!this.initialSkipBug)||this.negativeBBoxes||!s.firstChild){k=s.offsetWidth;r.HH=s.parentNode.offsetHeight/this.em}else{if(t.w<0&&this.msieNegativeBBoxBug){k=-s.offsetWidth,r.HH=s.parentNode.offsetHeight/this.em}else{k=q[p][2].offsetLeft-((q[p][1]||{}).offsetLeft||0)}}k/=this.em;t.rw+=k-t.w;t.w=k;t.exactW=true;if(!r.bbox){r.bbox=t}}for(p=0,l=q.length;p=0){o.style.width=this.Em(p);o.style.display="inline-block";o.style.overflow="hidden"}else{if(this.msieNegativeSpaceBug){o.style.height=""}o.style.marginLeft=this.Em(p);if(d.safariNegativeSpaceBug&&o.parentNode.firstChild==o){this.createBlank(o,0,true)}}if(l&&l!==f.COLOR.TRANSPARENT){o.style.backgroundColor=l;o.style.position="relative"}return o},createRule:function(q,m,o,r,k){if(m<-o){o=-m}var l=d.TeX.min_rule_thickness,n=1;if(r>0&&r*this.em0&&(m+o)*this.em0&&p.offsetWidth==0){p.style.width=this.Em(r)}if(q.isBox||q.className=="mspace"){q.bbox=p.bbox,q.HH=m+o}return p},createFrame:function(r,p,q,s,v,k){if(p<-q){q=-p}var o=2*v;if(this.msieFrameSizeBug){if(sB.w){d.createBlank(s,B.rw-B.w+0.1)}}if(!this.msieClipRectBug&&!B.noclip&&!n){var A=3/this.em;var z=(B.H==null?B.h:B.H),k=(B.D==null?B.d:B.D);var C=v-z-A,o=v+k+A,m=B.lw-3*A,j=1000;if(this.initialSkipBug&&B.lw<0){m=-3*A}if(B.isFixed){j=B.width-m}s.style.clip="rect("+this.Em(C)+" "+this.Em(j)+" "+this.Em(o)+" "+this.Em(m)+")"}}s.style.top=this.Em(-p-v);s.style.left=this.Em(q+E);if(B&&w){if(B.H!=null&&(w.H==null||B.H+p>w.H)){w.H=B.H+p}if(B.D!=null&&(w.D==null||B.D-p>w.D)){w.D=B.D-p}if(B.h+p>w.h){w.h=B.h+p}if(B.d-p>w.d){w.d=B.d-p}if(w.H!=null&&w.H<=w.h){delete w.H}if(w.D!=null&&w.D<=w.d){delete w.D}if(B.w+q>w.w){w.w=B.w+q;if(w.width==null){u.style.width=this.Em(w.w)}}if(B.rw+q>w.rw){w.rw=B.rw+q}if(B.lw+q=l-0.01||(r==o-1&&!k.stretch)){if(k.HW[r][2]){p*=k.HW[r][2]}if(k.HW[r][3]){j=k.HW[r][3]}var q=this.addElement(t,"span");this.createChar(q,[j,k.HW[r][1]],p,n);t.bbox=q.bbox;t.offset=0.65*t.bbox.w;t.scale=p;return}}if(k.stretch){this["extendDelimiter"+k.dir](t,s,k.stretch,p,n)}},extendDelimiterV:function(z,s,D,E,v){var m=this.createStack(z,true);var u=this.createBox(m),t=this.createBox(m);this.createChar(u,(D.top||D.ext),E,v);this.createChar(t,(D.bot||D.ext),E,v);var l={bbox:{w:0,lw:0,rw:0}},C=l,o;var A=u.bbox.h+u.bbox.d+t.bbox.h+t.bbox.d;var q=-u.bbox.h;this.placeBox(u,0,q,true);q-=u.bbox.d;if(D.mid){C=this.createBox(m);this.createChar(C,D.mid,E,v);A+=C.bbox.h+C.bbox.d}if(D.min&&sA){l=this.Element("span");this.createChar(l,D.ext,E,v);var B=l.bbox.h+l.bbox.d,j=B-0.05,w,p,x=(D.mid?2:1);p=w=Math.ceil((s-A)/(x*j));if(!D.fullExtenders){j=(s-A)/(x*w)}var r=(w/(w+1))*(B-j);j=B-r;q+=r+j-l.bbox.h;while(x-->0){while(w-->0){if(!this.msieCloneNodeBug){o=l.cloneNode(true)}else{o=this.Element("span");this.createChar(o,D.ext,E,v)}o.bbox=l.bbox;q-=j;this.placeBox(this.addBox(m,o),0,q,true)}q+=r-l.bbox.d;if(D.mid&&x){this.placeBox(C,0,q-C.bbox.h,true);w=p;q+=-(C.bbox.h+C.bbox.d)+r+j-l.bbox.h}}}else{q+=(A-s)/2;if(D.mid){this.placeBox(C,0,q-C.bbox.h,true);q+=-(C.bbox.h+C.bbox.d)}q+=(A-s)/2}this.placeBox(t,0,q-t.bbox.h,true);q-=t.bbox.h+t.bbox.d;z.bbox={w:Math.max(u.bbox.w,l.bbox.w,t.bbox.w,C.bbox.w),lw:Math.min(u.bbox.lw,l.bbox.lw,t.bbox.lw,C.bbox.lw),rw:Math.max(u.bbox.rw,l.bbox.rw,t.bbox.rw,C.bbox.rw),h:0,d:-q,exactW:true};z.scale=E;z.offset=0.55*z.bbox.w;z.isMultiChar=true;this.setStackWidth(m,z.bbox.w)},extendDelimiterH:function(A,m,D,F,v){var q=this.createStack(A,true);var o=this.createBox(q),B=this.createBox(q);this.createChar(o,(D.left||D.rep),F,v);this.createChar(B,(D.right||D.rep),F,v);var j=this.Element("span");this.createChar(j,D.rep,F,v);var C={bbox:{h:-this.BIGDIMEN,d:-this.BIGDIMEN}},l;this.placeBox(o,-o.bbox.lw,0,true);var t=(o.bbox.rw-o.bbox.lw)+(B.bbox.rw-B.bbox.lw)-0.05,s=o.bbox.rw-o.bbox.lw-0.025,u;if(D.mid){C=this.createBox(q);this.createChar(C,D.mid,F,v);t+=C.bbox.w}if(D.min&&mt){var E=j.bbox.rw-j.bbox.lw,p=E-0.05,y,r,z=(D.mid?2:1);r=y=Math.ceil((m-t)/(z*p));if(!D.fillExtenders){p=(m-t)/(z*y)}u=(y/(y+1))*(E-p);p=E-u;s-=j.bbox.lw+u;while(z-->0){while(y-->0){if(!this.cloneNodeBug){l=j.cloneNode(true)}else{l=this.Element("span");this.createChar(l,D.rep,F,v)}l.bbox=j.bbox;this.placeBox(this.addBox(q,l),s,0,true);s+=p}if(D.mid&&z){this.placeBox(C,s,0,true);s+=C.bbox.w-u;y=r}}}else{s-=(t-m)/2;if(D.mid){this.placeBox(C,s,0,true);s+=C.bbox.w}s-=(t-m)/2}this.placeBox(B,s,0,true);A.bbox={w:s+B.bbox.rw,lw:0,rw:s+B.bbox.rw,H:Math.max(o.bbox.h,j.bbox.h,B.bbox.h,C.bbox.h),D:Math.max(o.bbox.d,j.bbox.d,B.bbox.d,C.bbox.d),h:j.bbox.h,d:j.bbox.d,exactW:true};A.scale=F;A.isMultiChar=true;this.setStackWidth(q,A.bbox.w)},createChar:function(r,o,l,j){r.isMathJax=true;var q=r,s="",n={fonts:[o[1]],noRemap:true};if(j&&j===f.VARIANT.BOLD){n.fonts=[o[1]+"-bold",o[1]]}if(typeof(o[1])!=="string"){n=o[1]}if(o[0] instanceof Array){for(var p=0,k=o[0].length;p=55296&&w<56319){A++;w=(((w-55296)<<10)+(r.charCodeAt(A)-56320))+65536;if(this.FONTDATA.RemapPlane1){var D=this.FONTDATA.RemapPlane1(w,o);w=D.n;o=D.variant}}else{var t,q,u=this.FONTDATA.RANGES;for(t=0,q=u.length;t=u[t].low&&w<=u[t].high){if(u[t].remap&&u[t].remap[w]){w=p+u[t].remap[w]}else{w=w-u[t].low+p;if(u[t].add){w+=u[t].add}}if(o["variant"+u[t].offset]){o=this.FONTDATA.VARIANT[o["variant"+u[t].offset]]}break}}}if(o.remap&&o.remap[w]){if(o.remap[w] instanceof Array){var l=o.remap[w];w=l[0];o=this.FONTDATA.VARIANT[l[1]]}else{if(typeof(o.remap[w])==="string"){r=o.remap[w]+r.substr(A+1);A=0;x=r.length;w=r.charCodeAt(0)}else{w=o.remap[w];if(o.remap.variant){o=this.FONTDATA.VARIANT[o.remap.variant]}}}}if(this.FONTDATA.REMAP[w]&&!o.noRemap){w=this.FONTDATA.REMAP[w];if(w instanceof Array){o=this.FONTDATA.VARIANT[w[1]];w=w[0]}if(typeof(w)==="string"){r=w+r.substr(A+1);A=0;x=r.length;w=w.charCodeAt(0)}}s=this.lookupChar(o,w);B=s[w];if(k||(!this.checkFont(s,j.style)&&!B[5].img)){if(y.length){this.addText(j,y);y=""}var v=!!j.style.fontFamily||!!z.style.fontStyle||!!z.style.fontWeight||!s.directory||k;k=false;if(j!==z){v=!this.checkFont(s,z.style);j=z}if(v){j=this.addElement(z,"span",{isMathJax:true,subSpan:true})}this.handleFont(j,s,j!==z)}y=this.handleChar(j,s,B,w,y);if(!(B[5]||{}).space){if(B[0]/1000>z.bbox.h){z.bbox.h=B[0]/1000}if(B[1]/1000>z.bbox.d){z.bbox.d=B[1]/1000}}if(z.bbox.w+B[3]/1000z.bbox.rw){z.bbox.rw=z.bbox.w+B[4]/1000}z.bbox.w+=B[2]/1000}if(y.length){this.addText(j,y)}if(z.scale&&z.scale!==1){z.bbox.h*=z.scale;z.bbox.d*=z.scale;z.bbox.w*=z.scale;z.bbox.lw*=z.scale;z.bbox.rw*=z.scale}if(r.length==1&&s.skew&&s.skew[w]){z.bbox.skew=s.skew[w]}},checkFont:function(j,k){var l=(k.fontWeight||"normal");if(l.match(/^\d+$/)){l=(parseInt(l)>=600?"bold":"normal")}return(j.family.replace(/'/g,"")===k.fontFamily.replace(/'/g,"")&&(j.style||"normal")===(k.fontStyle||"normal")&&(j.weight||"normal")===l)},handleFont:function(l,j,n){l.style.fontFamily=j.family;if(!j.directory){l.style.fontSize=Math.floor(100/d.scale+0.5)+"%"}if(!(d.FontFaceBug&&j.isWebFont)){var k=j.style||"normal",m=j.weight||"normal";if(k!=="normal"||n){l.style.fontStyle=k}if(m!=="normal"||n){l.style.fontWeight=m}}},handleChar:function(k,j,r,q,p){var o=r[5];if(o.space){if(p.length){this.addText(k,p)}d.createShift(k,r[2]/1000);return""}if(o.img){return this.handleImg(k,j,r,q,p)}if(o.isUnknown&&this.FONTDATA.DELIMITERS[q]){if(p.length){this.addText(k,p)}var m=k.scale;d.createDelimiter(k,q,0,1,j);if(this.FONTDATA.DELIMITERS[q].dir==="V"){k.style.verticalAlign=this.Em(k.bbox.d);k.bbox.h+=k.bbox.d;k.bbox.d=0}k.scale=m;r[0]=k.bbox.h*1000;r[1]=k.bbox.d*1000;r[2]=k.bbox.w*1000;r[3]=k.bbox.lw*1000;r[4]=k.bbox.rw*1000;return""}if(o.c==null){if(q<=65535){o.c=String.fromCharCode(q)}else{var l=q-65536;o.c=String.fromCharCode((l>>10)+55296)+String.fromCharCode((l&1023)+56320)}}if(o.rfix){this.addText(k,p+o.c);d.createShift(k,o.rfix/1000);return""}if(r[2]||!this.msieAccentBug||p.length){return p+o.c}d.createShift(k,r[3]/1000);d.createShift(k,(r[4]-r[3])/1000);this.addText(k,o.c);d.createShift(k,-r[4]/1000);return""},handleImg:function(k,j,o,m,l){return l},lookupChar:function(o,r){var l,j;if(!o.FONTS){var q=this.FONTDATA.FONTS;var p=(o.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(p instanceof Array)){p=[p]}if(o.fonts!=p){o.fonts=p}o.FONTS=[];for(l=0,j=p.length;l=0;n--){if(l.Ranges[n][2]==o){l.Ranges.splice(n,1)}}this.loadFont(l.directory+"/"+o+".js")}}}},loadFont:function(k){var j=MathJax.Callback.Queue();j.Push(["Require",g,this.fontDir+"/"+k]);if(this.imgFonts){if(!MathJax.isPacked){k=k.replace(/\/([^\/]*)$/,d.imgPacked+"/$1")}j.Push(["Require",g,this.webfontDir+"/png/"+k])}b.RestartAfter(j.Push({}))},loadWebFont:function(j){j.available=j.isWebFont=true;if(d.FontFaceBug){j.family=j.name;if(d.msieFontCSSBug){j.family+="-Web"}}b.RestartAfter(this.Font.loadWebFont(j))},loadWebFontError:function(k,j){b.Startup.signal.Post("HTML-CSS Jax - disable web fonts");k.isWebFont=false;if(this.config.imageFont&&this.config.imageFont===this.fontInUse){this.imgFonts=true;b.Startup.signal.Post("HTML-CSS Jax - switch to image fonts");b.Startup.signal.Post("HTML-CSS Jax - using image fonts");MathJax.Message.Set("Web-Fonts not available -- using image fonts instead",null,3000);g.Require(this.directory+"/imageFonts.js",j)}else{this.allowWebFonts=false;j()}},Element:MathJax.HTML.Element,addElement:MathJax.HTML.addElement,TextNode:MathJax.HTML.TextNode,addText:MathJax.HTML.addText,ucMatch:MathJax.HTML.ucMatch,BIGDIMEN:10000000,ID:0,idPostfix:"",GetID:function(){this.ID++;return this.ID},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:0.430554,quad:1,num1:0.676508,num2:0.393732,num3:0.44373,denom1:0.685951,denom2:0.344841,sup1:0.412892,sup2:0.362892,sup3:0.288888,sub1:0.15,sub2:0.247217,sup_drop:0.386108,sub_drop:0.05,delim1:2.39,delim2:1,axis_height:0.25,rule_thickness:0.06,big_op_spacing1:0.111111,big_op_spacing2:0.166666,big_op_spacing3:0.2,big_op_spacing4:0.6,big_op_spacing5:0.1,scriptspace:0.1,nulldelimiterspace:0.12,delimiterfactor:901,delimitershortfall:0.1,min_rule_thickness:1.25},NBSP:"\u00A0",rfuzz:0});MathJax.Hub.Register.StartupHook("mml Jax Ready",function(){f=MathJax.ElementJax.mml;f.mbase.Augment({toHTML:function(n){n=this.HTMLcreateSpan(n);if(this.type!="mrow"){n=this.HTMLhandleSize(n)}for(var k=0,j=this.data.length;kk.d){k.d=l.d}if(l.h>k.h){k.h=l.h}if(l.D!=null&&l.D>k.D){k.D=l.D}if(l.H!=null&&l.H>k.H){k.H=l.H}if(m.style.paddingLeft){k.w+=d.unEm(m.style.paddingLeft)*(m.scale||1)}if(k.w+l.lwk.rw){k.rw=k.w+l.rw}k.w+=l.w;if(m.style.paddingRight){k.w+=d.unEm(m.style.paddingRight)*(m.scale||1)}if(l.width){k.width=l.width}if(l.ic){k.ic=l.ic}else{delete k.ic}if(k.exactW&&!l.exactW){delete k.exactW}},HTMLemptyBBox:function(j){j.h=j.d=j.H=j.D=j.rw=-d.BIGDIMEN;j.w=0;j.lw=d.BIGDIMEN;return j},HTMLcleanBBox:function(j){if(j.h===this.BIGDIMEN){j.h=j.d=j.H=j.D=j.w=j.rw=j.lw=0}if(j.D<=j.d){delete j.D}if(j.H<=j.h){delete j.H}},HTMLzeroBBox:function(){return{h:0,d:0,w:0,lw:0,rw:0}},HTMLcanStretch:function(k){if(this.isEmbellished()){var j=this.Core();if(j&&j!==this){return j.HTMLcanStretch(k)}}return false},HTMLstretchH:function(k,j){return this.HTMLspanElement()},HTMLstretchV:function(k,j,l){return this.HTMLspanElement()},HTMLnotEmpty:function(j){while(j){if((j.type!=="mrow"&&j.type!=="texatom")||j.data.length>1){return true}j=j.data[0]}return false},HTMLmeasureChild:function(k,j){if(this.data[k]){d.Measured(this.data[k].toHTML(j),j)}else{j.bbox=this.HTMLzeroBBox()}},HTMLboxChild:function(k,j){if(this.data[k]){return this.data[k].toHTML(j)}if(!j.bbox){j.bbox=this.HTMLzeroBBox()}return null},HTMLcreateSpan:function(j){if(this.spanID){var k=this.HTMLspanElement();if(k&&(k.parentNode===j||(k.parentNode||{}).parentNode===j)){while(k.firstChild){k.removeChild(k.firstChild)}k.bbox={w:0,h:0,d:0,lw:0,rw:0};k.scale=1;k.isMultChar=k.HH=null;k.style.cssText="";return k}}if(this.href){j=d.addElement(j,"a",{href:this.href,isMathJax:true})}j=d.addElement(j,"span",{className:this.type,isMathJax:true});if(d.imgHeightBug){j.style.display="inline-block"}if(this["class"]){j.className+=" "+this["class"]}if(!this.spanID){this.spanID=d.GetID()}j.id=(this.id||"MathJax-Span-"+this.spanID)+d.idPostfix;j.bbox={w:0,h:0,d:0,lw:0,rw:0};this.styles={};if(this.style){j.style.cssText=this.style;if(j.style.fontSize){this.mathsize=j.style.fontSize;j.style.fontSize=""}this.styles={border:d.getBorders(j),padding:d.getPadding(j)};if(this.styles.border){j.style.border=""}if(this.styles.padding){j.style.padding=""}}if(this.href){j.parentNode.bbox=j.bbox}return j},HTMLspanElement:function(){if(!this.spanID){return null}return document.getElementById((this.id||"MathJax-Span-"+this.spanID)+d.idPostfix)},HTMLhandleVariant:function(k,j,l){d.handleVariant(k,j,l)},HTMLhandleSize:function(j){if(!j.scale){j.scale=this.HTMLgetScale();if(j.scale!==1){j.style.fontSize=d.Percent(j.scale)}}return j},HTMLhandleColor:function(v){var x=this.getValues("mathcolor","color");if(this.mathbackground){x.mathbackground=this.mathbackground}if(this.background){x.background=this.background}if(this.style&&v.style.backgroundColor){x.mathbackground=v.style.backgroundColor;v.style.backgroundColor="transparent"}var s=(this.styles||{}).border,u=(this.styles||{}).padding;if(x.color&&!this.mathcolor){x.mathcolor=x.color}if(x.background&&!this.mathbackground){x.mathbackground=x.background}if(x.mathcolor){v.style.color=x.mathcolor}if((x.mathbackground&&x.mathbackground!==f.COLOR.TRANSPARENT)||s||u){var z=v.bbox,y=(z.exact?0:1/d.em),t=0,r=0,l=v.style.paddingLeft,p=v.style.paddingRight;if(this.isToken){t=z.lw;r=z.rw-z.w}if(l!==""){t+=d.unEm(l)*(v.scale||1)}if(p!==""){r-=d.unEm(p)*(v.scale||1)}var k=(d.PaddingWidthBug||z.keepPadding||z.exactW?0:r-t);var n=Math.max(0,d.getW(v)+k);var w=z.h+z.d,j=-z.d,q=0,o=0;if(n>0){n+=2*y;t-=y}if(w>0){w+=2*y;j-=y}r=-n-t;if(s){r-=s.right;j-=s.bottom;q+=s.left;o+=s.right;z.h+=s.top;z.d+=s.bottom;z.w+=s.left+s.right;z.lw-=s.left;z.rw+=s.right}if(u){w+=u.top+u.bottom;n+=u.left+u.right;r-=u.right;j-=u.bottom;q+=u.left;o+=u.right;z.h+=u.top;z.d+=u.bottom;z.w+=u.left+u.right;z.lw-=u.left;z.rw+=u.right}if(o){v.style.paddingRight=d.Em(o)}var m=d.Element("span",{id:"MathJax-Color-"+this.spanID+d.idPostfix,isMathJax:true,style:{display:"inline-block",backgroundColor:x.mathbackground,width:d.Em(n),height:d.Em(w),verticalAlign:d.Em(j),marginLeft:d.Em(t),marginRight:d.Em(r)}});d.setBorders(m,s);if(z.width){m.style.width=z.width;m.style.marginRight="-"+z.width}if(d.msieInlineBlockAlignBug){m.style.position="relative";m.style.width=m.style.height=0;m.style.verticalAlign=m.style.marginLeft=m.style.marginRight="";m.style.border=m.style.padding="";if(s&&d.msieBorderWidthBug){w+=s.top+s.bottom;n+=s.left+s.right}m.style.width=d.Em(q+y);d.placeBox(d.addElement(m,"span",{noAdjust:true,isMathJax:true,style:{display:"inline-block",position:"absolute",overflow:"hidden",background:(x.mathbackground||"transparent"),width:d.Em(n),height:d.Em(w)}}),t,z.h+y);d.setBorders(m.firstChild,s)}v.parentNode.insertBefore(m,v);if(d.msieColorPositionBug){v.style.position="relative"}return m}return null},HTMLremoveColor:function(){var j=document.getElementById("MathJax-Color-"+this.spanID+d.idPostfix);if(j){j.parentNode.removeChild(j)}},HTMLhandleSpace:function(n){if(this.useMMLspacing){if(this.type!=="mo"){return}var l=this.getValues("scriptlevel","lspace","rspace");if(l.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var k=this.HTMLgetMu(n);l.lspace=Math.max(0,d.length2em(l.lspace,k));l.rspace=Math.max(0,d.length2em(l.rspace,k));var j=this,m=this.Parent();while(m&&m.isEmbellished()&&m.Core()===j){j=m;m=m.Parent();n=j.HTMLspanElement()}if(l.lspace){n.style.paddingLeft=d.Em(l.lspace)}if(l.rspace){n.style.paddingRight=d.Em(l.rspace)}}}else{var o=this.texSpacing();if(o!==""){o=d.length2em(o,this.HTMLgetScale())/(n.scale||1);if(n.style.paddingLeft){o+=d.unEm(n.style.paddingLeft)}n.style.paddingLeft=d.Em(o)}}},HTMLgetScale:function(){var l=1,j=this.getValues("mathsize","scriptlevel","fontsize");if(this.style){var k=this.HTMLspanElement();if(k.style.fontSize!=""){j.fontsize=k.style.fontSize}}if(j.fontsize&&!this.mathsize){j.mathsize=j.fontsize}if(j.scriptlevel!==0){if(j.scriptlevel>2){j.scriptlevel=2}l=Math.pow(this.Get("scriptsizemultiplier"),j.scriptlevel);j.scriptminsize=d.length2em(this.Get("scriptminsize"));if(l2){k.scriptlevel=2}j=Math.sqrt(Math.pow(k.scriptsizemultiplier,k.scriptlevel))}return j},HTMLgetVariant:function(){var j=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");j.hasVariant=this.Get("mathvariant",true);if(!j.hasVariant){j.family=j.fontfamily;j.weight=j.fontweight;j.style=j.fontstyle}if(this.style){var l=this.HTMLspanElement();if(!j.family&&l.style.fontFamily){j.family=l.style.fontFamily}if(!j.weight&&l.style.fontWeight){j.weight=l.style.fontWeight}if(!j.style&&l.style.fontStyle){j.style=l.style.fontStyle}}if(j.weight&&j.weight.match(/^\d+$/)){j.weight=(parseInt(j.weight)>600?"bold":"normal")}var k=j.mathvariant;if(this.variantForm){k="-"+d.fontInUse+"-variant"}if(j.family&&!j.hasVariant){if(!j.weight&&j.mathvariant.match(/bold/)){j.weight="bold"}if(!j.style&&j.mathvariant.match(/italic/)){j.style="italic"}return{FONTS:[],fonts:[],noRemap:true,defaultFont:{family:j.family,style:j.style,weight:j.weight}}}if(j.weight==="bold"){k={normal:f.VARIANT.BOLD,italic:f.VARIANT.BOLDITALIC,fraktur:f.VARIANT.BOLDFRAKTUR,script:f.VARIANT.BOLDSCRIPT,"sans-serif":f.VARIANT.BOLDSANSSERIF,"sans-serif-italic":f.VARIANT.SANSSERIFBOLDITALIC}[k]||k}else{if(j.weight==="normal"){k={bold:f.VARIANT.normal,"bold-italic":f.VARIANT.ITALIC,"bold-fraktur":f.VARIANT.FRAKTUR,"bold-script":f.VARIANT.SCRIPT,"bold-sans-serif":f.VARIANT.SANSSERIF,"sans-serif-bold-italic":f.VARIANT.SANSSERIFITALIC}[k]||k}}if(j.style==="italic"){k={normal:f.VARIANT.ITALIC,bold:f.VARIANT.BOLDITALIC,"sans-serif":f.VARIANT.SANSSERIFITALIC,"bold-sans-serif":f.VARIANT.SANSSERIFBOLDITALIC}[k]||k}else{if(j.style==="normal"){k={italic:f.VARIANT.NORMAL,"bold-italic":f.VARIANT.BOLD,"sans-serif-italic":f.VARIANT.SANSSERIF,"sans-serif-bold-italic":f.VARIANT.BOLDSANSSERIF}[k]||k}}return d.FONTDATA.VARIANT[k]}},{HTMLautoload:function(){var j=d.autoloadDir+"/"+this.type+".js";b.RestartAfter(g.Require(j))},HTMLautoloadFile:function(j){var k=d.autoloadDir+"/"+j+".js";b.RestartAfter(g.Require(k))},HTMLstretchH:function(k,j){this.HTMLremoveColor();return this.toHTML(k,j)},HTMLstretchV:function(k,j,l){this.HTMLremoveColor();return this.toHTML(k,j,l)}});f.chars.Augment({toHTML:function(m,l,k,n){var q=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(k){q=k(q,n)}if(l.fontInherit){var p=Math.floor(100/d.scale+0.5)+"%";d.addElement(m,"span",{style:{"font-size":p}},[q]);if(l.bold){m.lastChild.style.fontWeight="bold"}if(l.italic){m.lastChild.style.fontStyle="italic"}var o=d.getHD(m),j=d.getW(m);m.bbox={h:o.h,d:o.d,w:j,lw:0,rw:j,exactW:true}}else{this.HTMLhandleVariant(m,l,q)}}});f.entity.Augment({toHTML:function(m,l,k,n){var q=this.toString().replace(/[\u2061-\u2064]/g,"");if(k){q=k(q,n)}if(l.fontInherit){var p=Math.floor(100/d.scale+0.5)+"%";d.addElement(m,"span",{style:{"font-size":p}},[q]);if(l.bold){m.lastChild.style.fontWeight="bold"}if(l.italic){m.lastChild.style.fontStyle="italic"}var o=d.getHD(m),j=d.getW(m);m.bbox={h:o.h,d:o.d,w:j,lw:0,rw:j,exactW:true}}else{this.HTMLhandleVariant(m,l,q)}}});f.mi.Augment({toHTML:function(n){n=this.HTMLhandleSize(this.HTMLcreateSpan(n));n.bbox=null;var l=this.HTMLgetVariant();for(var k=0,j=this.data.length;ko.w&&p.length===1&&!l.noIC){o.ic=o.rw-o.w;d.createBlank(n,o.ic);o.w=o.rw}this.HTMLhandleSpace(n);this.HTMLhandleColor(n);return n}});f.mn.Augment({toHTML:function(n){n=this.HTMLhandleSize(this.HTMLcreateSpan(n));n.bbox=null;var l=this.HTMLgetVariant();for(var k=0,j=this.data.length;kt.bbox.w){t.bbox.ic=t.bbox.rw-t.bbox.w;d.createBlank(t,t.bbox.ic);t.bbox.w=t.bbox.rw}}this.HTMLhandleSpace(t);this.HTMLhandleColor(t);return t},CoreParent:function(){var j=this;while(j&&j.isEmbellished()&&j.CoreMO()===this&&!j.isa(f.math)){j=j.Parent()}return j},CoreText:function(j){if(!j){return""}if(j.isEmbellished()){return j.CoreMO().data.join("")}while((j.isa(f.mrow)||j.isa(f.TeXAtom))&&j.data.length===1&&j.data[0]){j=j.data[0]}if(!j.isToken){return""}else{return j.data.join("")}},HTMLremapChars:{"*":"\u2217",'"':"\u2033","\u00B0":"\u2218","\u00B2":"2","\u00B3":"3","\u00B4":"\u2032","\u00B9":"1"},HTMLremap:function(k,j){k=k.replace(/-/g,"\u2212");if(j){k=k.replace(/'/g,"\u2032").replace(/`/g,"\u2035");if(k.length===1){k=j[k]||k}}return k},HTMLcanStretch:function(m){if(!this.Get("stretchy")){return false}var n=this.data.join("");if(n.length>1){return false}var k=this.CoreParent();if(k&&k.isa(f.munderover)&&this.CoreText(k.data[k.base]).length===1){var l=k.data[k.over],j=k.data[k.under];if(l&&this===l.CoreMO()&&k.Get("accent")){n=d.FONTDATA.REMAPACCENT[n]||n}else{if(j&&this===j.CoreMO()&&k.Get("accentunder")){n=d.FONTDATA.REMAPACCENTUNDER[n]||n}}}n=d.FONTDATA.DELIMITERS[n.charCodeAt(0)];return(n&&n.dir==m.substr(0,1))},HTMLstretchV:function(l,m,n){this.HTMLremoveColor();var q=this.getValues("symmetric","maxsize","minsize");var o=this.HTMLspanElement(),r=this.HTMLgetMu(o),p;var j=d.TeX.axis_height,k=o.scale;if(q.symmetric){p=2*Math.max(m-j,n+j)}else{p=m+n}q.maxsize=d.length2em(q.maxsize,r,o.bbox.h+o.bbox.d);q.minsize=d.length2em(q.minsize,r,o.bbox.h+o.bbox.d);p=Math.max(q.minsize,Math.min(q.maxsize,p));o=this.HTMLcreateSpan(l);d.createDelimiter(o,this.data.join("").charCodeAt(0),p,k);if(q.symmetric){p=(o.bbox.h+o.bbox.d)/2+j}else{p=(o.bbox.h+o.bbox.d)*m/(m+n)}d.positionDelimiter(o,p);this.HTMLhandleSpace(o);this.HTMLhandleColor(o);return o},HTMLstretchH:function(n,j){this.HTMLremoveColor();var l=this.getValues("maxsize","minsize","mathvariant","fontweight");if((l.fontweight==="bold"||parseInt(l.fontweight)>=600)&&!this.Get("mathvariant",true)){l.mathvariant=f.VARIANT.BOLD}var m=this.HTMLspanElement(),k=this.HTMLgetMu(m),o=m.scale;l.maxsize=d.length2em(l.maxsize,k,m.bbox.w);l.minsize=d.length2em(l.minsize,k,m.bbox.w);j=Math.max(l.minsize,Math.min(l.maxsize,j));m=this.HTMLcreateSpan(n);d.createDelimiter(m,this.data.join("").charCodeAt(0),j,o,l.mathvariant);this.HTMLhandleSpace(m);this.HTMLhandleColor(m);return m}});f.mtext.Augment({toHTML:function(n){n=this.HTMLhandleSize(this.HTMLcreateSpan(n));var l=this.HTMLgetVariant();if(d.config.mtextFontInherit||this.Parent().type==="merror"){l={bold:l.bold,italic:l.italic,fontInherit:true}}for(var k=0,j=this.data.length;kd.linebreakWidth)||this.hasNewline()},HTMLstretchH:function(l,j){this.HTMLremoveColor();var k=this.HTMLspanElement();this.data[this.core].HTMLstretchH(k,j);this.HTMLcomputeBBox(k,true);this.HTMLhandleColor(k);return k},HTMLstretchV:function(l,k,m){this.HTMLremoveColor();var j=this.HTMLspanElement();this.data[this.core].HTMLstretchV(j,k,m);this.HTMLcomputeBBox(j,true);this.HTMLhandleColor(j);return j}});f.mstyle.Augment({toHTML:function(k,j,l){k=this.HTMLcreateSpan(k);if(this.data[0]!=null){var m=this.data[0].toHTML(k);if(l!=null){this.data[0].HTMLstretchV(k,j,l)}else{if(j!=null){this.data[0].HTMLstretchH(k,j)}}k.bbox=m.bbox}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k},HTMLstretchH:f.mbase.HTMLstretchH,HTMLstretchV:f.mbase.HTMLstretchV});f.mfrac.Augment({toHTML:function(C){C=this.HTMLcreateSpan(C);var l=d.createStack(C);var o=d.createBox(l),n=d.createBox(l);d.MeasureSpans([this.HTMLboxChild(0,o),this.HTMLboxChild(1,n)]);var j=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var G=this.HTMLgetScale(),B=j.displaystyle;var F=d.TeX.axis_height*G;if(j.bevelled){var E=(B?0.4:0.15);var r=Math.max(o.bbox.h+o.bbox.d,n.bbox.h+n.bbox.d)+2*E;var D=d.createBox(l);d.createDelimiter(D,47,r);d.placeBox(o,0,(o.bbox.d-o.bbox.h)/2+F+E);d.placeBox(D,o.bbox.w-E/2,(D.bbox.d-D.bbox.h)/2+F);d.placeBox(n,o.bbox.w+D.bbox.w-E,(n.bbox.d-n.bbox.h)/2+F-E)}else{var k=Math.max(o.bbox.w,n.bbox.w);var x=d.thickness2em(j.linethickness,G),z,y,w,s;var A=d.TeX.min_rule_thickness/this.em;if(B){w=d.TeX.num1;s=d.TeX.denom1}else{w=(x===0?d.TeX.num3:d.TeX.num2);s=d.TeX.denom2}w*=G;s*=G;if(x===0){z=Math.max((B?7:3)*d.TeX.rule_thickness,2*A);y=(w-o.bbox.d)-(n.bbox.h-s);if(yw){k=((r.bbox.h+r.bbox.d)-(w-z))/2}var A=d.FONTDATA.DELIMITERS[d.FONTDATA.RULECHAR];if(!A||nJ){J=q[L].bbox.w}if(!M[L]&&J>l){l=J}}}if(E==null&&G!=null){l=G}else{if(l==-d.BIGDIMEN){l=J}}for(L=J=0,H=this.data.length;LJ){J=v.bbox.w}}}var C=d.TeX.rule_thickness,F=d.FONTDATA.TeX_factor;var o=q[this.base]||{bbox:this.HTMLzeroBBox()};var u,r,z,w,s,B,I,N=0;if(o.bbox.ic){N=1.3*o.bbox.ic+0.05}for(L=0,H=this.data.length;L0){y+=E;x-=E}}d.placeBox(j,n.bbox.w+L,Math.max(y,I.superscriptshift));d.placeBox(w,n.bbox.w,-Math.max(x,I.subscriptshift))}}this.HTMLhandleSpace(J);this.HTMLhandleColor(J);return J},HTMLstretchH:f.mbase.HTMLstretchH,HTMLstretchV:f.mbase.HTMLstretchV});f.mmultiscripts.Augment({toHTML:f.mbase.HTMLautoload});f.mtable.Augment({toHTML:f.mbase.HTMLautoload});f["annotation-xml"].Augment({toHTML:f.mbase.HTMLautoload});f.math.Augment({toHTML:function(t,k){var q=this.Get("alttext");if(q&&q!==""){k.setAttribute("aria-label",q)}var l=d.addElement(t,"nobr",{isMathJax:true});t=this.HTMLcreateSpan(l);var r=d.createStack(t),m=d.createBox(r),s;r.style.fontSize=l.parentNode.style.fontSize;l.parentNode.style.fontSize="";if(this.data[0]!=null){if(d.msieColorBug){if(this.background){this.data[0].background=this.background;delete this.background}if(this.mathbackground){this.data[0].mathbackground=this.mathbackground;delete this.mathbackground}}f.mbase.prototype.displayAlign=b.config.displayAlign;f.mbase.prototype.displayIndent=b.config.displayIndent;var n=this.data[0].toHTML(m);n.bbox.exactW=false;s=d.Measured(n,m)}d.placeBox(m,0,0);r.style.width=Math.round(d.unEm(r.style.width)*this.em)+"px";var j=1/d.em,o=d.em/d.outerEm;d.em/=o;t.bbox.h*=o;t.bbox.d*=o;t.bbox.w*=o;t.bbox.lw*=o;t.bbox.rw*=o;if(s&&s.bbox.width!=null){r.style.width=s.bbox.width;m.style.width="100%"}this.HTMLhandleColor(t);if(s){d.createRule(t,(s.bbox.h+j)*o,(s.bbox.d+j)*o,0)}if(!this.isMultiline&&this.Get("display")==="block"&&t.bbox.width==null){var u=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(u.indentalignfirst!==f.INDENTALIGN.INDENTALIGN){u.indentalign=u.indentalignfirst}if(u.indentalign===f.INDENTALIGN.AUTO){u.indentalign=this.displayAlign}k.style.textAlign=u.indentalign;if(u.indentshiftfirst!==f.INDENTSHIFT.INDENTSHIFT){u.indentshift=u.indentshiftfirst}if(u.indentshift==="auto"){u.indentshift=this.displayIndent}if(u.indentshift&&u.indentalign!==f.INDENTALIGN.CENTER){t.style[{left:"marginLeft",right:"marginRight"}[u.indentalign]]=d.Em(d.length2em(u.indentshift))}}return t},HTMLspanElement:f.mbase.prototype.HTMLspanElement});f.TeXAtom.Augment({toHTML:function(k){k=this.HTMLcreateSpan(k);if(this.data[0]!=null){if(this.texClass===f.TEXCLASS.VCENTER){var j=d.createStack(k);var l=d.createBox(j);d.Measured(this.data[0].toHTML(l),l);d.placeBox(l,0,d.TeX.axis_height-(l.bbox.h+l.bbox.d)/2+l.bbox.d)}else{k.bbox=this.data[0].toHTML(k).bbox}}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k}});MathJax.Hub.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",d,"jax.js"]),0)})});b.Register.StartupHook("End Config",function(){b.Browser.Select({MSIE:function(j){var n=(document.documentMode||0);var m=j.versionAtLeast("7.0");var l=j.versionAtLeast("8.0")&&n>7;var k=(document.compatMode==="BackCompat");if(n<9){d.config.styles[".MathJax .MathJax_HitBox"]["background-color"]="white";d.config.styles[".MathJax .MathJax_HitBox"].opacity=0;d.config.styles[".MathJax .MathJax_HitBox"].filter="alpha(opacity=0)"}d.Augment({PaddingWidthBug:true,msieAccentBug:true,msieColorBug:true,msieColorPositionBug:true,msieRelativeWidthBug:k,msieDisappearingBug:(n>=8),msieMarginScaleBug:(n<8),msiePaddingWidthBug:true,msieBorderWidthBug:k,msieFrameSizeBug:(n<=8),msieInlineBlockAlignBug:(!l||k),msiePlaceBoxBug:(l&&!k),msieClipRectBug:!l,msieNegativeSpaceBug:k,cloneNodeBug:(l&&j.version==="8.0"),initialSkipBug:(n<8),msieNegativeBBoxBug:(n>=8),msieIE6:!m,msieItalicWidthBug:true,FontFaceBug:true,msieFontCSSBug:j.isIE9,allowWebFonts:(n>=9?"woff":"eot")})},Firefox:function(k){var l=false;if(k.versionAtLeast("3.5")){var j=String(document.location).replace(/[^\/]*$/,"");if(document.location.protocol!=="file:"||b.config.root.match(/^https?:\/\//)||(b.config.root+"/").substr(0,j.length)===j){l="otf"}}d.Augment({ffVerticalAlignBug:true,AccentBug:true,allowWebFonts:l})},Safari:function(o){var m=o.versionAtLeast("3.0");var l=o.versionAtLeast("3.1");var j=navigator.appVersion.match(/ Safari\/\d/)&&navigator.appVersion.match(/ Version\/\d/)&&navigator.vendor.match(/Apple/);var k=(navigator.appVersion.match(/ Android (\d+)\.(\d+)/));var p=(l&&o.isMobile&&((navigator.platform.match(/iPad|iPod|iPhone/)&&!o.versionAtLeast("5.0"))||(k!=null&&(k[1]<2||(k[1]==2&&k[2]<2)))));d.Augment({config:{styles:{".MathJax img, .MathJax nobr, .MathJax a":{"max-width":"5000em","max-height":"5000em"}}},rfuzz:0.011,AccentBug:true,AdjustSurd:true,negativeBBoxes:true,safariNegativeSpaceBug:true,safariVerticalAlignBug:!l,safariTextNodeBug:!m,forceReflow:true,allowWebFonts:(l&&!p?"otf":false)});if(j){d.Augment({webFontDefault:(o.isMobile?"sans-serif":"serif")})}if(o.isPC){d.Augment({adjustAvailableFonts:d.removeSTIXfonts,checkWebFontsTwice:true})}if(p){var n=b.config["HTML-CSS"];if(n){n.availableFonts=[];n.preferredFont=null}else{b.config["HTML-CSS"]={availableFonts:[],preferredFont:null}}}},Chrome:function(j){d.Augment({Em:d.Px,unEm:d.unPx,chromeHeightBug:true,cloneNodeBug:true,rfuzz:0.011,AccentBug:true,AdjustSurd:true,negativeBBoxes:true,safariNegativeSpaceBug:true,safariWebFontSerif:[""],forceReflow:true,allowWebFonts:(j.versionAtLeast("4.0")?"otf":"svg")})},Opera:function(j){j.isMini=(navigator.appVersion.match("Opera Mini")!=null);d.config.styles[".MathJax .merror"]["vertical-align"]=null;d.config.styles[".MathJax span"]["z-index"]=0;d.Augment({operaHeightBug:true,operaVerticalAlignBug:true,operaFontSizeBug:j.versionAtLeast("10.61"),initialSkipBug:true,FontFaceBug:true,PaddingWidthBug:true,allowWebFonts:(j.versionAtLeast("10.0")&&!j.isMini?"otf":false),adjustAvailableFonts:d.removeSTIXfonts})},Konqueror:function(j){d.Augment({konquerorVerticalAlignBug:true})}})});MathJax.Hub.Register.StartupHook("End Cookie",function(){if(b.config.menuSettings.zoom!=="None"){g.Require("[MathJax]/extensions/MathZoom.js")}})})(MathJax.Ajax,MathJax.Hub,MathJax.OutputJax["HTML-CSS"]);