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