/* Highcharts JS v6.1.0 (2018-04-13) 3D features for Highcharts JS @license: www.highcharts.com/license */ (function(B){"object"===typeof module&&module.exports?module.exports=B:B(Highcharts)})(function(B){(function(b){var p=b.deg2rad,y=b.pick;b.perspective=function(t,g,A){var z=g.options.chart.options3d,n=A?g.inverted:!1,r=g.plotWidth/2,x=g.plotHeight/2,q=z.depth/2,f=y(z.depth,1)*y(z.viewDistance,0),a=g.scale3d||1,d=p*z.beta*(n?-1:1),z=p*z.alpha*(n?-1:1),h=Math.cos(z),k=Math.cos(-d),e=Math.sin(z),c=Math.sin(-d);A||(r+=g.plotLeft,x+=g.plotTop);return b.map(t,function(b){var d,l;l=(n?b.y:b.x)-r;var v=(n? b.x:b.y)-x,G=(b.z||0)-q;d=k*l-c*G;b=-e*c*l+h*v-k*e*G;l=h*c*l+e*v+h*k*G;v=0d&&f-d>Math.PI/2+.0001?(m=m.concat(p(a,e,c,b,d,d+Math.PI/2,k,l)),m=m.concat(p(a,e,c,b,d+Math.PI/2,f,k,l))):fMath.PI/2+.0001?(m=m.concat(p(a,e,c,b,d,d-Math.PI/2,k,l)),m=m.concat(p(a,e,c,b,d-Math.PI/2,f,k,l))):["C",a+c*Math.cos(d)-c*w*C*Math.sin(d)+k,e+b*Math.sin(d)+b*w*C*Math.cos(d)+l,a+c*Math.cos(f)+c*w*C*Math.sin(f)+k,e+b*Math.sin(f)- b*w*C*Math.cos(f)+l,a+c*Math.cos(f)+k,e+b*Math.sin(f)+l]}var y=Math.cos,t=Math.PI,g=Math.sin,A=b.animObject,z=b.charts,n=b.color,r=b.defined,x=b.deg2rad,q=b.each,f=b.extend,a=b.inArray,d=b.map,h=b.merge,k=b.perspective,e=b.pick,c=b.SVGElement,l=b.SVGRenderer,u=b.wrap,w=4*(Math.sqrt(2)-1)/3/(t/2);l.prototype.toLinePath=function(a,e){var c=[];q(a,function(a){c.push("L",a.x,a.y)});a.length&&(c[0]="M",e&&c.push("Z"));return c};l.prototype.toLineSegments=function(a){var e=[],c=!0;q(a,function(a){e.push(c? "M":"L",a.x,a.y);c=!c});return e};l.prototype.face3d=function(a){var c=this,m=this.createElement("path");m.vertexes=[];m.insidePlotArea=!1;m.enabled=!0;u(m,"attr",function(a,m){if("object"===typeof m&&(r(m.enabled)||r(m.vertexes)||r(m.insidePlotArea))){this.enabled=e(m.enabled,this.enabled);this.vertexes=e(m.vertexes,this.vertexes);this.insidePlotArea=e(m.insidePlotArea,this.insidePlotArea);delete m.enabled;delete m.vertexes;delete m.insidePlotArea;var d=k(this.vertexes,z[c.chartIndex],this.insidePlotArea), C=c.toLinePath(d,!0),d=b.shapeArea(d),d=this.enabled&&0b.faces.length;)c.faces.pop().destroy(); for(;c.faces.lengthb.faces.length;)c.faces.pop().destroy();for(;c.faces.lengthb.shapeArea(a)?m=[a,0]:0>b.shapeArea(c)&&(m=[c,1]);return m};D=w([3,2,1,0],[7,6,5,4]);a=D[0];u=D[1];D=w([1,6,7,0],[4,5,2,3]);v=D[0];h=D[1];D=w([1,2,5,6],[0,7,4,3]);w=D[0];D=D[1];1===D?g+=1E4*(1E3-c):D|| (g+=1E4*c);g+=10*(!h||0<=n&&180>=n||360>n&&357.5Math.PI&&(a=2*Math.PI-a);return a}var e=a.x,b=a.y,d=a.start,f=a.end-.00001,l=a.r,k=a.innerR,u=a.depth,h=a.alpha,q=a.beta,v=Math.cos(d),w=Math.sin(d);a=Math.cos(f);var n=Math.sin(f),r=l*Math.cos(q),l=l*Math.cos(h),z=k*Math.cos(q),x=k*Math.cos(h),k=u*Math.sin(q),A=u*Math.sin(h),u=["M",e+r*v,b+l*w],u=u.concat(p(e,b,r,l,d,f,0,0)),u=u.concat(["L",e+z*a,b+x*n]),u=u.concat(p(e,b,z,x,f,d,0,0)),u=u.concat(["Z"]),B= 0-B?d:f>-B?-B:d,E=fF&&dt-q&&dl&&(m=Math.min(m,1-Math.abs((a+e)/(l+e))%1));dq&&(m=0>q?Math.min(m,(h+c)/(-q+h+c)):Math.min(m,1-(h+c)/(q+c)%1));ka?-1:0},u=l([{x:d,y:e,z:c},{x:h,y:e,z:c},{x:h,y:e,z:0},{x:d,y:e,z:0}]),w=l([{x:d,y:k,z:0},{x:h,y:k,z:0},{x:h,y:k,z:c},{x:d,y:k,z:c}]),v=l([{x:d,y:k,z:0},{x:d,y:k,z:c},{x:d,y:e,z:c},{x:d,y:e,z:0}]),r=l([{x:h,y:k,z:c},{x:h,y:k,z:0},{x:h,y:e,z:0},{x:h,y:e,z:c}]),m=l([{x:d,y:e,z:0},{x:h,y:e,z:0},{x:h,y:k,z:0},{x:d,y:k,z:0}]),l=l([{x:d,y:k,z:c},{x:h,y:k,z:c}, {x:h,y:e,z:c},{x:d,y:e,z:c}]),t=!1,A=!1,x=!1,p=!1;g([].concat(q.xAxis,q.yAxis,q.zAxis),function(a){a&&(a.horiz?a.opposite?A=!0:t=!0:a.opposite?p=!0:x=!0)});var y=function(a,c,e){for(var b=["size","color","visible"],d={},f=0;fe*d[b][c]?b=f:e*d[f][c]===e*d[b][c]&&d[f].zthis.pos&&(b.isArray(this.start)||b.isArray(this.end))){var f=this.start||[1,0,0,1,0,0],a=this.end||[1,0,0,1,0,0];g=[];for(var d=0;6>d;d++)g.push(this.pos*a[d]+(1-this.pos)*f[d])}else g=this.end;this.elem.attr(this.prop, g,null,!0)}})(B);(function(b){function p(e,c,b){if(!e.chart.is3d()||"colorAxis"===e.coll)return c;var d=e.chart,l=z*d.options.chart.options3d.alpha,h=z*d.options.chart.options3d.beta,k=f(b&&e.options.title.position3d,e.options.labels.position3d);b=f(b&&e.options.title.skew3d,e.options.labels.skew3d);var m=d.frame3d,g=d.plotLeft,n=d.plotWidth+g,r=d.plotTop,t=d.plotHeight+r,d=!1,x=0,A=0,p={x:0,y:1,z:0};c=e.swapZ({x:c.x,y:c.y,z:0});if(e.isZAxis)if(e.opposite){if(null===m.axes.z.top)return{};A=c.y-r; c.x=m.axes.z.top.x;c.y=m.axes.z.top.y;g=m.axes.z.top.xDir;d=!m.top.frontFacing}else{if(null===m.axes.z.bottom)return{};A=c.y-t;c.x=m.axes.z.bottom.x;c.y=m.axes.z.bottom.y;g=m.axes.z.bottom.xDir;d=!m.bottom.frontFacing}else if(e.horiz)if(e.opposite){if(null===m.axes.x.top)return{};A=c.y-r;c.y=m.axes.x.top.y;c.z=m.axes.x.top.z;g=m.axes.x.top.xDir;d=!m.top.frontFacing}else{if(null===m.axes.x.bottom)return{};A=c.y-t;c.y=m.axes.x.bottom.y;c.z=m.axes.x.bottom.z;g=m.axes.x.bottom.xDir;d=!m.bottom.frontFacing}else if(e.opposite){if(null=== m.axes.y.right)return{};x=c.x-n;c.x=m.axes.y.right.x;c.z=m.axes.y.right.z;g=m.axes.y.right.xDir;g={x:g.z,y:g.y,z:-g.x}}else{if(null===m.axes.y.left)return{};x=c.x-g;c.x=m.axes.y.left.x;c.z=m.axes.y.left.z;g=m.axes.y.left.xDir}"chart"!==k&&("flap"===k?e.horiz?(h=Math.sin(l),l=Math.cos(l),e.opposite&&(h=-h),d&&(h=-h),p={x:g.z*h,y:l,z:-g.x*h}):g={x:Math.cos(h),y:0,z:Math.sin(h)}:"ortho"===k?e.horiz?(p=Math.cos(l),k=Math.sin(h)*p,l=-Math.sin(l),h=-p*Math.cos(h),p={x:g.y*h-g.z*l,y:g.z*k-g.x*h,z:g.x*l- g.y*k},l=1/Math.sqrt(p.x*p.x+p.y*p.y+p.z*p.z),d&&(l=-l),p={x:l*p.x,y:l*p.y,z:l*p.z}):g={x:Math.cos(h),y:0,z:Math.sin(h)}:e.horiz?p={x:Math.sin(h)*Math.sin(l),y:Math.cos(l),z:-Math.cos(h)*Math.sin(l)}:g={x:Math.cos(h),y:0,z:Math.sin(h)});c.x+=x*g.x+A*p.x;c.y+=x*g.y+A*p.y;c.z+=x*g.z+A*p.z;d=q([c],e.chart)[0];b?(0>a(q([c,{x:c.x+g.x,y:c.y+g.y,z:c.z+g.z},{x:c.x+p.x,y:c.y+p.y,z:c.z+p.z}],e.chart))&&(g={x:-g.x,y:-g.y,z:-g.z}),e=q([{x:c.x,y:c.y,z:c.z},{x:c.x+g.x,y:c.y+g.y,z:c.z+g.z},{x:c.x+p.x,y:c.y+p.y, z:c.z+p.z}],e.chart),d.matrix=[e[1].x-e[0].x,e[1].y-e[0].y,e[2].x-e[0].x,e[2].y-e[0].y,d.x,d.y],d.matrix[4]-=d.x*d.matrix[0]+d.y*d.matrix[2],d.matrix[5]-=d.x*d.matrix[1]+d.y*d.matrix[3]):d.matrix=null;return d}var y,t=b.addEvent,g=b.Axis,A=b.Chart,z=b.deg2rad,n=b.each,r=b.extend,x=b.merge,q=b.perspective,f=b.pick,a=b.shapeArea,d=b.splat,h=b.Tick,k=b.wrap;x(!0,g.prototype.defaultOptions,{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}});t(g,"afterSetOptions",function(){var a; this.chart.is3d&&this.chart.is3d()&&"colorAxis"!==this.coll&&(a=this.options,a.tickWidth=f(a.tickWidth,0),a.gridLineWidth=f(a.gridLineWidth,1))});k(g.prototype,"getPlotLinePath",function(a){var c=a.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||"colorAxis"===this.coll||null===c)return c;var b=this.chart,e=b.options.chart.options3d,e=this.isZAxis?b.plotWidth:e.depth,b=b.frame3d,c=[this.swapZ({x:c[1],y:c[2],z:0}),this.swapZ({x:c[1],y:c[2],z:e}),this.swapZ({x:c[4],y:c[5],z:0}),this.swapZ({x:c[4], y:c[5],z:e})],e=[];this.horiz?(this.isZAxis?(b.left.visible&&e.push(c[0],c[2]),b.right.visible&&e.push(c[1],c[3])):(b.front.visible&&e.push(c[0],c[2]),b.back.visible&&e.push(c[1],c[3])),b.top.visible&&e.push(c[0],c[1]),b.bottom.visible&&e.push(c[2],c[3])):(b.front.visible&&e.push(c[0],c[2]),b.back.visible&&e.push(c[1],c[3]),b.left.visible&&e.push(c[0],c[1]),b.right.visible&&e.push(c[2],c[3]));e=q(e,this.chart,!1);return this.chart.renderer.toLineSegments(e)});k(g.prototype,"getLinePath",function(a){return this.chart.is3d()&& "colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))});k(g.prototype,"getPlotBandPath",function(a){if(!this.chart.is3d()||"colorAxis"===this.coll)return a.apply(this,[].slice.call(arguments,1));var b=arguments,e=b[2],d=[],b=this.getPlotLinePath(b[1]),e=this.getPlotLinePath(e);if(b&&e)for(var f=0;f=p.min&&r<=p.max:!1):n.plotZ=0,z.push({x:t(n.plotXold,n.plotX),y:t(n.plotYold,n.plotY),z:t(n.plotZold,n.plotZ)});b=y(z,b,!0);for(x=0;xn&&(d[a[1]]+=d[a[0]]+e,d[a[0]]=-e,n=0);n+d[a[1]]>b[a[0]+"Axis"].len&&0!==d[a[1]]&&(d[a[1]]=b[a[0]+"Axis"].len-d[a[0]]);if(0!==d[a[1]]&&(d[a[0]]>=b[a[0]+"Axis"].len||d[a[0]]+d[a[1]]<=e)){for(var f in d)d[f]=0;c.outside3dPlot=!0}});c.shapeType="cuboid";d.z=k;d.depth=h;d.insidePlotArea=!0;f=g([{x:f[0],y:f[1],z:k}],a,!0)[0];c.tooltipPos=[f.x,f.y]}});b.z=k};q(n.column.prototype,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],d=this.yAxis,f=this,k=this.yAxis.reversed;x&&(a?t(f.data,function(a){null!== a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,k||(a.shapeArgs.y=a.stackY?a.plotY+d.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(t(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))});q(n.column.prototype,"plotGroup",function(b,a,d,h,k,e){this.chart.is3d()&&e&&!this[a]&& (this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(e)),this[a]=this.chart.columnGroup,this.chart.columnGroup.attr(this.getPlotBox()),this[a].survive=!0);return b.apply(this,Array.prototype.slice.call(arguments,1))});q(n.column.prototype,"setVisible",function(b,a){var d=this,f;d.chart.is3d()&&t(d.data,function(b){f=(b.visible=b.options.visible=a=void 0===a?!b.visible:a)?"visible":"hidden";d.options.data[r(b,d.data)]=b.options;b.graphic&&b.graphic.attr({visibility:f})}); b.apply(this,Array.prototype.slice.call(arguments,1))});n.column.prototype.handle3dGrouping=!0;y(z,"afterInit",function(){if(this.chart.is3d()&&this.handle3dGrouping){var b=this.options,a=b.grouping,d=b.stacking,h=A(this.yAxis.options.reversedStacks,!0),k=0;if(void 0===a||a){a=this.chart.retrieveStacks(d);k=b.stack||0;for(d=0;d