/* highcharts js v5.0.6 (2016-12-07) 3d features for highcharts js @license: www.highcharts.com/license */ (function(d){"object"===typeof module&&module.exports?module.exports=d:d(highcharts)})(function(d){(function(a){var q=a.deg2rad,k=a.pick;a.perspective=function(p,n,u){var m=n.options.chart.options3d,f=u?n.inverted:!1,g=n.plotwidth/2,r=n.plotheight/2,d=m.depth/2,e=k(m.depth,1)*k(m.viewdistance,0),c=n.scale3d||1,b=q*m.beta*(f?-1:1),m=q*m.alpha*(f?-1:1),h=math.cos(m),v=math.cos(-b),x=math.sin(m),y=math.sin(-b);u||(g+=n.plotleft,r+=n.plottop);return a.map(p,function(b){var a,m;m=(f?b.y:b.x)-g;var n=(f? b.x:b.y)-r,k=(b.z||0)-d;a=v*m-y*k;b=-x*y*m+h*n-v*x*k;m=h*y*m+x*n+h*v*k;n=0h&&d-h>math.pi/2+.0001?(f=f.concat(p(b,c,l,a,h,h+math.pi/2,f,e)),f=f.concat(p(b,c,l,a,h+math.pi/2,d,f,e))):dmath.pi/2+.0001?(f=f.concat(p(b,c,l,a,h,h-math.pi/2,f,e)),f=f.concat(p(b,c,l,a,h-math.pi/2,d,f,e))):["c",b+l*math.cos(h)-l*t*h*math.sin(h)+f,c+a*math.sin(h)+a*t*h*math.cos(h)+e,b+l*math.cos(d)+l*t*h*math.sin(d)+f,c+a*math.sin(d)- a*t*h*math.cos(d)+e,b+l*math.cos(d)+f,c+a*math.sin(d)+e]}var n=math.cos,u=math.pi,m=math.sin,f=a.animobject,g=a.charts,r=a.color,d=a.defined,e=a.deg2rad,c=a.each,b=a.extend,h=a.inarray,v=a.map,x=a.merge,y=a.perspective,e=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 l=[];c(b,function(b){l.push("l",b.x,b.y)});b.length&&(l[0]="m",a&&l.push("z"));return l};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:r(b).brighten(.1).get()});this.side.attr({fill:r(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||d(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){d(b.x)&&d(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 m[b]}var a=b.x,h=b.y,d=b.z,e=b.height,f=b.width,r=b.depth,m=[{x:a,y:h,z:d},{x:a+f,y:h,z:d},{x:a+f,y:h+e,z:d},{x:a,y:h+e,z:d},{x:a,y:h+e,z:d+r},{x:a+f,y:h+ e,z:d+r},{x:a+f,y:h,z:d+r},{x:a,y:h,z:d+r}],m=y(m,g[this.chartindex],b.insideplotarea),d=function(b,a){var h=[];b=v(b,c);a=v(a,c);0>q(b)?h=b:0>q(a)&&(h=a);return h};b=d([3,2,1,0],[7,6,5,4]);a=[4,5,2,3];h=d([1,6,7,0],a);d=d([1,2,5,6],[0,7,4,3]);return[this.tolinepath(b,!0),this.tolinepath(h,!0),this.tolinepath(d,!0),k(b),k(h),k(d),9e9*k(v(a,c))]};a.svgrenderer.prototype.arc3d=function(a){function d(b){var a=!1,c={},d;for(d in b)-1!==h(d,v)&&(c[d]=b[d],delete b[d],a=!0);return a?c:!1}var l=this.g(), m=l.renderer,v="x y r innerr start end".split(" ");a=x(a);a.alpha*=e;a.beta*=e;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);c(["out","inn","side1","side2"],function(c){l[c].addclass(a+" highcharts-3d-side").add(b)})};l.setpaths=function(b){var a=l.renderer.arc3dpath(b),c=100*a.ztop;l.attribs=b;l.top.attr({d:a.top,zindex:a.ztop});l.inn.attr({d:a.inn,zindex:a.zinn});l.out.attr({d:a.out,zindex:a.zout}); l.side1.attr({d:a.side1,zindex:a.zside1});l.side2.attr({d:a.side2,zindex:a.zside2});l.zindex=c;l.attr({zindex:c});b.center&&(l.top.setradialreference(b.center),delete b.center)};l.setpaths(a);l.fillsetter=function(b){var a=r(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};c(["opacity","translatex","translatey","visibility"],function(b){l[b+"setter"]=function(b,a){l[a]=b;c(["out", "inn","side1","side2","top"],function(c){l[c].attr(a,b)})}});b(l,"attr",function(a,c){var h;"object"===typeof c&&(h=d(c))&&(b(l.attribs,h),l.setpaths(l.attribs));return a.apply(this,[].slice.call(arguments,1))});b(l,"animate",function(b,a,c,h){var l,e=this.attribs,m;delete a.center;delete a.z;delete a.depth;delete a.alpha;delete a.beta;m=f(e(c,this.renderer.globalanimation));m.duration&&(a=x(a),l=d(a),a.dummy=1,l&&(m.step=function(b,a){function c(b){return e[b]+(e(l[b],e[b])-e[b])*a.pos}"dummy"=== a.prop&&a.elem.setpaths(x(e,{x:c("x"),y:c("y"),r:c("r"),innerr:c("innerr"),start:c("start"),end:c("end")}))}),c=m);return b.call(this,a,c,h)});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 a(b){b%=2*math.pi;b>math.pi&&(b=2*math.pi-b);return b}var c=b.x,h=b.y,d=b.start,e=b.end-.00001,f=b.r,r=b.innerr,v=b.depth,g=b.alpha,k=b.beta,x=math.cos(d),q=math.sin(d);b=math.cos(e);var y=math.sin(e),w=f*math.cos(k),f=f*math.cos(g),t=r*math.cos(k),b=r*math.cos(g),r=v*math.sin(k),z=v*math.sin(g),v=["m",c+w*x,h+f*q],v=v.concat(p(c,h,w,f,d,e,0,0)),v=v.concat(["l",c+t*b,h+b*y]),v=v.concat(p(c,h,t,b,e,d,0,0)),v=v.concat(["z"]),e=0-e?d:e>-e?-e:d,c=ea&&du-k&&dr&&(t=math.min(t,1-math.abs((e+f)/(r+f))%1));ck&&(t=0>k?math.min(t,(b+g)/(-k+b+g)):math.min(t,1-(b+g)/(k+g)%1));h=g.min&&e<=g.max:!1,m.push({x:d.plotx,y:d.ploty, z:d.plotz});f=q(m,f,!0);for(c=0;c