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