MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var v="2.7.9",l=MathJax.ElementJax.mml,S=MathJax.OutputJax.SVG,o=S.BBOX;o.ELLIPSE=o.Subclass({type:"ellipse",removeable:!1,Init:function(A,c,s,n,O,t){t==null&&(t={}),t.fill="none",O&&(t.stroke=O),t["stroke-width"]=n.toFixed(2).replace(/\.?0+$/,""),t.cx=Math.floor(s/2),t.cy=Math.floor((A+c)/2-c),t.rx=Math.floor((s-n)/2),t.ry=Math.floor((A+c-n)/2),this.SUPER(arguments).Init.call(this,t),this.w=this.r=s,this.h=this.H=A,this.d=this.D=c,this.l=0}}),o.DLINE=o.Subclass({type:"line",removeable:!1,Init:function(A,c,s,n,O,t,r){r==null&&(r={}),r.fill="none",O&&(r.stroke=O),r["stroke-width"]=n.toFixed(2).replace(/\.?0+$/,""),t=="up"?(r.x1=Math.floor(n/2),r.y1=Math.floor(n/2-c),r.x2=Math.floor(s-n/2),r.y2=Math.floor(A-n/2)):(r.x1=Math.floor(n/2),r.y1=Math.floor(A-n/2),r.x2=Math.floor(s-n/2),r.y2=Math.floor(n/2-c)),this.SUPER(arguments).Init.call(this,r),this.w=this.r=s,this.h=this.H=A,this.d=this.D=c,this.l=0}}),o.FPOLY=o.Subclass({type:"polygon",removeable:!1,Init:function(A,c,s){s==null&&(s={}),c&&(s.fill=c);for(var n=[],O=1e8,t=O,r=-O,N=r,a=0,e=A.length;a<e;a++){var i=A[a][0],h=A[a][1];i>r&&(r=i),i<O&&(O=i),h>N&&(N=h),h<t&&(t=h),n.push(Math.floor(i)+","+Math.floor(h))}s.points=n.join(" "),this.SUPER(arguments).Init.call(this,s),this.w=this.r=r,this.h=this.H=N,this.d=this.D=-t,this.l=-O}}),o.PPATH=o.Subclass({type:"path",removeable:!1,Init:function(A,c,s,n,O,t,r){r==null&&(r={}),r.fill="none",t&&(r.stroke=t),r["stroke-width"]=O.toFixed(2).replace(/\.?0+$/,""),r.d=n,this.SUPER(arguments).Init.call(this,r),this.w=this.r=s,this.h=this.H=A+c,this.d=this.D=this.l=0,this.y=-c}}),l.menclose.Augment({toSVG:function(A,c){this.SVGgetStyles();var s=this.SVG(),n=this.SVGgetScale(s);this.SVGhandleSpace(s);var O=this.SVGdataStretched(0,A,c),t=this.getValues("notation","thickness","padding","mathcolor","color");t.color&&!this.mathcolor&&(t.mathcolor=t.color),t.thickness==null&&(t.thickness=".075em"),t.padding==null&&(t.padding=".2em");var r=this.SVGgetMu(s),N=S.length2em(t.padding,r,1/S.em)*n,a=S.length2em(t.thickness,r,1/S.em);a=Math.max(1/S.em,a);var e=O.h+N+a,i=O.d+N+a,h=O.w+2*(N+a),V=0,m,I,T,E,u=[!1,!1,!1,!1],f=MathJax.Hub.SplitList(t.notation),M={};for(T=0,E=f.length;T<E;T++)M[f[T]]=!0;M[l.NOTATION.UPDIAGONALARROW]&&(M[l.NOTATION.UPDIAGONALSTRIKE]=!1);for(var b in M)if(!(!M.hasOwnProperty(b)||!M[b]))switch(b){case l.NOTATION.BOX:u=[!0,!0,!0,!0];break;case l.NOTATION.ROUNDEDBOX:s.Add(o.FRAME(e,i,h,a,"solid",t.mathcolor,{rx:Math.floor(Math.min(e+i-a,h-a)/4)}));break;case l.NOTATION.CIRCLE:s.Add(o.ELLIPSE(e,i,h,a,t.mathcolor));break;case l.NOTATION.ACTUARIAL:u[0]=!0;case l.NOTATION.RIGHT:u[1]=!0;break;case l.NOTATION.LEFT:u[3]=!0;break;case l.NOTATION.TOP:u[0]=!0;break;case l.NOTATION.BOTTOM:u[2]=!0;break;case l.NOTATION.VERTICALSTRIKE:s.Add(o.VLINE(e+i,a,"solid",t.mathcolor),(h-a)/2,-i);break;case l.NOTATION.HORIZONTALSTRIKE:s.Add(o.HLINE(h,a,"solid",t.mathcolor),0,(e+i-a)/2-i);break;case l.NOTATION.UPDIAGONALSTRIKE:s.Add(o.DLINE(e,i,h,a,t.mathcolor,"up"));break;case l.NOTATION.UPDIAGONALARROW:var p=Math.sqrt(h*h+(e+i)*(e+i)),k=1/p*10/S.em*a/.075;m=h*k,I=(e+i)*k;var L=.4*I;s.Add(o.DLINE(e-.5*I,i,h-.5*m,a,t.mathcolor,"up")),s.Add(o.FPOLY([[L+m,I],[L-.4*I,.4*m],[L+.3*m,.3*I],[L+.4*I,-.4*m],[L+m,I]],t.mathcolor),h-m-L,e-I);break;case l.NOTATION.DOWNDIAGONALSTRIKE:s.Add(o.DLINE(e,i,h,a,t.mathcolor,"down"));break;case l.NOTATION.PHASORANGLE:u[2]=!0,h-=2*N,N=(e+i)/2,h+=N,s.Add(o.DLINE(e,i,N,a,t.mathcolor,"up"));break;case l.NOTATION.MADRUWB:u[1]=u[2]=!0;break;case l.NOTATION.RADICAL:s.Add(o.PPATH(e,i,h,"M "+this.SVGxy(a/2,.4*(e+i))+" L "+this.SVGxy(N,a/2)+" L "+this.SVGxy(2*N,e+i-a/2)+" L "+this.SVGxy(h,e+i-a/2),a,t.mathcolor),0,a),V=N;break;case l.NOTATION.LONGDIV:s.Add(o.PPATH(e,i,h,"M "+this.SVGxy(a/2,a/2)+" a "+this.SVGxy(N,(e+i)/2-2*a)+" 0 0,1 "+this.SVGxy(a/2,e+i-a)+" L "+this.SVGxy(h,e+i-a/2),a,t.mathcolor),0,a/2),V=N;break}var R=[["H",h,0,e-a],["V",e+i,h-a,-i],["H",h,0,-i],["V",e+i,0,-i]];for(T=0;T<4;T++)if(u[T]){var G=R[T];s.Add(o[G[0]+"LINE"](G[1],a,"solid",t.mathcolor),G[2],G[3])}return s.Add(O,V+N+a,0,!1,!0),s.Clean(),this.SVGhandleSpace(s),this.SVGhandleColor(s),this.SVGsaveData(s),s},SVGxy:function(A,c){return Math.floor(A)+","+Math.floor(c)}}),MathJax.Hub.Startup.signal.Post("SVG menclose Ready"),MathJax.Ajax.loadComplete(S.autoloadDir+"/menclose.js")});
