/*
 Highcharts JS v5.0.4 (2016-11-25)

 3D features for Highcharts JS

 @license: www.highcharts.com/license
*/
(function(w){"object"===typeof module&&module.exports?module.exports=w:w(Highcharts)})(function(w){(function(b){var r=b.deg2rad,n=b.pick;b.perspective=function(p,q,t){var e=q.options.chart.options3d,h=t?q.inverted:!1,g=q.plotWidth/2,c=q.plotHeight/2,m=e.depth/2,f=n(e.depth,1)*n(e.viewDistance,0),d=q.scale3d||1,a=r*e.beta*(h?-1:1),e=r*e.alpha*(h?-1:1),k=Math.cos(e),v=Math.cos(-a),z=Math.sin(e),A=Math.sin(-a);t||(g+=q.plotLeft,c+=q.plotTop);return b.map(p,function(a){var b,e;e=(h?a.y:a.x)-g;var p=(h?
a.x:a.y)-c,t=(a.z||0)-m;b=v*e-A*t;a=-z*A*e+k*p-v*z*t;e=k*A*e+z*p+k*v*t;p=0<f&&f<Number.POSITIVE_INFINITY?f/(e+m+f):1;b=b*p*d+g;a=a*p*d+c;return{x:h?a:b,y:h?b:a,z:e*d+m}})};b.pointCameraDistance=function(b,q){var t=q.options.chart.options3d,e=q.plotWidth/2;q=q.plotHeight/2;t=n(t.depth,1)*n(t.viewDistance,0)+t.depth;return Math.sqrt(Math.pow(e-b.plotX,2)+Math.pow(q-b.plotY,2)+Math.pow(t-b.plotZ,2))}})(w);(function(b){function r(a){var b=0,l,d;for(l=0;l<a.length;l++)d=(l+1)%a.length,b+=a[l].x*a[d].y-
a[d].x*a[l].y;return b/2}function n(a){var b=0,l;for(l=0;l<a.length;l++)b+=a[l].z;return a.length?b/a.length:0}function p(a,b,l,d,c,k,E,e){var f=[],B=k-c;return k>c&&k-c>Math.PI/2+.0001?(f=f.concat(p(a,b,l,d,c,c+Math.PI/2,E,e)),f=f.concat(p(a,b,l,d,c+Math.PI/2,k,E,e))):k<c&&c-k>Math.PI/2+.0001?(f=f.concat(p(a,b,l,d,c,c-Math.PI/2,E,e)),f=f.concat(p(a,b,l,d,c-Math.PI/2,k,E,e))):["C",a+l*Math.cos(c)-l*x*B*Math.sin(c)+E,b+d*Math.sin(c)+d*x*B*Math.cos(c)+e,a+l*Math.cos(k)+l*x*B*Math.sin(k)+E,b+d*Math.sin(k)-
d*x*B*Math.cos(k)+e,a+l*Math.cos(k)+E,b+d*Math.sin(k)+e]}var q=Math.cos,t=Math.PI,e=Math.sin,h=b.animObject,g=b.charts,c=b.color,m=b.defined,f=b.deg2rad,d=b.each,a=b.extend,k=b.inArray,v=b.map,z=b.merge,A=b.perspective,w=b.pick,D=b.SVGElement,C=b.SVGRenderer,u=b.wrap,x=4*(Math.sqrt(2)-1)/3/(t/2);u(C.prototype,"init",function(a){a.apply(this,[].slice.call(arguments,1));d([{name:"darker",slope:.6},{name:"brighter",slope:1.4}],function(a){this.definition({tagName:"filter",id:"highcharts-"+a.name,children:[{tagName:"feComponentTransfer",
children:[{tagName:"feFuncR",type:"linear",slope:a.slope},{tagName:"feFuncG",type:"linear",slope:a.slope},{tagName:"feFuncB",type:"linear",slope:a.slope}]}]})},this)});C.prototype.toLinePath=function(a,b){var l=[];d(a,function(a){l.push("L",a.x,a.y)});a.length&&(l[0]="M",b&&l.push("Z"));return l};C.prototype.cuboid=function(a){var d=this.g();a=this.cuboidPath(a);d.front=this.path(a[0]).attr({"class":"highcharts-3d-front",zIndex:a[3]}).add(d);d.top=this.path(a[1]).attr({"class":"highcharts-3d-top",
zIndex:a[4]}).add(d);d.side=this.path(a[2]).attr({"class":"highcharts-3d-side",zIndex:a[5]}).add(d);d.fillSetter=function(a){this.front.attr({fill:a});this.top.attr({fill:c(a).brighten(.1).get()});this.side.attr({fill:c(a).brighten(-.1).get()});this.color=a;return this};d.opacitySetter=function(a){this.front.attr({opacity:a});this.top.attr({opacity:a});this.side.attr({opacity:a});return this};d.attr=function(a){if(a.shapeArgs||m(a.x))a=this.renderer.cuboidPath(a.shapeArgs||a),this.front.attr({d:a[0],
zIndex:a[3]}),this.top.attr({d:a[1],zIndex:a[4]}),this.side.attr({d:a[2],zIndex:a[5]});else return b.SVGElement.prototype.attr.call(this,a);return this};d.animate=function(a,d,b){m(a.x)&&m(a.y)?(a=this.renderer.cuboidPath(a),this.front.attr({zIndex:a[3]}).animate({d:a[0]},d,b),this.top.attr({zIndex:a[4]}).animate({d:a[1]},d,b),this.side.attr({zIndex:a[5]}).animate({d:a[2]},d,b),this.attr({zIndex:-a[6]})):a.opacity?(this.front.animate(a,d,b),this.top.animate(a,d,b),this.side.animate(a,d,b)):D.prototype.animate.call(this,
a,d,b);return this};d.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return null};d.attr({zIndex:-a[6]});return d};C.prototype.cuboidPath=function(a){function d(a){return m[a]}var b=a.x,c=a.y,k=a.z,e=a.height,E=a.width,f=a.depth,m=[{x:b,y:c,z:k},{x:b+E,y:c,z:k},{x:b+E,y:c+e,z:k},{x:b,y:c+e,z:k},{x:b,y:c+e,z:k+f},{x:b+E,y:c+e,z:k+f},{x:b+E,y:c,z:k+f},{x:b,y:c,z:k+f}],m=A(m,g[this.chartIndex],a.insidePlotArea),k=function(a,b){var c=[];a=v(a,d);b=v(b,d);0>r(a)?c=a:0>r(b)&&
(c=b);return c};a=k([3,2,1,0],[7,6,5,4]);b=[4,5,2,3];c=k([1,6,7,0],b);k=k([1,2,5,6],[0,7,4,3]);return[this.toLinePath(a,!0),this.toLinePath(c,!0),this.toLinePath(k,!0),n(a),n(c),n(k),9E9*n(v(b,d))]};b.SVGRenderer.prototype.arc3d=function(b){function e(a){var b=!1,d={},c;for(c in a)-1!==k(c,t)&&(d[c]=a[c],delete a[c],b=!0);return b?d:!1}var l=this.g(),m=l.renderer,t="x y r innerR start end".split(" ");b=z(b);b.alpha*=f;b.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 a=l.parentGroup,b=l.attr("class");l.top.add(l);d(["out","inn","side1","side2"],function(d){l[d].addClass(b+" highcharts-3d-side").add(a)})};l.setPaths=function(a){var b=l.renderer.arc3dPath(a),d=100*b.zTop;l.attribs=a;l.top.attr({d:b.top,zIndex:b.zTop});l.inn.attr({d:b.inn,zIndex:b.zInn});l.out.attr({d:b.out,zIndex:b.zOut});l.side1.attr({d:b.side1,zIndex:b.zSide1});l.side2.attr({d:b.side2,zIndex:b.zSide2});l.zIndex=d;l.attr({zIndex:d});a.center&&(l.top.setRadialReference(a.center),
delete a.center)};l.setPaths(b);l.fillSetter=function(a){var b=c(a).brighten(-.1).get();this.fill=a;this.side1.attr({fill:b});this.side2.attr({fill:b});this.inn.attr({fill:b});this.out.attr({fill:b});this.top.attr({fill:a});return this};d(["opacity","translateX","translateY","visibility"],function(a){l[a+"Setter"]=function(a,b){l[b]=a;d(["out","inn","side1","side2","top"],function(d){l[d].attr(b,a)})}});u(l,"attr",function(b,d,c){var k;"object"===typeof d&&(k=e(d))&&(a(l.attribs,k),l.setPaths(l.attribs));
return b.call(this,d,c)});u(l,"animate",function(a,b,d,c){var k,l=this.attribs,f;delete b.center;delete b.z;delete b.depth;delete b.alpha;delete b.beta;f=h(w(d,this.renderer.globalAnimation));f.duration&&(b=z(b),k=e(b),b.dummy=1,k&&(f.step=function(a,b){function d(a){return l[a]+(w(k[a],l[a])-l[a])*b.pos}"dummy"===b.prop&&b.elem.setPaths(z(l,{x:d("x"),y:d("y"),r:d("r"),innerR:d("innerR"),start:d("start"),end:d("end")}))}),d=f);return a.call(this,b,d,c)});l.destroy=function(){this.top.destroy();this.out.destroy();
this.inn.destroy();this.side1.destroy();this.side2.destroy();D.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};C.prototype.arc3dPath=function(a){function b(a){a%=2*Math.PI;a>Math.PI&&(a=2*Math.PI-a);return a}var d=a.x,c=a.y,k=a.start,f=a.end-.00001,m=a.r,h=a.innerR,n=a.depth,g=a.alpha,v=a.beta,z=Math.cos(k),
r=Math.sin(k);a=Math.cos(f);var A=Math.sin(f),y=m*Math.cos(v),m=m*Math.cos(g),x=h*Math.cos(v),B=h*Math.cos(g),h=n*Math.sin(v),u=n*Math.sin(g),n=["M",d+y*z,c+m*r],n=n.concat(p(d,c,y,m,k,f,0,0)),n=n.concat(["L",d+x*a,c+B*A]),n=n.concat(p(d,c,x,B,f,k,0,0)),n=n.concat(["Z"]),C=0<v?Math.PI/2:0,v=0<g?0:Math.PI/2,C=k>-C?k:f>-C?-C:k,w=f<t-v?f:k<t-v?t-v:f,D=2*t-v,g=["M",d+y*q(C),c+m*e(C)],g=g.concat(p(d,c,y,m,C,w,0,0));f>D&&k<D?(g=g.concat(["L",d+y*q(w)+h,c+m*e(w)+u]),g=g.concat(p(d,c,y,m,w,D,h,u)),g=g.concat(["L",
d+y*q(D),c+m*e(D)]),g=g.concat(p(d,c,y,m,D,f,0,0)),g=g.concat(["L",d+y*q(f)+h,c+m*e(f)+u]),g=g.concat(p(d,c,y,m,f,D,h,u)),g=g.concat(["L",d+y*q(D),c+m*e(D)]),g=g.concat(p(d,c,y,m,D,w,0,0))):f>t-v&&k<t-v&&(g=g.concat(["L",d+y*Math.cos(w)+h,c+m*Math.sin(w)+u]),g=g.concat(p(d,c,y,m,w,f,h,u)),g=g.concat(["L",d+y*Math.cos(f),c+m*Math.sin(f)]),g=g.concat(p(d,c,y,m,f,w,0,0)));g=g.concat(["L",d+y*Math.cos(w)+h,c+m*Math.sin(w)+u]);g=g.concat(p(d,c,y,m,w,C,h,u));g=g.concat(["Z"]);v=["M",d+x*z,c+B*r];v=v.concat(p(d,
c,x,B,k,f,0,0));v=v.concat(["L",d+x*Math.cos(f)+h,c+B*Math.sin(f)+u]);v=v.concat(p(d,c,x,B,f,k,h,u));v=v.concat(["Z"]);z=["M",d+y*z,c+m*r,"L",d+y*z+h,c+m*r+u,"L",d+x*z+h,c+B*r+u,"L",d+x*z,c+B*r,"Z"];d=["M",d+y*a,c+m*A,"L",d+y*a+h,c+m*A+u,"L",d+x*a+h,c+B*A+u,"L",d+x*a,c+B*A,"Z"];A=Math.atan2(u,-h);c=Math.abs(f+A);a=Math.abs(k+A);k=Math.abs((k+f)/2+A);c=b(c);a=b(a);k=b(k);k*=1E5;f=1E5*a;c*=1E5;return{top:n,zTop:1E5*Math.PI+1,out:g,zOut:Math.max(k,f,c),inn:v,zInn:Math.max(k,f,c),side1:z,zSide1:.99*c,
side2:d,zSide2:.99*f}}})(w);(function(b){function r(b,m){var c=b.plotLeft,d=b.plotWidth+c,a=b.plotTop,k=b.plotHeight+a,e=c+b.plotWidth/2,g=a+b.plotHeight/2,h=Number.MAX_VALUE,n=-Number.MAX_VALUE,q=Number.MAX_VALUE,r=-Number.MAX_VALUE,u,x=1;u=[{x:c,y:a,z:0},{x:c,y:a,z:m}];p([0,1],function(a){u.push({x:d,y:u[a].y,z:u[a].z})});p([0,1,2,3],function(a){u.push({x:u[a].x,y:k,z:u[a].z})});u=t(u,b,!1);p(u,function(a){h=Math.min(h,a.x);n=Math.max(n,a.x);q=Math.min(q,a.y);r=Math.max(r,a.y)});c>h&&(x=Math.min(x,
1-Math.abs((c+e)/(h+e))%1));d<n&&(x=Math.min(x,(d-e)/(n-e)));a>q&&(x=0>q?Math.min(x,(a+g)/(-q+a+g)):Math.min(x,1-(a+g)/(q+g)%1));k<r&&(x=Math.min(x,Math.abs((k-g)/(r-g))));return x}var n=b.Chart,p=b.each,q=b.merge,t=b.perspective,e=b.pick,h=b.wrap;n.prototype.is3d=function(){return this.options.chart.options3d&&this.options.chart.options3d.enabled};n.prototype.propsRequireDirtyBox.push("chart.options3d");n.prototype.propsRequireUpdateSeries.push("chart.options3d");b.wrap(b.Chart.prototype,"isInsidePlot",
function(b){return this.is3d()||b.apply(this,[].slice.call(arguments,1))});var g=b.getOptions();q(!0,g,{chart:{options3d:{enabled:!1,alpha:0,beta:0,depth:100,fitToPlot:!0,viewDistance:25,frame:{bottom:{size:1},side:{size:1},back:{size:1}}}},defs:{style:{textContent:g.defs.style.textContent+"\n.highcharts-3d-top{filter: url(#highcharts-brighter)}\n.highcharts-3d-side{filter: url(#highcharts-darker)}"}}});h(n.prototype,"setClassName",function(b){b.apply(this,[].slice.call(arguments,1));this.is3d()&&
(this.container.className+=" highcharts-3d-chart")});b.wrap(b.Chart.prototype,"setChartSize",function(b){var c=this.options.chart.options3d;b.apply(this,[].slice.call(arguments,1));if(this.is3d()){var f=this.inverted,d=this.clipBox,a=this.margin;d[f?"y":"x"]=-(a[3]||0);d[f?"x":"y"]=-(a[0]||0);d[f?"height":"width"]=this.chartWidth+(a[3]||0)+(a[1]||0);d[f?"width":"height"]=this.chartHeight+(a[0]||0)+(a[2]||0);this.scale3d=1;!0===c.fitToPlot&&(this.scale3d=r(this,c.depth))}});h(n.prototype,"redraw",
function(b){this.is3d()&&(this.isDirtyBox=!0);b.apply(this,[].slice.call(arguments,1))});h(n.prototype,"renderSeries",function(b){var c=this.series.length;if(this.is3d())for(;c--;)b=this.series[c],b.translate(),b.render();else b.call(this)});n.prototype.retrieveStacks=function(b){var c=this.series,f={},d,a=1;p(this.series,function(k){d=e(k.options.stack,b?0:c.length-1-k.index);f[d]?f[d].series.push(k):(f[d]={series:[k],position:a},a++)});f.totalStacks=a+1;return f}})(w);(function(b){var r,n=b.Axis,
p=b.Chart,q=b.each,t=b.extend,e=b.merge,h=b.perspective,g=b.pick,c=b.splat,m=b.Tick,f=b.wrap;f(n.prototype,"setOptions",function(b,a){b.call(this,a);this.chart.is3d()&&(b=this.options,b.tickWidth=g(b.tickWidth,0),b.gridLineWidth=g(b.gridLineWidth,1))});f(n.prototype,"render",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var a=this.chart,d=a.renderer,c=a.options.chart.options3d,f=c.frame,e=f.bottom,m=f.back,f=f.side,g=c.depth,h=this.height,n=this.width,t=this.left,p=this.top;
this.isZAxis||(this.horiz?(e={x:t,y:p+(a.xAxis[0].opposite?-e.size:h),z:0,width:n,height:e.size,depth:g,insidePlotArea:!1},this.bottomFrame?this.bottomFrame.animate(e):this.bottomFrame=d.cuboid(e).attr({"class":"highcharts-3d-frame highcharts-3d-frame-bottom",zIndex:a.yAxis[0].reversed&&0<c.alpha?4:-1}).add()):(c={x:t+(a.yAxis[0].opposite?0:-f.size),y:p+(a.xAxis[0].opposite?-e.size:0),z:g,width:n+f.size,height:h+e.size,depth:m.size,insidePlotArea:!1},this.backFrame?this.backFrame.animate(c):this.backFrame=
d.cuboid(c).attr({"class":"highcharts-3d-frame highcharts-3d-frame-back",zIndex:-3}).add(),a={x:t+(a.yAxis[0].opposite?n:-f.size),y:p+(a.xAxis[0].opposite?-e.size:0),z:0,width:f.size,height:h+e.size,depth:g,insidePlotArea:!1},this.sideFrame?this.sideFrame.animate(a):this.sideFrame=d.cuboid(a).attr({"class":"highcharts-3d-frame highcharts-3d-frame-side",zIndex:-2}).add()))}});f(n.prototype,"getPlotLinePath",function(b){var a=b.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||null===a)return a;
var d=this.chart,c=d.options.chart.options3d,d=this.isZAxis?d.plotWidth:c.depth,c=this.opposite;this.horiz&&(c=!c);a=[this.swapZ({x:a[1],y:a[2],z:c?d:0}),this.swapZ({x:a[1],y:a[2],z:d}),this.swapZ({x:a[4],y:a[5],z:d}),this.swapZ({x:a[4],y:a[5],z:c?0:d})];a=h(a,this.chart,!1);return a=this.chart.renderer.toLinePath(a,!1)});f(n.prototype,"getLinePath",function(b){return this.chart.is3d()?[]:b.apply(this,[].slice.call(arguments,1))});f(n.prototype,"getPlotBandPath",function(b){if(!this.chart.is3d())return b.apply(this,
[].slice.call(arguments,1));var a=arguments,d=a[1],a=this.getPlotLinePath(a[2]);(d=this.getPlotLinePath(d))&&a?d.push("L",a[10],a[11],"L",a[7],a[8],"L",a[4],a[5],"L",a[1],a[2]):d=null;return d});f(m.prototype,"getMarkPath",function(b){var a=b.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return a;a=[this.axis.swapZ({x:a[1],y:a[2],z:0}),this.axis.swapZ({x:a[4],y:a[5],z:0})];a=h(a,this.axis.chart,!1);return a=["M",a[0].x,a[0].y,"L",a[1].x,a[1].y]});f(m.prototype,"getLabelPosition",
function(b){var a=b.apply(this,[].slice.call(arguments,1));this.axis.chart.is3d()&&(a=h([this.axis.swapZ({x:a.x,y:a.y,z:0})],this.axis.chart,!1)[0]);return a});b.wrap(n.prototype,"getTitlePosition",function(b){var a=this.chart.is3d(),d,c;a&&(c=this.axisTitleMargin,this.axisTitleMargin=0);d=b.apply(this,[].slice.call(arguments,1));a&&(d=h([this.swapZ({x:d.x,y:d.y,z:0})],this.chart,!1)[0],d[this.horiz?"y":"x"]+=(this.horiz?1:-1)*(this.opposite?-1:1)*c,this.axisTitleMargin=c);return d});f(n.prototype,
"drawCrosshair",function(b){var a=arguments;this.chart.is3d()&&a[2]&&(a[2]={plotX:a[2].plotXold||a[2].plotX,plotY:a[2].plotYold||a[2].plotY});b.apply(this,[].slice.call(a,1))});n.prototype.swapZ=function(b,a){if(this.isZAxis){a=a?0:this.chart.plotLeft;var d=this.chart;return{x:a+(d.yAxis[0].opposite?b.z:d.xAxis[0].width-b.z),y:b.y,z:b.x-a}}return b};r=b.ZAxis=function(){this.isZAxis=!0;this.init.apply(this,arguments)};t(r.prototype,n.prototype);t(r.prototype,{setOptions:function(b){b=e({offset:0,
lineWidth:0},b);n.prototype.setOptions.call(this,b);this.coll="zAxis"},setAxisSize:function(){n.prototype.setAxisSize.call(this);this.width=this.len=this.chart.options.chart.options3d.depth;this.right=this.chart.chartWidth-this.width-this.left},getSeriesExtremes:function(){var b=this,a=b.chart;b.hasVisibleSeries=!1;b.dataMin=b.dataMax=b.ignoreMinPadding=b.ignoreMaxPadding=null;b.buildStacks&&b.buildStacks();q(b.series,function(c){if(c.visible||!a.options.chart.ignoreHiddenSeries)b.hasVisibleSeries=
!0,c=c.zData,c.length&&(b.dataMin=Math.min(g(b.dataMin,c[0]),Math.min.apply(null,c)),b.dataMax=Math.max(g(b.dataMax,c[0]),Math.max.apply(null,c)))})}});f(p.prototype,"getAxes",function(b){var a=this,d=this.options,d=d.zAxis=c(d.zAxis||{});b.call(this);a.is3d()&&(this.zAxis=[],q(d,function(b,c){b.index=c;b.isX=!0;(new r(a,b)).setScale()}))})})(w);(function(b){function r(b){if(this.chart.is3d()){var c=this.chart.options.plotOptions.column.grouping;void 0===c||c||void 0===this.group.zIndex||this.zIndexSet||
(this.group.attr({zIndex:10*this.group.zIndex}),this.zIndexSet=!0)}b.apply(this,[].slice.call(arguments,1))}var n=b.each,p=b.perspective,q=b.pick,t=b.Series,e=b.seriesTypes,h=b.svg;b=b.wrap;b(e.column.prototype,"translate",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var c=this.chart,e=this.options,f=e.depth||25,d=(e.stacking?e.stack||0:this._i)*(f+(e.groupZPadding||1));!1!==e.grouping&&(d=0);d+=e.groupZPadding||1;n(this.data,function(a){if(null!==a.y){var b=a.shapeArgs,
e=a.tooltipPos;a.shapeType="cuboid";b.z=d;b.depth=f;b.insidePlotArea=!0;e=p([{x:e[0],y:e[1],z:d}],c,!0)[0];a.tooltipPos=[e.x,e.y]}});this.z=d}});b(e.column.prototype,"animate",function(b){if(this.chart.is3d()){var c=arguments[1],e=this.yAxis,f=this,d=this.yAxis.reversed;h&&(c?n(f.data,function(a){null!==a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,d||(a.shapeArgs.y=a.stackY?a.plotY+e.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(n(f.data,function(a){null!==
a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,f.options.animation))}),this.drawDataLabels(),f.animate=null))}else b.apply(this,[].slice.call(arguments,1))});b(e.column.prototype,"init",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var c=this.options,e=c.grouping,f=c.stacking,d=q(this.yAxis.options.reversedStacks,!0),a=0;if(void 0===e||e){e=this.chart.retrieveStacks(f);a=c.stack||0;for(f=0;f<e[a].series.length&&e[a].series[f]!==
this;f++);a=10*(e.totalStacks-e[a].position)+(d?f:-f);this.xAxis.reversed||(a=10*e.totalStacks-a)}c.zIndex=a}});b(t.prototype,"alignDataLabel",function(b){if(this.chart.is3d()&&("column"===this.type||"columnrange"===this.type)){var c=arguments[4],e={x:c.x,y:c.y,z:this.z},e=p([e],this.chart,!0)[0];c.x=e.x;c.y=e.y}b.apply(this,[].slice.call(arguments,1))});e.columnrange&&b(e.columnrange.prototype,"drawPoints",r);b(e.column.prototype,"drawPoints",r)})(w);(function(b){var r=b.deg2rad,n=b.each,p=b.seriesTypes,
q=b.svg;b=b.wrap;b(p.pie.prototype,"translate",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var e=this,h=e.options,g=h.depth||0,c=e.chart.options.chart.options3d,m=c.alpha,f=c.beta,d=h.stacking?(h.stack||0)*g:e._i*g,d=d+g/2;!1!==h.grouping&&(d=0);n(e.data,function(a){var b=a.shapeArgs;a.shapeType="arc3d";b.z=d;b.depth=.75*g;b.alpha=m;b.beta=f;b.center=e.center;b=(b.end+b.start)/2;a.slicedTranslation={translateX:Math.round(Math.cos(b)*h.slicedOffset*Math.cos(m*r)),translateY:Math.round(Math.sin(b)*
h.slicedOffset*Math.cos(m*r))}})}});b(p.pie.prototype.pointClass.prototype,"haloPath",function(b){var e=arguments;return this.series.chart.is3d()?[]:b.call(this,e[1])});b(p.pie.prototype,"drawPoints",function(b){b.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&n(this.points,function(b){var e=b.graphic;if(e)e[b.y&&b.visible?"show":"hide"]()})});b(p.pie.prototype,"drawDataLabels",function(b){if(this.chart.is3d()){var e=this.chart.options.chart.options3d;n(this.data,function(b){var g=b.shapeArgs,
c=g.r,h=(g.start+g.end)/2,f=b.labelPos,d=-c*(1-Math.cos((g.alpha||e.alpha)*r))*Math.sin(h),a=c*(Math.cos((g.beta||e.beta)*r)-1)*Math.cos(h);n([0,2,4],function(b){f[b]+=a;f[b+1]+=d})})}b.apply(this,[].slice.call(arguments,1))});b(p.pie.prototype,"addPoint",function(b){b.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update(this.userOptions,!0)});b(p.pie.prototype,"animate",function(b){if(this.chart.is3d()){var e=arguments[1],h=this.options.animation,g=this.center,c=this.group,m=this.markerGroup;
q&&(!0===h&&(h={}),e?(c.oldtranslateX=c.translateX,c.oldtranslateY=c.translateY,e={translateX:g[0],translateY:g[1],scaleX:.001,scaleY:.001},c.attr(e),m&&(m.attrSetters=c.attrSetters,m.attr(e))):(e={translateX:c.oldtranslateX,translateY:c.oldtranslateY,scaleX:1,scaleY:1},c.animate(e,h),m&&m.animate(e,h),this.animate=null))}else b.apply(this,[].slice.call(arguments,1))})})(w);(function(b){var r=b.perspective,n=b.pick,p=b.seriesTypes,q=b.wrap;q(p.scatter.prototype,"translate",function(b){b.apply(this,
[].slice.call(arguments,1));if(this.chart.is3d()){var e=this.chart,h=n(this.zAxis,e.options.zAxis[0]),g=[],c,m,f;for(f=0;f<this.data.length;f++)c=this.data[f],m=h.isLog&&h.val2lin?h.val2lin(c.z):c.z,c.plotZ=h.translate(m),c.isInside=c.isInside?m>=h.min&&m<=h.max:!1,g.push({x:c.plotX,y:c.plotY,z:c.plotZ});e=r(g,e,!0);for(f=0;f<this.data.length;f++)c=this.data[f],h=e[f],c.plotXold=c.plotX,c.plotYold=c.plotY,c.plotZold=c.plotZ,c.plotX=h.x,c.plotY=h.y,c.plotZ=h.z}});q(p.scatter.prototype,"init",function(b,
e,h){e.is3d()&&(this.axisTypes=["xAxis","yAxis","zAxis"],this.pointArrayMap=["x","y","z"],this.parallelArrays=["x","y","z"],this.directTouch=!0);b=b.apply(this,[e,h]);this.chart.is3d()&&(this.tooltipOptions.pointFormat=this.userOptions.tooltip?this.userOptions.tooltip.pointFormat||"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3ez: \x3cb\x3e{point.z}\x3c/b\x3e\x3cbr/\x3e":"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3ez: \x3cb\x3e{point.z}\x3c/b\x3e\x3cbr/\x3e");
return b});q(p.scatter.prototype,"pointAttribs",function(n,e){var h=n.apply(this,[].slice.call(arguments,1));e&&(h.zIndex=b.pointCameraDistance(e,this.chart));return h})})(w)});
