/* Highcharts JS v5.0.10 (2017-03-31) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(E){"object"===typeof module&&module.exports?module.exports=E:E(Highcharts)})(function(E){(function(a){var q=a.deg2rad,k=a.pick;a.perspective=function(p,n,u){var m=n.options.chart.options3d,g=u?n.inverted:!1,h=n.plotWidth/2,r=n.plotHeight/2,e=m.depth/2,f=k(m.depth,1)*k(m.viewDistance,0),d=n.scale3d||1,b=q*m.beta*(g?-1:1),m=q*m.alpha*(g?-1:1),c=Math.cos(m),w=Math.cos(-b),x=Math.sin(m),y=Math.sin(-b);u||(h+=n.plotLeft,r+=n.plotTop);return a.map(p,function(b){var a,m;m=(g?b.y:b.x)-h;var n=(g? b.x:b.y)-r,k=(b.z||0)-e;a=w*m-y*k;b=-x*y*m+c*n-w*x*k;m=c*y*m+x*n+c*w*k;n=0a&&c-a>Math.PI/2+.0001?(g=g.concat(p(b,d,l,C,a,a+Math.PI/2,e,f)),g=g.concat(p(b,d,l,C,a+Math.PI/2,c,e,f))):cMath.PI/2+.0001?(g=g.concat(p(b,d,l,C,a,a-Math.PI/2,e,f)),g=g.concat(p(b,d,l,C,a-Math.PI/2,c,e,f))):["C",b+l*Math.cos(a)-l*t*H*Math.sin(a)+e,d+C*Math.sin(a)+C*t*H*Math.cos(a)+f,b+l*Math.cos(c)+l*t*H*Math.sin(c)+e,d+C*Math.sin(c)- C*t*H*Math.cos(c)+f,b+l*Math.cos(c)+e,d+C*Math.sin(c)+f]}var n=Math.cos,u=Math.PI,m=Math.sin,g=a.animObject,h=a.charts,r=a.color,e=a.defined,f=a.deg2rad,d=a.each,b=a.extend,c=a.inArray,w=a.map,x=a.merge,y=a.perspective,F=a.pick,A=a.SVGElement,G=a.SVGRenderer,B=a.wrap,t=4*(Math.sqrt(2)-1)/3/(u/2);G.prototype.toLinePath=function(b,a){var c=[];d(b,function(b){c.push("L",b.x,b.y)});b.length&&(c[0]="M",a&&c.push("Z"));return c};G.prototype.cuboid=function(b){var d=this.g(),c=d.destroy;b=this.cuboidPath(b); d.attr({"stroke-linejoin":"round"});d.front=this.path(b[0]).attr({"class":"highcharts-3d-front",zIndex:b[3]}).add(d);d.top=this.path(b[1]).attr({"class":"highcharts-3d-top",zIndex:b[4]}).add(d);d.side=this.path(b[2]).attr({"class":"highcharts-3d-side",zIndex:b[5]}).add(d);d.fillSetter=function(b){this.front.attr({fill:b});this.top.attr({fill:r(b).brighten(.1).get()});this.side.attr({fill:r(b).brighten(-.1).get()});this.color=b;return this};d.opacitySetter=function(b){this.front.attr({opacity:b}); this.top.attr({opacity:b});this.side.attr({opacity:b});return this};d.attr=function(b,d){if("string"===typeof b&&"undefined"!==typeof d){var c=b;b={};b[c]=d}if(b.shapeArgs||e(b.x))b=this.renderer.cuboidPath(b.shapeArgs||b),this.front.attr({d:b[0],zIndex:b[3]}),this.top.attr({d:b[1],zIndex:b[4]}),this.side.attr({d:b[2],zIndex:b[5]});else return a.SVGElement.prototype.attr.call(this,b);return this};d.animate=function(b,d,c){e(b.x)&&e(b.y)?(b=this.renderer.cuboidPath(b),this.front.attr({zIndex:b[3]}).animate({d:b[0]}, d,c),this.top.attr({zIndex:b[4]}).animate({d:b[1]},d,c),this.side.attr({zIndex:b[5]}).animate({d:b[2]},d,c),this.attr({zIndex:-b[6]})):b.opacity?(this.front.animate(b,d,c),this.top.animate(b,d,c),this.side.animate(b,d,c)):A.prototype.animate.call(this,b,d,c);return this};d.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return c.call(this)};d.attr({zIndex:-b[6]});return d};G.prototype.cuboidPath=function(b){function d(b){return m[b]}var c=b.x,a=b.y,e=b.z,f=b.height, g=b.width,r=b.depth,m=[{x:c,y:a,z:e},{x:c+g,y:a,z:e},{x:c+g,y:a+f,z:e},{x:c,y:a+f,z:e},{x:c,y:a+f,z:e+r},{x:c+g,y:a+f,z:e+r},{x:c+g,y:a,z:e+r},{x:c,y:a,z:e+r}],m=y(m,h[this.chartIndex],b.insidePlotArea),e=function(b,c){var a=[];b=w(b,d);c=w(c,d);0>q(b)?a=b:0>q(c)&&(a=c);return a};b=e([3,2,1,0],[7,6,5,4]);c=[4,5,2,3];a=e([1,6,7,0],c);e=e([1,2,5,6],[0,7,4,3]);return[this.toLinePath(b,!0),this.toLinePath(a,!0),this.toLinePath(e,!0),k(b),k(a),k(e),9E9*k(w(c,d))]};a.SVGRenderer.prototype.arc3d=function(a){function e(b){var d= !1,a={};b=x(b);for(var e in b)-1!==c(e,n)&&(a[e]=b[e],delete b[e],d=!0);return d?a:!1}var l=this.g(),m=l.renderer,n="x y r innerR start end".split(" ");a=x(a);a.alpha*=f;a.beta*=f;l.top=m.path();l.side1=m.path();l.side2=m.path();l.inn=m.path();l.out=m.path();l.onAdd=function(){var b=l.parentGroup,a=l.attr("class");l.top.add(l);d(["out","inn","side1","side2"],function(d){l[d].addClass(a+" highcharts-3d-side").add(b)})};l.setPaths=function(b){var d=l.renderer.arc3dPath(b),a=100*d.zTop;l.attribs=b;l.top.attr({d:d.top, zIndex:d.zTop});l.inn.attr({d:d.inn,zIndex:d.zInn});l.out.attr({d:d.out,zIndex:d.zOut});l.side1.attr({d:d.side1,zIndex:d.zSide1});l.side2.attr({d:d.side2,zIndex:d.zSide2});l.zIndex=a;l.attr({zIndex:a});b.center&&(l.top.setRadialReference(b.center),delete b.center)};l.setPaths(a);l.fillSetter=function(b){var d=r(b).brighten(-.1).get();this.fill=b;this.side1.attr({fill:d});this.side2.attr({fill:d});this.inn.attr({fill:d});this.out.attr({fill:d});this.top.attr({fill:b});return this};d(["opacity","translateX", "translateY","visibility"],function(b){l[b+"Setter"]=function(b,a){l[a]=b;d(["out","inn","side1","side2","top"],function(d){l[d].attr(a,b)})}});B(l,"attr",function(d,a){var c;"object"===typeof a&&(c=e(a))&&(b(l.attribs,c),l.setPaths(l.attribs));return d.apply(this,[].slice.call(arguments,1))});B(l,"animate",function(b,d,a,c){var l,f=this.attribs,m;delete d.center;delete d.z;delete d.depth;delete d.alpha;delete d.beta;m=g(F(a,this.renderer.globalAnimation));m.duration&&(l=e(d),d.dummy=1,l&&(m.step= function(b,d){function a(b){return f[b]+(F(l[b],f[b])-f[b])*d.pos}"dummy"===d.prop&&d.elem.setPaths(x(f,{x:a("x"),y:a("y"),r:a("r"),innerR:a("innerR"),start:a("start"),end:a("end")}))}),a=m);return b.call(this,d,a,c)});l.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();A.prototype.destroy.call(this)};l.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};l.show=function(){this.top.show(); this.out.show();this.inn.show();this.side1.show();this.side2.show()};return l};G.prototype.arc3dPath=function(b){function d(b){b%=2*Math.PI;b>Math.PI&&(b=2*Math.PI-b);return b}var a=b.x,c=b.y,e=b.start,f=b.end-.00001,g=b.r,r=b.innerR,w=b.depth,h=b.alpha,k=b.beta,x=Math.cos(e),q=Math.sin(e);b=Math.cos(f);var y=Math.sin(f),v=g*Math.cos(k),g=g*Math.cos(h),t=r*Math.cos(k),B=r*Math.cos(h),r=w*Math.sin(k),z=w*Math.sin(h),w=["M",a+v*x,c+g*q],w=w.concat(p(a,c,v,g,e,f,0,0)),w=w.concat(["L",a+t*b,c+B*y]),w= w.concat(p(a,c,t,B,f,e,0,0)),w=w.concat(["Z"]),F=0-F?e:f>-F?-F:e,D=fA&&eu-k&&er&&(t=Math.min(t,1-Math.abs((f+g)/(r+g))%1));dk&&(t=0>k?Math.min(t,(b+h)/(-k+b+h)):Math.min(t,1-(b+h)/(k+h)%1));c=h.min&&f<=h.max:!1,m.push({x:e.plotX,y:e.plotY,z:e.plotZ});g=q(m,g,!0);for(d=0;d