/*
 Highcharts JS v7.1.1 (2019-04-09)

 Gantt series

 (c) 2016-2019 Lars A. V. Cabrera

 License: www.highcharts.com/license
*/
(function(v){"object"===typeof module&&module.exports?(v["default"]=v,module.exports=v):"function"===typeof define&&define.amd?define("highcharts/modules/gantt",["highcharts"],function(H){v(H);v.Highcharts=H;return v}):v("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(v){function H(a,p,h,x){a.hasOwnProperty(p)||(a[p]=x.apply(null,h))}v=v?v._modules:{};H(v,"parts-gantt/CurrentDateIndicator.js",[v["parts/Globals.js"]],function(a){var p=a.addEvent,h=a.PlotLineOrBand,x=a.merge,u={currentDateIndicator:!0,
color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:void 0,rotation:0,style:{fontSize:"10px"}}};p(a.Axis,"afterSetOptions",function(){var a=this.options,h=a.currentDateIndicator;h&&("object"===typeof h?(h.label&&h.label.format&&(h.label.formatter=void 0),h=x(u,h)):h=x(u),h.value=new Date,a.plotLines||(a.plotLines=[]),a.plotLines.push(h))});p(h,"render",function(){var h=this.options,u,w;h.currentDateIndicator&&h.label&&(u=h.label.format,w=h.label.formatter,h.value=new Date,h.label.text=
"function"===typeof w?w(this):a.dateFormat(u,new Date),this.label&&this.label.attr({text:h.label.text}))})});H(v,"parts-gantt/GridAxis.js",[v["parts/Globals.js"]],function(a){var p=a.addEvent,h=a.dateFormat,x=a.defined,u=a.isArray,A=a.isNumber,C=function(B){return a.isObject(B,!0)},w=a.merge,G=a.pick,k=a.wrap,m=a.Axis,r=a.Tick,E={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};m.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};
m.prototype.isOuterAxis=function(){var a=this,d=-1,b=!0;a.chart.axes.forEach(function(c,l){c.side!==a.side||c.isNavigatorAxis()||(c===a?d=l:0<=d&&l>d&&(b=!1))});return b};m.prototype.getMaxLabelDimensions=function(a,d){var b={width:0,height:0};d.forEach(function(c){c=a[c];var d;C(c)&&(d=C(c.label)?c.label:{},c=d.getBBox?d.getBBox().height:0,d=A(d.textPxLength)?d.textPxLength:0,b.height=Math.max(c,b.height),b.width=Math.max(d,b.width))});return b};a.dateFormats.W=function(a){a=new Date(a);var d;a.setHours(0,
0,0,0);a.setDate(a.getDate()-(a.getDay()||7));d=new Date(a.getFullYear(),0,1);return Math.ceil(((a-d)/864E5+1)/7)};a.dateFormats.E=function(a){return h("%a",a,!0).charAt(0)};p(r,"afterGetLabelPosition",function(a){var d=this.label,b=this.axis,c=b.reversed,l=b.chart,f=b.options,g=f&&C(f.grid)?f.grid:{},f=b.options.labels,n=f.align,y=E[b.side],e=a.tickmarkOffset,q=b.tickPositions,t=this.pos-e,q=A(q[a.index+1])?q[a.index+1]-e:b.max+e,F=b.tickSize("tick",!0),e=u(F)?F[0]:0,F=F&&F[1]/2,D;!0===g.enabled&&
("top"===y?(g=b.top+b.offset,D=g-e):"bottom"===y?(D=l.chartHeight-b.bottom+b.offset,g=D+e):(g=b.top+b.len-b.translate(c?q:t),D=b.top+b.len-b.translate(c?t:q)),"right"===y?(y=l.chartWidth-b.right+b.offset,c=y+e):"left"===y?(c=b.left+b.offset,y=c-e):(y=Math.round(b.left+b.translate(c?q:t))-F,c=Math.round(b.left+b.translate(c?t:q))-F),this.slotWidth=c-y,a.pos.x="left"===n?y:"right"===n?c:y+(c-y)/2,a.pos.y=D+(g-D)/2,l=l.renderer.fontMetrics(f.style.fontSize,d.element),d=d.getBBox().height,f.useHTML?a.pos.y+=
l.b+-(d/2):(d=Math.round(d/l.h),a.pos.y+=(l.b-(l.h-l.f))/2+-((d-1)*l.h/2)),a.pos.x+=b.horiz&&f.x||0)});p(m,"afterTickSize",function(a){var d=this.maxLabelDimensions,b=this.options;!0===(b&&C(b.grid)?b.grid:{}).enabled&&(b=2*Math.abs(this.defaultLeftAxisOptions.labels.x),d=b+(this.horiz?d.height:d.width),u(a.tickSize)?a.tickSize[0]=d:a.tickSize=[d])});p(m,"afterGetTitlePosition",function(a){var d=this.options;if(!0===(d&&C(d.grid)?d.grid:{}).enabled){var b=this.axisTitle,c=b&&b.getBBox().width,l=this.horiz,
f=this.left,g=this.top,n=this.width,y=this.height,e=d.title,d=this.opposite,q=this.offset,t=this.tickSize()||[0],F=e.x||0,D=e.y||0,z=G(e.margin,l?5:10),b=this.chart.renderer.fontMetrics(e.style&&e.style.fontSize,b).f,t=(l?g+y:f)+t[0]/2*(d?-1:1)*(l?1:-1)+(this.side===E.bottom?b:0);a.titlePosition.x=l?f-c/2-z+F:t+(d?n:0)+q+F;a.titlePosition.y=l?t-(d?y:0)+(d?b:-b)/2+q+D:g-z+D}});k(m.prototype,"unsquish",function(a){var d=this.options;return!0===(d&&C(d.grid)?d.grid:{}).enabled&&this.categories?this.tickInterval:
a.apply(this,Array.prototype.slice.call(arguments,1))});p(m,"afterSetOptions",function(k){var d=this.options;k=k.userOptions;var b,c=d&&C(d.grid)?d.grid:{};!0===c.enabled&&(b=w(!0,{className:"highcharts-grid-axis "+(k.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0},
units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},k),"xAxis"===this.coll&&(x(k.linkedTo)&&!x(k.tickPixelInterval)&&(b.tickPixelInterval=350),x(k.tickPixelInterval)||!x(k.linkedTo)||x(k.tickPositioner)||x(k.tickInterval)||(b.tickPositioner=function(c,f){var d=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(d){var n,l,e,q,t=b.units;for(q=0;q<t.length;q++)if(t[q][0]===
d.unitName){n=q;break}if(t[n][1])return t[n+1]&&(e=t[n+1][0],l=(t[n+1][1]||[1])[0]),d=a.timeUnits[e],this.tickInterval=d*l,this.getTimeTicks({unitRange:d,count:l,unitName:e},c,f,this.options.startOfWeek)}})),w(!0,this.options,b),this.horiz&&(d.minPadding=G(k.minPadding,0),d.maxPadding=G(k.maxPadding,0)),A(d.grid.borderWidth)&&(d.tickWidth=d.lineWidth=c.borderWidth))});p(m,"afterSetAxisTranslation",function(){var a=this.options,d=a&&C(a.grid)?a.grid:{},b=this.tickPositions&&this.tickPositions.info,
c=this.userOptions.labels||{};this.horiz&&(!0===d.enabled&&this.series.forEach(function(b){b.options.pointRange=0}),b&&(!1===a.dateTimeLabelFormats[b.unitName].range||1<b.count)&&!x(c.align)&&(a.labels.align="left",x(c.x)||(a.labels.x=3)))});p(m,"trimTicks",function(){var a=this.options,d=a&&C(a.grid)?a.grid:{},b=this.categories,c=this.tickPositions,l=c[0],f=c[c.length-1],g=this.linkedParent&&this.linkedParent.min||this.min,n=this.linkedParent&&this.linkedParent.max||this.max,y=this.tickInterval;
!0!==d.enabled||b||!this.horiz&&!this.isLinked||((l>g||l<g&&l+y>g)&&!a.startOnTick&&(c[0]=g),(f<n||f>n&&f-y<n)&&!a.endOnTick&&(c[c.length-1]=n))});p(m,"afterRender",function(){var a=this.options,d=a&&C(a.grid)?a.grid:{},b,c,l,f,g,n,y=this.chart.renderer,e=this.horiz;if(!0===d.enabled&&(d=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),d=this.maxLabelDimensions.width+d,b=a.lineWidth,this.rightWall&&this.rightWall.destroy(),
c=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(e&&(d=c.height-1),b))){c=this.getLinePath(b);g=c.indexOf("M")+1;n=c.indexOf("L")+1;l=c.indexOf("M")+2;f=c.indexOf("L")+2;if(this.side===E.top||this.side===E.left)d=-d;e?(c[l]+=d,c[f]+=d):(c[g]+=d,c[n]+=d);this.axisLineExtra?this.axisLineExtra.animate({d:c}):this.axisLineExtra=y.path(c).attr({stroke:a.lineColor,"stroke-width":b,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}});
p(m,"init",function(r){function d(){var c=b.options,e=25/11,f=b.chart.renderer.fontMetrics(c.labels.style.fontSize);c.labels||(c.labels={});c.labels.align=G(c.labels.align,"center");b.categories||(c.showLastLabel=!1);b.horiz&&(c.tickLength=l.cellHeight||f.h*e);b.labelRotation=0;c.labels.rotation=0}var b=this,c=b.chart,l=(r=r.userOptions)&&C(r.grid)?r.grid:{},f,g,n;if(l.enabled)if(x(l.borderColor)&&(r.tickColor=r.lineColor=l.borderColor),u(l.columns)){g=0;for(n=l.columns.length;n--;)f=w(r,l.columns[n],
{type:"category"}),delete f.grid.columns,f=new m(b.chart,f),f.isColumn=!0,f.columnIndex=g,k(f,"labelFormatter",function(b){var e=this.axis,c=e.tickPositions,f=this.value,d=f===c[0],c=f===c[c.length-1],n=a.find(e.series[0].options.data,function(b){return b[e.isXAxis?"x":"y"]===f});this.isFirst=d;this.isLast=c;this.point=n;return b.call(this)}),g++;p(this,"afterInit",function(){a.erase(c.axes,this);a.erase(c[b.coll],this)})}else p(this,"afterInit",d)})});H(v,"modules/static-scale.src.js",[v["parts/Globals.js"]],
function(a){var p=a.Chart,h=a.pick;a.addEvent(a.Axis,"afterSetOptions",function(){this.horiz||!a.isNumber(this.options.staticScale)||this.chart.options.chart.height||(this.staticScale=this.options.staticScale)});p.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(p){var u=p.chart,x=!!u.initiatedScale&&u.options.animation,C=p.options.staticScale,w;p.staticScale&&a.defined(p.min)&&(w=h(p.unitLength,p.max+p.tickInterval-p.min)*C,w=Math.max(w,C),
C=w-u.plotHeight,1<=Math.abs(C)&&(u.plotHeight=w,u.redrawTrigger="adjustHeight",u.setSize(void 0,u.chartHeight+C,x)),p.series.forEach(function(a){(a=a.sharedClipKey&&u[a.sharedClipKey])&&a.attr({height:u.plotHeight})}))}),this.initiatedScale=!0);this.redrawTrigger=null};a.addEvent(p,"render",p.prototype.adjustHeight)});H(v,"parts-gantt/Tree.js",[v["parts/Globals.js"]],function(a){var p=a.extend,h=a.isNumber,x=a.pick,u=function(a,h){var w=a.reduce(function(a,m){var k=x(m.parent,"");void 0===a[k]&&
(a[k]=[]);a[k].push(m);return a},{});Object.keys(w).forEach(function(a,m){var k=w[a];""!==a&&-1===h.indexOf(a)&&(k.forEach(function(a){m[""].push(a)}),delete m[a])});return w},A=function(a,w,u,k,m,r){var E=0,B=0,d=r&&r.after,b=r&&r.before;w={data:k,depth:u-1,id:a,level:u,parent:w};var c,l;"function"===typeof b&&b(w,r);b=(m[a]||[]).map(function(b){var f=A(b.id,a,u+1,b,m,r),d=b.start;b=!0===b.milestone?d:b.end;c=!h(c)||d<c?d:c;l=!h(l)||b>l?b:l;E=E+1+f.descendants;B=Math.max(f.height+1,B);return f});
k&&(k.start=x(k.start,c),k.end=x(k.end,l));p(w,{children:b,descendants:E,height:B});"function"===typeof d&&d(w,r);return w};return{getListOfParents:u,getNode:A,getTree:function(a,h){var w=a.map(function(a){return a.id});a=u(a,w);return A("",null,1,null,a,h)}}});H(v,"mixins/tree-series.js",[v["parts/Globals.js"]],function(a){var p=a.extend,h=a.isArray,x=a.isObject,u=a.isNumber,A=a.merge,C=a.pick;return{getColor:function(h,p){var k=p.index,m=p.mapOptionsToLevel,r=p.parentColor,E=p.parentColorIndex,
B=p.series,d=p.colors,b=p.siblings,c=B.points,l=B.chart.options.chart,f,g,n,y;if(h){c=c[h.i];h=m[h.level]||{};if(m=c&&h.colorByPoint)g=c.index%(d?d.length:l.colorCount),f=d&&d[g];if(!B.chart.styledMode){d=c&&c.options.color;l=h&&h.color;if(n=r)n=(n=h&&h.colorVariation)&&"brightness"===n.key?a.color(r).brighten(k/b*n.to).get():r;n=C(d,l,f,n,B.color)}y=C(c&&c.options.colorIndex,h&&h.colorIndex,g,E,p.colorIndex)}return{color:n,colorIndex:y}},getLevelOptions:function(a){var w=null,k,m,r,E;if(x(a))for(w=
{},r=u(a.from)?a.from:1,E=a.levels,m={},k=x(a.defaults)?a.defaults:{},h(E)&&(m=E.reduce(function(a,d){var b,c;x(d)&&u(d.level)&&(c=A({},d),b="boolean"===typeof c.levelIsConstant?c.levelIsConstant:k.levelIsConstant,delete c.levelIsConstant,delete c.level,d=d.level+(b?0:r-1),x(a[d])?p(a[d],c):a[d]=c);return a},{})),E=u(a.to)?a.to:1,a=0;a<=E;a++)w[a]=A({},k,x(m[a])?m[a]:{});return w},setTreeValues:function G(a,m){var k=m.before,h=m.idRoot,B=m.mapIdToNode[h],d=m.points[a.i],b=d&&d.options||{},c=0,l=[];
p(a,{levelDynamic:a.level-(("boolean"===typeof m.levelIsConstant?m.levelIsConstant:1)?0:B.level),name:C(d&&d.name,""),visible:h===a.id||("boolean"===typeof m.visible?m.visible:!1)});"function"===typeof k&&(a=k(a,m));a.children.forEach(function(b,d){var f=p({},m);p(f,{index:d,siblings:a.children.length,visible:a.visible});b=G(b,f);l.push(b);b.visible&&(c+=b.val)});a.visible=0<c||a.visible;k=C(b.value,c);p(a,{children:l,childrenTotal:c,isLeaf:a.visible&&!c,val:k});return a},updateRootId:function(a){var k;
x(a)&&(k=x(a.options)?a.options:{},k=C(a.rootNode,k.rootId,""),x(a.userOptions)&&(a.userOptions.rootId=k),a.rootNode=k);return k}}});H(v,"modules/broken-axis.src.js",[v["parts/Globals.js"]],function(a){var p=a.addEvent,h=a.pick,x=a.extend,u=a.isArray,A=a.find,C=a.fireEvent,w=a.Axis,v=a.Series,k=function(a,k){return A(k,function(k){return k.from<a&&a<k.to})};x(w.prototype,{isInBreak:function(a,k){var m=a.repeat||Infinity,r=a.from,d=a.to-a.from;k=k>=r?(k-r)%m:m-(r-k)%m;return a.inclusive?k<=d:k<d&&
0!==k},isInAnyBreak:function(a,k){var m=this.options.breaks,r=m&&m.length,d,b,c;if(r){for(;r--;)this.isInBreak(m[r],a)&&(d=!0,b||(b=h(m[r].showPoints,!this.isXAxis)));c=d&&k?d&&!b:d}return c}});p(w,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});p(w,"afterSetTickPositions",function(){if(this.isBroken){var a=this.tickPositions,k=this.tickPositions.info,h=[],p;for(p=0;p<a.length;p++)this.isInAnyBreak(a[p])||h.push(a[p]);this.tickPositions=h;this.tickPositions.info=
k}});p(w,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});w.prototype.setBreaks=function(a,r){function m(b){var c=b,a,g;for(g=0;g<d.breakArray.length;g++)if(a=d.breakArray[g],a.to<=b)c-=a.len;else if(a.from>=b)break;else if(d.isInBreak(a,b)){c-=b-a.from;break}return c}function p(b){var c,a;for(a=0;a<d.breakArray.length&&!(c=d.breakArray[a],c.from>=b);a++)c.to<b?b+=c.len:d.isInBreak(c,b)&&(b+=c.len);return b}var d=this,b=u(a)&&!!a.length;d.isDirty=d.isBroken!==b;d.isBroken=b;
d.options.breaks=d.userOptions.breaks=a;d.forceRedraw=!0;b||d.val2lin!==m||(delete d.val2lin,delete d.lin2val);b&&(d.userOptions.ordinal=!1,d.val2lin=m,d.lin2val=p,d.setExtremes=function(b,a,f,d,n){if(this.isBroken){for(var c,e=this.options.breaks;c=k(b,e);)b=c.to;for(;c=k(a,e);)a=c.from;a<b&&(a=b)}w.prototype.setExtremes.call(this,b,a,f,d,n)},d.setAxisTranslation=function(b){w.prototype.setAxisTranslation.call(this,b);this.unitLength=null;if(this.isBroken){b=d.options.breaks;var c=[],a=[],g=0,n,
y,e=d.userMin||d.min,q=d.userMax||d.max,t=h(d.pointRangePadding,0),k,D;b.forEach(function(b){y=b.repeat||Infinity;d.isInBreak(b,e)&&(e+=b.to%y-e%y);d.isInBreak(b,q)&&(q-=q%y-b.from%y)});b.forEach(function(b){k=b.from;for(y=b.repeat||Infinity;k-y>e;)k-=y;for(;k<e;)k+=y;for(D=k;D<q;D+=y)c.push({value:D,move:"in"}),c.push({value:D+(b.to-b.from),move:"out",size:b.breakSize})});c.sort(function(b,e){return b.value===e.value?("in"===b.move?0:1)-("in"===e.move?0:1):b.value-e.value});n=0;k=e;c.forEach(function(b){n+=
"in"===b.move?1:-1;1===n&&"in"===b.move&&(k=b.value);0===n&&(a.push({from:k,to:b.value,len:b.value-k-(b.size||0)}),g+=b.value-k-(b.size||0))});d.breakArray=a;d.unitLength=q-e-g+t;C(d,"afterBreaks");d.staticScale?d.transA=d.staticScale:d.unitLength&&(d.transA*=(q-d.min+t)/d.unitLength);t&&(d.minPixelPadding=d.transA*d.minPointOffset);d.min=e;d.max=q}});h(r,!0)&&this.chart.redraw()};p(v,"afterGeneratePoints",function(){var a=this.xAxis,k=this.yAxis,h=this.points,p,d=h.length,b=this.options.connectNulls,
c;if(a&&k&&(a.options.breaks||k.options.breaks))for(;d--;)p=h[d],c=null===p.y&&!1===b,c||!a.isInAnyBreak(p.x,!0)&&!k.isInAnyBreak(p.y,!0)||(h.splice(d,1),this.data[d]&&this.data[d].destroyElements())});p(v,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,h(this.pointArrayMap,["y"]))});a.Series.prototype.drawBreaks=function(a,k){var m=this,r=m.points,d,b,c,l;a&&k.forEach(function(f){d=a.breakArray||[];b=a.isXAxis?a.min:h(m.options.threshold,a.min);r.forEach(function(g){l=
h(g["stack"+f.toUpperCase()],g[f]);d.forEach(function(f){c=!1;if(b<f.from&&l>f.to||b>f.from&&l<f.from)c="pointBreak";else if(b<f.from&&l>f.from&&l<f.to||b>f.from&&l>f.to&&l<f.from)c="pointInBreak";c&&C(a,c,{point:g,brk:f})})})})};a.Series.prototype.gappedPath=function(){var k=this.currentDataGrouping,h=k&&k.gapSize,k=this.options.gapSize,p=this.points.slice(),u=p.length-1,d=this.yAxis;if(k&&0<u)for("value"!==this.options.gapUnit&&(k*=this.closestPointRange),h&&h>k&&(k=h);u--;)p[u+1].x-p[u].x>k&&(h=
(p[u].x+p[u+1].x)/2,p.splice(u+1,0,{isNull:!0,x:h}),this.options.stacking&&(h=d.stacks[this.stackKey][h]=new a.StackItem(d,d.options.stackLabels,!1,h,this.stack),h.total=0));return this.getGraphPath(p)}});H(v,"parts-gantt/TreeGrid.js",[v["parts/Globals.js"],v["parts-gantt/Tree.js"],v["mixins/tree-series.js"]],function(a,p,h){var x=a.addEvent,u=function(b){return Array.prototype.slice.call(b,1)},A=a.defined,C=a.extend,w=a.find,v=a.fireEvent,k=h.getLevelOptions,m=a.merge,r=a.isNumber,E=function(b){return a.isObject(b,
!0)},B=a.isString,d=a.pick,b=a.wrap;h=a.Axis;var c=a.Tick,l=function(e,c){var a,f;for(a in c)c.hasOwnProperty(a)&&(f=c[a],b(e,a,f))},f=function(b,e){var c=b.collapseStart;b=b.collapseEnd;b>=e&&(c-=.5);return{from:c,to:b,showPoints:!1}},g=function(b){return Object.keys(b.mapOfPosToGridNode).reduce(function(e,c){c=+c;b.min<=c&&b.max>=c&&!b.isInAnyBreak(c)&&e.push(c);return e},[])},n=function(b,c){var e=b.options.breaks||[],a=f(c,b.max);return e.some(function(b){return b.from===a.from&&b.to===a.to})},
y=function(b,c){var e=b.options.breaks||[];b=f(c,b.max);e.push(b);return e},e=function(b,e){var c=b.options.breaks||[],a=f(e,b.max);return c.reduce(function(b,e){e.to===a.to&&e.from===a.from||b.push(e);return b},[])},q=function(b,e){var c=b.labelIcon,f=!c,q=e.renderer,g=e.xy,n=e.options,l=n.width,t=n.height,z=g.x-l/2-n.padding,g=g.y-t/2,k=e.collapsed?90:180,y=e.show&&a.isNumber(g);f&&(b.labelIcon=c=q.path(q.symbols[n.type](n.x,n.y,l,t)).addClass("highcharts-label-icon").add(e.group));y||c.attr({y:-9999});
q.styledMode||c.attr({"stroke-width":1,fill:d(e.color,"#666666")}).css({cursor:"pointer",stroke:n.lineColor,strokeWidth:n.lineWidth});c[f?"attr":"animate"]({translateX:z,translateY:g,rotation:k})},t=function(b,e,c){var a=[],f=[],d={},q={},g=-1,n="boolean"===typeof e?e:!1;b=p.getTree(b,{after:function(b){b=q[b.pos];var e=0,c=0;b.children.forEach(function(b){c+=b.descendants+1;e=Math.max(b.height+1,e)});b.descendants=c;b.height=e;b.collapsed&&f.push(b)},before:function(b){var e=E(b.data)?b.data:{},
c=B(e.name)?e.name:"",f=d[b.parent],f=E(f)?q[f.pos]:null,l=function(b){return b.name===c},t;n&&E(f)&&(t=w(f.children,l))?(l=t.pos,t.nodes.push(b)):l=g++;q[l]||(q[l]=t={depth:f?f.depth+1:0,name:c,nodes:[b],children:[],pos:l},-1!==l&&a.push(c),E(f)&&f.children.push(t));B(b.id)&&(d[b.id]=b);!0===e.collapsed&&(t.collapsed=!0);b.pos=l}});q=function(b,e){var c=function(b,a,f){var d=a+(-1===a?0:e-1),q=(d-a)/2,g=a+q;b.nodes.forEach(function(b){var e=b.data;E(e)&&(e.y=a+e.seriesIndex,delete e.seriesIndex);
b.pos=g});f[g]=b;b.pos=g;b.tickmarkOffset=q+.5;b.collapseStart=d+.5;b.children.forEach(function(b){c(b,d+1,f);d=b.collapseEnd-.5});b.collapseEnd=d+.5;return f};return c(b["-1"],-1,{})}(q,c);return{categories:a,mapOfIdToNode:d,mapOfPosToGridNode:q,collapsedNodes:f,tree:b}},F=function(b){b.target.axes.filter(function(b){return"treegrid"===b.options.type}).forEach(function(b){var e=b.options||{},c=e.labels,f,d=e.uniqueNames,q=0,e=b.series.reduce(function(b,e){e.visible&&(e.options.data.forEach(function(e){E(e)&&
(e.seriesIndex=q,b.push(e))}),!0===d&&q++);return b},[]),g=t(e,d,!0===d?q:1);b.categories=g.categories;b.mapOfPosToGridNode=g.mapOfPosToGridNode;b.hasNames=!0;b.tree=g.tree;b.series.forEach(function(b){var e=b.options.data.map(function(b){return E(b)?m(b):b});b.visible&&b.setData(e,!1)});b.mapOptionsToLevel=k({defaults:c,from:1,levels:c.levels,to:b.tree.height});f=a.addEvent(b,"foundExtremes",function(){g.collapsedNodes.forEach(function(e){e=y(b,e);b.setBreaks(e,!1)});f()})})};l(h.prototype,{init:function(b,
e,c){var a="treegrid"===c.type;a&&(x(e,"beforeRender",F),x(e,"beforeRedraw",F),c=m({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},c,{reversed:!0,grid:{columns:void 0}}));b.apply(this,[e,c]);a&&(this.hasNames=!0,this.options.showLastLabel=!0)},getMaxLabelDimensions:function(b){var e=this.options,c=e&&e.labels,e=c&&r(c.indentation)?e.labels.indentation:0,c=b.apply(this,
u(arguments)),a;"treegrid"===this.options.type&&this.mapOfPosToGridNode&&(a=this.mapOfPosToGridNode[-1].height,c.width+=e*(a-1));return c},generateTick:function(b,e){var a=E(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},f=this.ticks,d=f[e],q,g;"treegrid"===this.options.type?(g=this.mapOfPosToGridNode[e],(a=a[g.depth])&&(q={labels:a}),d?(d.parameters.category=g.name,d.options=q,d.addLabel()):f[e]=new c(this,e,null,void 0,{category:g.name,tickmarkOffset:g.tickmarkOffset,options:q})):b.apply(this,
u(arguments))},setTickInterval:function(b){var e=this.options;"treegrid"===e.type?(this.min=d(this.userMin,e.min,this.dataMin),this.max=d(this.userMax,e.max,this.dataMax),v(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.mapOfPosToGridNode?g(this):[]):b.apply(this,u(arguments))}});l(c.prototype,{getLabelPosition:function(b,e,c,a,f,q,g,n,l){var t=d(this.options&&this.options.labels,q);q=this.pos;var k=this.axis,y="treegrid"===k.options.type;
b=b.apply(this,[e,c,a,f,t,g,n,l]);y&&(e=t&&E(t.symbol)?t.symbol:{},t=t&&r(t.indentation)?t.indentation:0,q=(q=(k=k.mapOfPosToGridNode)&&k[q])&&q.depth||1,b.x+=e.width+2*e.padding+(q-1)*t);return b},renderLabel:function(b){var e=this,c=e.pos,f=e.axis,g=e.label,t=f.mapOfPosToGridNode,l=f.options,k=d(e.options&&e.options.labels,l&&l.labels),y=k&&E(k.symbol)?k.symbol:{},F=(t=t&&t[c])&&t.depth,l="treegrid"===l.type,D=!(!g||!g.element),h=-1<f.tickPositions.indexOf(c),c=f.chart.styledMode;l&&t&&D&&g.addClass("highcharts-treegrid-node-level-"+
F);b.apply(e,u(arguments));l&&t&&D&&0<t.descendants&&(f=n(f,t),q(e,{color:!c&&g.styles.color,collapsed:f,group:g.parentGroup,options:y,renderer:g.renderer,show:h,xy:g.xy}),y="highcharts-treegrid-node-"+(f?"expanded":"collapsed"),g.addClass("highcharts-treegrid-node-"+(f?"collapsed":"expanded")).removeClass(y),c||g.css({cursor:"pointer"}),[g,e.labelIcon].forEach(function(b){b.attachedTreeGridEvents||(a.addEvent(b.element,"mouseover",function(){var b=g;b.addClass("highcharts-treegrid-node-active");
b.renderer.styledMode||b.css({textDecoration:"underline"})}),a.addEvent(b.element,"mouseout",function(){var b=g,e=k,e=A(e.style)?e.style:{};b.removeClass("highcharts-treegrid-node-active");b.renderer.styledMode||b.css({textDecoration:e.textDecoration})}),a.addEvent(b.element,"click",function(){e.toggleCollapse()}),b.attachedTreeGridEvents=!0)}))}});C(c.prototype,{collapse:function(b){var e=this.axis,c=y(e,e.mapOfPosToGridNode[this.pos]);e.setBreaks(c,d(b,!0))},expand:function(b){var c=this.axis,a=
e(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(a,d(b,!0))},toggleCollapse:function(b){var c=this.axis,a;a=c.mapOfPosToGridNode[this.pos];a=n(c,a)?e(c,a):y(c,a);c.setBreaks(a,d(b,!0))}});h.prototype.utils={getNode:p.getNode}});H(v,"parts-gantt/PathfinderAlgorithms.js",[v["parts/Globals.js"]],function(a){function p(a,h,r){r=r||0;var k=a.length-1;h-=1e-7;for(var m,d;r<=k;)if(m=k+r>>1,d=h-a[m].xMin,0<d)r=m+1;else if(0>d)k=m-1;else return m;return 0<r?r-1:0}function h(a,h){for(var k=p(a,h.x+1)+1;k--;){var m;
if(m=a[k].xMax>=h.x)m=a[k],m=h.x<=m.xMax&&h.x>=m.xMin&&h.y<=m.yMax&&h.y>=m.yMin;if(m)return k}return-1}function x(a){var k=[];if(a.length){k.push("M",a[0].start.x,a[0].start.y);for(var h=0;h<a.length;++h)k.push("L",a[h].end.x,a[h].end.y)}return k}function u(a,h){a.yMin=C(a.yMin,h.yMin);a.yMax=A(a.yMax,h.yMax);a.xMin=C(a.xMin,h.xMin);a.xMax=A(a.xMax,h.xMax)}var A=Math.min,C=Math.max,w=Math.abs,v=a.pick;return{straight:function(a,h){return{path:["M",a.x,a.y,"L",h.x,h.y],obstacles:[{start:a,end:h}]}},
simpleConnect:a.extend(function(a,m,r){function k(b,c,e,a,f){b={x:b.x,y:b.y};b[c]=e[a||c]+(f||0);return b}function p(b,c,e){var a=w(c[e]-b[e+"Min"])>w(c[e]-b[e+"Max"]);return k(c,e,b,e+(a?"Max":"Min"),a?1:-1)}var d=[],b,c=v(r.startDirectionX,w(m.x-a.x)>w(m.y-a.y))?"x":"y",l=r.chartObstacles,f=h(l,a);r=h(l,m);var g;-1<r?(b=l[r],r=p(b,m,c),b={start:r,end:m},g=r):g=m;-1<f&&(l=l[f],r=p(l,a,c),d.push({start:a,end:r}),r[c]>a[c]===r[c]>g[c]&&(c="y"===c?"x":"y",m=a[c]<m[c],d.push({start:r,end:k(r,c,l,c+(m?
"Max":"Min"),m?1:-1)}),c="y"===c?"x":"y"));a=d.length?d[d.length-1].end:a;r=k(a,c,g);d.push({start:a,end:r});c=k(r,"y"===c?"x":"y",g);d.push({start:r,end:c});d.push(b);return{path:x(d),obstacles:d}},{requiresObstacles:!0}),fastAvoid:a.extend(function(a,m,r){function k(b,e,a){var c,f,d,q,g,t=b.x<e.x?1:-1;b.x<e.x?(c=b,f=e):(c=e,f=b);b.y<e.y?(q=b,d=e):(q=e,d=b);for(g=0>t?A(p(z,f.x),z.length-1):0;z[g]&&(0<t&&z[g].xMin<=f.x||0>t&&z[g].xMax>=c.x);){if(z[g].xMin<=f.x&&z[g].xMax>=c.x&&z[g].yMin<=d.y&&z[g].yMax>=
q.y)return a?{y:b.y,x:b.x<e.x?z[g].xMin-1:z[g].xMax+1,obstacle:z[g]}:{x:b.x,y:b.y<e.y?z[g].yMin-1:z[g].yMax+1,obstacle:z[g]};g+=t}return e}function B(b,e,c,a,f){var d=f.soft,q=f.hard,g=a?"x":"y",t={x:e.x,y:e.y},l={x:e.x,y:e.y};f=b[g+"Max"]>=d[g+"Max"];var d=b[g+"Min"]<=d[g+"Min"],n=b[g+"Max"]>=q[g+"Max"],q=b[g+"Min"]<=q[g+"Min"],y=w(b[g+"Min"]-e[g]),h=w(b[g+"Max"]-e[g]);c=10>w(y-h)?e[g]<c[g]:h<y;l[g]=b[g+"Min"];t[g]=b[g+"Max"];b=k(e,l,a)[g]!==l[g];e=k(e,t,a)[g]!==t[g];c=b?e?c:!0:e?!1:c;c=d?f?c:!0:
f?!1:c;return q?n?c:!0:n?!1:c}function d(b,e,c){if(b.x===e.x&&b.y===e.y)return[];var a=c?"x":"y",f,g,l,n,m=r.obstacleOptions.margin;f={soft:{xMin:q,xMax:t,yMin:F,yMax:D},hard:r.hardBounds};g=h(z,b);-1<g?(g=z[g],f=B(g,b,e,c,f),u(g,r.hardBounds),n=c?{y:b.y,x:g[f?"xMax":"xMin"]+(f?1:-1)}:{x:b.x,y:g[f?"yMax":"yMin"]+(f?1:-1)},l=h(z,n),-1<l&&(l=z[l],u(l,r.hardBounds),n[a]=f?C(g[a+"Max"]-m+1,(l[a+"Min"]+g[a+"Max"])/2):A(g[a+"Min"]+m-1,(l[a+"Max"]+g[a+"Min"])/2),b.x===n.x&&b.y===n.y?(y&&(n[a]=f?C(g[a+"Max"],
l[a+"Max"])+1:A(g[a+"Min"],l[a+"Min"])-1),y=!y):y=!1),b=[{start:b,end:n}]):(a=k(b,{x:c?e.x:b.x,y:c?b.y:e.y},c),b=[{start:b,end:{x:a.x,y:a.y}}],a[c?"x":"y"]!==e[c?"x":"y"]&&(f=B(a.obstacle,a,e,!c,f),u(a.obstacle,r.hardBounds),f={x:c?a.x:a.obstacle[f?"xMax":"xMin"]+(f?1:-1),y:c?a.obstacle[f?"yMax":"yMin"]+(f?1:-1):a.y},c=!c,b=b.concat(d({x:a.x,y:a.y},f,c))));return b=b.concat(d(b[b.length-1].end,e,!c))}function b(b,e,a){var c=A(b.xMax-e.x,e.x-b.xMin)<A(b.yMax-e.y,e.y-b.yMin);a=B(b,e,a,c,{soft:r.hardBounds,
hard:r.hardBounds});return c?{y:e.y,x:b[a?"xMax":"xMin"]+(a?1:-1)}:{x:e.x,y:b[a?"yMax":"yMin"]+(a?1:-1)}}var c=v(r.startDirectionX,w(m.x-a.x)>w(m.y-a.y)),l=c?"x":"y",f,g,n=[],y=!1,e=r.obstacleMetrics,q=A(a.x,m.x)-e.maxWidth-10,t=C(a.x,m.x)+e.maxWidth+10,F=A(a.y,m.y)-e.maxHeight-10,D=C(a.y,m.y)+e.maxHeight+10,z=r.chartObstacles;f=p(z,q);e=p(z,t);z=z.slice(f,e+1);-1<(e=h(z,m))&&(g=b(z[e],m,a),n.push({end:m,start:g}),m=g);for(;-1<(e=h(z,m));)f=0>m[l]-a[l],g={x:m.x,y:m.y},g[l]=z[e][f?l+"Max":l+"Min"]+
(f?1:-1),n.push({end:m,start:g}),m=g;a=d(a,m,c);a=a.concat(n.reverse());return{path:x(a),obstacles:a}},{requiresObstacles:!0})}});H(v,"parts-gantt/ArrowSymbols.js",[v["parts/Globals.js"]],function(a){a.SVGRenderer.prototype.symbols.arrow=function(a,h,x,u){return["M",a,h+u/2,"L",a+x,h,"L",a,h+u/2,"L",a+x,h+u]};a.SVGRenderer.prototype.symbols["arrow-half"]=function(p,h,x,u){return a.SVGRenderer.prototype.symbols.arrow(p,h,x/2,u)};a.SVGRenderer.prototype.symbols["triangle-left"]=function(a,h,x,u){return["M",
a+x,h,"L",a,h+u/2,"L",a+x,h+u,"Z"]};a.SVGRenderer.prototype.symbols["arrow-filled"]=a.SVGRenderer.prototype.symbols["triangle-left"];a.SVGRenderer.prototype.symbols["triangle-left-half"]=function(p,h,x,u){return a.SVGRenderer.prototype.symbols["triangle-left"](p,h,x/2,u)};a.SVGRenderer.prototype.symbols["arrow-filled-half"]=a.SVGRenderer.prototype.symbols["triangle-left-half"]});H(v,"parts-gantt/Pathfinder.js",[v["parts/Globals.js"],v["parts-gantt/PathfinderAlgorithms.js"]],function(a,p){function h(b){var a=
b.shapeArgs;return a?{xMin:a.x,xMax:a.x+a.width,yMin:a.y,yMax:a.y+a.height}:(a=b.graphic&&b.graphic.getBBox())?{xMin:b.plotX-a.width/2,xMax:b.plotX+a.width/2,yMin:b.plotY-a.height/2,yMax:b.plotY+a.height/2}:null}function x(b){for(var a=b.length,l=0,f,g,n=[],k=function(b,a,c){c=E(c,10);var e=b.yMax+c>a.yMin-c&&b.yMin-c<a.yMax+c,f=b.xMax+c>a.xMin-c&&b.xMin-c<a.xMax+c,g=e?b.xMin>a.xMax?b.xMin-a.xMax:a.xMin-b.xMax:Infinity,q=f?b.yMin>a.yMax?b.yMin-a.yMax:a.yMin-b.yMax:Infinity;return f&&e?c?k(b,a,Math.floor(c/
2)):Infinity:d(g,q)};l<a;++l)for(f=l+1;f<a;++f)g=k(b[l],b[f]),80>g&&n.push(g);n.push(80);return B(Math.floor(n.sort(function(b,a){return b-a})[Math.floor(n.length/10)]/2-1),1)}function u(b,a,d){this.init(b,a,d)}function A(b){this.init(b)}function C(b){if(b.options.pathfinder||b.series.reduce(function(b,a){a.options&&r(!0,a.options.connectors=a.options.connectors||{},a.options.pathfinder);return b||a.options&&a.options.pathfinder},!1))r(!0,b.options.connectors=b.options.connectors||{},b.options.pathfinder),
a.error('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}var w=a.defined,v=a.deg2rad,k=a.extend,m=a.addEvent,r=a.merge,E=a.pick,B=Math.max,d=Math.min;k(a.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});u.prototype={init:function(b,a,d){this.fromPoint=b;this.toPoint=a;this.options=d;this.chart=
b.series.chart;this.pathfinder=this.chart.pathfinder},renderPath:function(b,a,d){var c=this.chart,g=c.styledMode,n=c.pathfinder,l=!c.options.chart.forExport&&!1!==d,e=this.graphics&&this.graphics.path;n.group||(n.group=c.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(c.seriesGroup));n.group.translate(c.plotLeft,c.plotTop);e&&e.renderer||(e=c.renderer.path().add(n.group),g||e.attr({opacity:0}));e.attr(a);b={d:b};g||(b.opacity=1);e[l?"animate":"attr"](b,d);this.graphics=
this.graphics||{};this.graphics.path=e},addMarker:function(b,a,d){var c=this.fromPoint.series.chart,g=c.pathfinder,c=c.renderer,n="start"===b?this.fromPoint:this.toPoint,l=n.getPathfinderAnchorPoint(a),e,q;a.enabled&&(d="start"===b?{x:d[4],y:d[5]}:{x:d[d.length-5],y:d[d.length-4]},d=n.getRadiansToVector(d,l),l=n.getMarkerVector(d,a.radius,l),d=-d/v,a.width&&a.height?(e=a.width,q=a.height):e=q=2*a.radius,this.graphics=this.graphics||{},l={x:l.x-e/2,y:l.y-q/2,width:e,height:q,rotation:d,rotationOriginX:l.x,
rotationOriginY:l.y},this.graphics[b]?this.graphics[b].animate(l):(this.graphics[b]=c.symbol(a.symbol).addClass("highcharts-point-connecting-path-"+b+"-marker").attr(l).add(g.group),c.styledMode||this.graphics[b].attr({fill:a.color||this.fromPoint.color,stroke:a.lineColor,"stroke-width":a.lineWidth,opacity:0}).animate({opacity:1},n.series.options.animation)))},getPath:function(b){var c=this.pathfinder,d=this.chart,f=c.algorithms[b.type],g=c.chartObstacles;if("function"!==typeof f)a.error('"'+b.type+
'" is not a Pathfinder algorithm.');else return f.requiresObstacles&&!g&&(g=c.chartObstacles=c.getChartObstacles(b),d.options.connectors.algorithmMargin=b.algorithmMargin,c.chartObstacleMetrics=c.getObstacleMetrics(g)),f(this.fromPoint.getPathfinderAnchorPoint(b.startMarker),this.toPoint.getPathfinderAnchorPoint(b.endMarker),r({chartObstacles:g,lineObstacles:c.lineObstacles||[],obstacleMetrics:c.chartObstacleMetrics,hardBounds:{xMin:0,xMax:d.plotWidth,yMin:0,yMax:d.plotHeight},obstacleOptions:{margin:b.algorithmMargin},
startDirectionX:c.getAlgorithmStartDirection(b.startMarker)},b))},render:function(){var b=this.fromPoint,a=b.series,l=a.chart,f=l.pathfinder,g=r(l.options.connectors,a.options.connectors,b.options.connectors,this.options),n={};l.styledMode||(n.stroke=g.lineColor||b.color,n["stroke-width"]=g.lineWidth,g.dashStyle&&(n.dashstyle=g.dashStyle));n.class="highcharts-point-connecting-path highcharts-color-"+b.colorIndex;g=r(n,g);w(g.marker.radius)||(g.marker.radius=d(B(Math.ceil((g.algorithmMargin||8)/2)-
1,1),5));b=this.getPath(g);l=b.path;b.obstacles&&(f.lineObstacles=f.lineObstacles||[],f.lineObstacles=f.lineObstacles.concat(b.obstacles));this.renderPath(l,n,a.options.animation);this.addMarker("start",r(g.marker,g.startMarker),l);this.addMarker("end",r(g.marker,g.endMarker),l)},destroy:function(){this.graphics&&(a.objectEach(this.graphics,function(b){b.destroy()}),delete this.graphics)}};A.prototype={algorithms:p,init:function(b){this.chart=b;this.connections=[];m(b,"redraw",function(){this.pathfinder.update()})},
update:function(b){var c=this.chart,d=this,f=d.connections;d.connections=[];c.series.forEach(function(b){b.visible&&b.points.forEach(function(b){var e,f=b.options&&b.options.connect&&a.splat(b.options.connect);b.visible&&!1!==b.isInside&&f&&f.forEach(function(f){e=c.get("string"===typeof f?f:f.to);e instanceof a.Point&&e.series.visible&&e.visible&&!1!==e.isInside&&d.connections.push(new u(b,e,"string"===typeof f?{}:f))})})});for(var g=0,n,k,e=f.length,q=d.connections.length;g<e;++g){k=!1;for(n=0;n<
q;++n)if(f[g].fromPoint===d.connections[n].fromPoint&&f[g].toPoint===d.connections[n].toPoint){d.connections[n].graphics=f[g].graphics;k=!0;break}k||f[g].destroy()}delete this.chartObstacles;delete this.lineObstacles;d.renderConnections(b)},renderConnections:function(b){b?this.chart.series.forEach(function(b){var a=function(){var a=b.chart.pathfinder;(a&&a.connections||[]).forEach(function(a){a.fromPoint&&a.fromPoint.series===b&&a.render()});b.pathfinderRemoveRenderEvent&&(b.pathfinderRemoveRenderEvent(),
delete b.pathfinderRemoveRenderEvent)};!1===b.options.animation?a():b.pathfinderRemoveRenderEvent=m(b,"afterAnimate",a)}):this.connections.forEach(function(b){b.render()})},getChartObstacles:function(b){for(var a=[],d=this.chart.series,f=E(b.algorithmMargin,0),g,n=0,k=d.length;n<k;++n)if(d[n].visible)for(var e=0,q=d[n].points.length,t;e<q;++e)t=d[n].points[e],t.visible&&(t=h(t))&&a.push({xMin:t.xMin-f,xMax:t.xMax+f,yMin:t.yMin-f,yMax:t.yMax+f});a=a.sort(function(b,a){return b.xMin-a.xMin});w(b.algorithmMargin)||
(g=b.algorithmMargin=x(a),a.forEach(function(b){b.xMin-=g;b.xMax+=g;b.yMin-=g;b.yMax+=g}));return a},getObstacleMetrics:function(b){for(var a=0,d=0,f,g,n=b.length;n--;)f=b[n].xMax-b[n].xMin,g=b[n].yMax-b[n].yMin,a<f&&(a=f),d<g&&(d=g);return{maxHeight:d,maxWidth:a}},getAlgorithmStartDirection:function(b){var a="top"!==b.verticalAlign&&"bottom"!==b.verticalAlign;return"left"!==b.align&&"right"!==b.align?a?void 0:!1:a?!0:void 0}};a.Connection=u;a.Pathfinder=A;k(a.Point.prototype,{getPathfinderAnchorPoint:function(b){var a=
h(this),d,f;switch(b.align){case "right":d="xMax";break;case "left":d="xMin"}switch(b.verticalAlign){case "top":f="yMin";break;case "bottom":f="yMax"}return{x:d?a[d]:(a.xMin+a.xMax)/2,y:f?a[f]:(a.yMin+a.yMax)/2}},getRadiansToVector:function(b,a){w(a)||(a=h(this),a={x:(a.xMin+a.xMax)/2,y:(a.yMin+a.yMax)/2});return Math.atan2(a.y-b.y,b.x-a.x)},getMarkerVector:function(b,a,d){for(var c=2*Math.PI,g=h(this),n=g.xMax-g.xMin,l=g.yMax-g.yMin,e=Math.atan2(l,n),q=!1,n=n/2,t=l/2,k=g.xMin+n,g=g.yMin+t,D=k,z=
g,m={},r=1,p=1;b<-Math.PI;)b+=c;for(;b>Math.PI;)b-=c;c=Math.tan(b);b>-e&&b<=e?(p=-1,q=!0):b>e&&b<=Math.PI-e?p=-1:b>Math.PI-e||b<=-(Math.PI-e)?(r=-1,q=!0):r=-1;q?(D+=r*n,z+=p*n*c):(D+=l/(2*c)*r,z+=p*t);d.x!==k&&(D=d.x);d.y!==g&&(z=d.y);m.x=D+a*Math.cos(b);m.y=z-a*Math.sin(b);return m}});a.Chart.prototype.callbacks.push(function(b){!1!==b.options.connectors.enabled&&(C(b),this.pathfinder=new A(this),this.pathfinder.update(!0))})});H(v,"modules/xrange.src.js",[v["parts/Globals.js"]],function(a){var p=
a.addEvent,h=a.defined,x=a.Color,u=a.seriesTypes.column,A=a.correctFloat,v=a.isNumber,w=a.isObject,G=a.merge,k=a.pick,m=a.seriesType,r=a.Axis,E=a.Point,B=a.Series;m("xrange","column",{colorByPoint:!0,dataLabels:{formatter:function(){var a=this.point.partialFill;w(a)&&(a=a.amount);h(a)||(a=0);return A(100*a)+"%"},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.yCategory}\x3c/b\x3e\x3cbr/\x3e'},
borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:a.seriesTypes.line.prototype.animate,cropShoulder:1,getExtremesFromAll:!0,autoIncrement:a.noop,getColumnMetrics:function(){function a(){c.series.forEach(function(b){var a=b.xAxis;b.xAxis=b.yAxis;b.yAxis=a})}var b,c=this.chart;a();b=u.prototype.getColumnMetrics.call(this);a();return b},cropData:function(a,b,c,l){b=B.prototype.cropData.call(this,this.x2Data,b,c,l);b.xData=a.slice(b.start,b.end);return b},
findPointIndex:function(d){var b=this.data,c=this.points,l=d.id,f,g;l&&(g=(f=a.find(b,function(b){return b.id===l}))?f.index:void 0);void 0===g&&(g=(f=a.find(b,function(b){return b.x===d.x&&b.x2===d.x2&&!(c[g]&&c[g].touched)}))?f.index:void 0);this.cropped&&g>=this.cropStart&&(g-=this.cropStart);return g},translatePoint:function(a){var b=this.xAxis,c=this.yAxis,d=this.columnMetrics,f=this.options,g=f.minPointLength||0,n=a.plotX,y=k(a.x2,a.x+(a.len||0)),e=b.translate(y,0,0,0,1),y=Math.abs(e-n),q=this.chart.inverted,
t=k(f.borderWidth,1)%2/2,F=d.offset,D=Math.round(d.width);g&&(g-=y,0>g&&(g=0),n-=g/2,e+=g/2);n=Math.max(n,-10);e=Math.min(Math.max(e,-10),b.len+10);h(a.options.pointWidth)&&(F-=(Math.ceil(a.options.pointWidth)-D)/2,D=Math.ceil(a.options.pointWidth));f.pointPlacement&&v(a.plotY)&&c.categories&&(a.plotY=c.translate(a.y,0,1,0,1,f.pointPlacement));a.shapeArgs={x:Math.floor(Math.min(n,e))+t,y:Math.floor(a.plotY+F)+t,width:Math.round(Math.abs(e-n)),height:D,r:this.options.borderRadius};f=a.shapeArgs.x;
g=f+a.shapeArgs.width;0>f||g>b.len?(f=Math.min(b.len,Math.max(0,f)),g=Math.max(0,Math.min(g,b.len)),e=g-f,a.dlBox=G(a.shapeArgs,{x:f,width:g-f,centerX:e?e/2:null})):a.dlBox=null;q?(a.tooltipPos[1]+=y/2*(b.reversed?1:-1),a.tooltipPos[0]+=d.width/2,a.tooltipPos[1]=Math.max(Math.min(a.tooltipPos[1],b.len-1),0),a.tooltipPos[0]=Math.max(Math.min(a.tooltipPos[0],c.len-1),0)):(a.tooltipPos[0]+=y/2*(b.reversed?-1:1),a.tooltipPos[1]-=d.width/2,a.tooltipPos[0]=Math.max(Math.min(a.tooltipPos[0],b.len-1),0),
a.tooltipPos[1]=Math.max(Math.min(a.tooltipPos[1],c.len-1),0));if(c=a.partialFill)w(c)&&(c=c.amount),v(c)||(c=0),b=a.shapeArgs,a.partShapeArgs={x:b.x,y:b.y,width:b.width,height:b.height,r:this.options.borderRadius},a.clipRectArgs={x:b.x,y:b.y,width:Math.max(Math.round(y*c+(a.plotX-n)),0),height:b.height}},translate:function(){u.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},this)},drawPoint:function(a,b){var c=this.options,d=this.chart.renderer,f=
a.graphic,g=a.shapeType,n=a.shapeArgs,h=a.partShapeArgs,e=a.clipRectArgs,q=a.partialFill,t=c.stacking&&!c.borderRadius,F=a.state,D=c.states[F||"normal"]||{},z=void 0===F?"attr":"animate",F=this.pointAttribs(a,F),D=k(this.chart.options.chart.animation,D.animation);if(a.isNull)f&&(a.graphic=f.destroy());else{if(f)a.graphicOriginal[b](n);else a.graphic=f=d.g("point").addClass(a.getClassName()).add(a.group||this.group),a.graphicOriginal=d[g](G(n)).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(f);
h&&(a.graphicOverlay?(a.graphicOverlay[b](G(h)),a.clipRect.animate(G(e))):(a.clipRect=d.clipRect(e.x,e.y,e.width,e.height),a.graphicOverlay=d[g](h).addClass("highcharts-partfill-overlay").add(f).clip(a.clipRect)));this.chart.styledMode||(a.graphicOriginal.animate(F,D).shadow(c.shadow,null,t),h&&(w(q)||(q={}),w(c.partialFill)&&(q=G(q,c.partialFill)),b=q.fill||x(F.fill).brighten(-.3).get()||x(a.color||this.color).brighten(-.3).get(),F.fill=b,a.graphicOverlay[z](F,D).shadow(c.shadow,null,t)))}},drawPoints:function(){var a=
this,b=a.getAnimationVerb();a.points.forEach(function(c){a.drawPoint(c,b)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{resolveColor:function(){var a,b=this.series;if(b.options.colorByPoint&&!this.options.color){a=b.options.colors||b.chart.options.colors;var c=this.y%(a?a.length:b.chart.options.chart.colorCount);a=a&&a[c];b.chart.styledMode||(this.color=a);this.options.colorIndex||(this.colorIndex=c)}else this.color||(this.color=
b.color)},init:function(){E.prototype.init.apply(this,arguments);this.y||(this.y=0);return this},setState:function(){E.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},getLabelConfig:function(){var a=E.prototype.getLabelConfig.call(this),b=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=b&&b[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});p(r,"afterGetSeriesExtremes",
function(){var a=this.series,b,c;this.isXAxis&&(b=k(this.dataMax,-Number.MAX_VALUE),a.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>b&&(b=a,c=!0)})}),c&&(this.dataMax=b))})});H(v,"parts-gantt/GanttSeries.js",[v["parts/Globals.js"]],function(a){var p=a.dateFormat,h=a.isObject,x=a.isNumber,u=a.merge,A=a.pick,v=a.seriesType,w=a.stop,G=a.seriesTypes.xrange;v("gantt","xrange",{grouping:!1,dataLabels:{enabled:!0,formatter:function(){var a=this.point.partialFill;h(a)&&(a=a.amount);if(x(a)&&
0<a)return 100*a+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:null,pointFormatter:function(){var k=this.series,h=k.chart.tooltip,r=k.xAxis,u=r.options.dateTimeLabelFormats,w=r.options.startOfWeek,d=k.tooltipOptions,b=d.xDateFormat,c=this.end?this.end-this.start:0,k=this.options.milestone,r="\x3cb\x3e"+(this.name||this.yCategory)+"\x3c/b\x3e";if(d.pointFormat)return this.tooltipFormatter(d.pointFormat);b||(b=a.splat(h.getDateFormat(c,
this.start,w,u))[0]);h=p(b,this.start);u=p(b,this.end);r+="\x3cbr/\x3e";return k?r+("Date "+h+"\x3cbr/\x3e"):r+("Start: "+h+"\x3cbr/\x3e")+("End: "+u+"\x3cbr/\x3e")}},connectors:{type:"simpleConnect",animation:{reversed:!0},startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}},{pointArrayMap:["start","end","y"],keyboardMoveVertical:!1,translatePoint:function(a){var k,h;G.prototype.translatePoint.call(this,a);a.options.milestone&&(k=
a.shapeArgs,h=k.height,a.shapeArgs={x:k.x-h/2,y:k.y,width:h,height:h})},drawPoint:function(a,h){var k=this.options,m=this.chart.renderer,p=a.shapeArgs,d=a.plotY,b=a.graphic,c=a.selected&&"select",l=k.stacking&&!k.borderRadius;a.options.milestone?x(d)&&null!==a.y?(p=m.symbols.diamond(p.x,p.y,p.width,p.height),b?(w(b),b[h]({d:p})):a.graphic=m.path(p).addClass(a.getClassName(),!0).add(a.group||this.group),this.chart.styledMode||a.graphic.attr(this.pointAttribs(a,c)).shadow(k.shadow,null,l)):b&&(a.graphic=
b.destroy()):G.prototype.drawPoint.call(this,a,h)},setData:a.Series.prototype.setData,setGanttPointAliases:function(a){function h(h,k){void 0!==k&&(a[h]=k)}h("x",A(a.start,a.x));h("x2",A(a.end,a.x2));h("partialFill",A(a.completed,a.partialFill));h("connect",A(a.dependency,a.connect))}},u(G.prototype.pointClass.prototype,{applyOptions:function(h,m){h=u(h);a.seriesTypes.gantt.prototype.setGanttPointAliases(h);return h=G.prototype.pointClass.prototype.applyOptions.call(this,h,m)}}))});H(v,"parts-gantt/GanttChart.js",
[v["parts/Globals.js"]],function(a){var p=a.merge,h=a.splat,x=a.Chart;a.ganttChart=function(u,A,v){var w="string"===typeof u||u.nodeName,C=A.series,k=a.getOptions(),m,r=A;A=arguments[w?1:0];a.isArray(A.xAxis)||(A.xAxis=[A.xAxis||{},{}]);A.xAxis=A.xAxis.map(function(a,h){1===h&&(m=0);return p(k.xAxis,{grid:{enabled:!0},opposite:!0,linkedTo:m},a,{type:"datetime"})});A.yAxis=h(A.yAxis||{}).map(function(a){return p(k.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:a.categories?a.type:"treegrid"},
a)});A.series=null;A=p(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1}},A,{isGantt:!0});A.series=r.series=C;A.series.forEach(function(h){h.data.forEach(function(h){a.seriesTypes.gantt.prototype.setGanttPointAliases(h)})});return w?new x(u,A,v):new x(A,A)}});H(v,"parts/Scrollbar.js",[v["parts/Globals.js"]],function(a){function p(b,a,d){this.init(b,a,d)}var h=a.addEvent,x=a.Axis,u=a.correctFloat,v=a.defaultOptions,C=a.defined,w=a.destroyObjectProperties,G=a.fireEvent,k=a.hasTouch,m=a.merge,
r=a.pick,E=a.removeEvent,B,d={height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};v.scrollbar=m(!0,d,v.scrollbar);a.swapXY=B=function(b,a){var c=b.length,
f;if(a)for(a=0;a<c;a+=3)f=b[a+1],b[a+1]=b[a+2],b[a+2]=f;return b};p.prototype={init:function(a,c,h){this.scrollbarButtons=[];this.renderer=a;this.userOptions=c;this.options=m(d,c);this.chart=h;this.size=r(this.options.size,this.options.height);c.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,c=this.options,d=this.size,f=this.chart.styledMode,g;this.group=g=a.g("scrollbar").attr({zIndex:c.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,
r:c.trackBorderRadius||0,height:d,width:d}).add(g);f||this.track.attr({fill:c.trackBackgroundColor,stroke:c.trackBorderColor,"stroke-width":c.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(g);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:c.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(B(["M",-3,d/4,"L",-3,2*d/3,"M",0,d/4,"L",0,2*d/3,
"M",3,d/4,"L",3,2*d/3],c.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);f||(this.scrollbar.attr({fill:c.barBackgroundColor,stroke:c.barBorderColor,"stroke-width":c.barBorderWidth}),this.scrollbarRifles.attr({stroke:c.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,
c,d,f){var b=this.options.vertical,n=0,h=this.rendered?"animate":"attr";this.x=a;this.y=c+this.trackBorderWidth;this.width=d;this.xOffset=this.height=f;this.yOffset=n;b?(this.width=this.yOffset=d=n=this.size,this.xOffset=c=0,this.barWidth=f-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=f=c=this.size,this.barWidth=d-2*f,this.y+=this.options.margin);this.group[h]({translateX:a,translateY:this.y});this.track[h]({width:d,height:f});this.scrollbarButtons[1][h]({translateX:b?0:d-c,translateY:b?
f-n:0})},drawScrollbarButton:function(a){var b=this.renderer,d=this.scrollbarButtons,f=this.options,g=this.size,n;n=b.g().add(this.group);d.push(n);n=b.rect().addClass("highcharts-scrollbar-button").add(n);this.chart.styledMode||n.attr({stroke:f.buttonBorderColor,"stroke-width":f.buttonBorderWidth,fill:f.buttonBackgroundColor});n.attr(n.crisp({x:-.5,y:-.5,width:g+1,height:g+1,r:f.buttonBorderRadius},n.strokeWidth()));n=b.path(B(["M",g/2+(a?-1:1),g/2-3,"L",g/2+(a?-1:1),g/2+3,"L",g/2+(a?2:-2),g/2],
f.vertical)).addClass("highcharts-scrollbar-arrow").add(d[a]);this.chart.styledMode||n.attr({fill:f.buttonArrowColor})},setRange:function(a,c){var b=this.options,f=b.vertical,g=b.minWidth,d=this.barWidth,h,e,q=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";C(d)&&(a=Math.max(a,0),h=Math.ceil(d*a),this.calculatedWidth=e=u(d*Math.min(c,1)-h),e<g&&(h=(d-g+e)*a,e=g),g=Math.floor(h+this.xOffset+this.yOffset),d=e/2-.5,this.from=a,this.to=c,f?(this.scrollbarGroup[q]({translateY:g}),
this.scrollbar[q]({height:e}),this.scrollbarRifles[q]({translateY:d}),this.scrollbarTop=g,this.scrollbarLeft=0):(this.scrollbarGroup[q]({translateX:g}),this.scrollbar[q]({width:e}),this.scrollbarRifles[q]({translateX:d}),this.scrollbarLeft=g,this.scrollbarTop=0),12>=e?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===b.showFull&&(0>=a&&1<=c?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),
f=a.options.vertical?"chartY":"chartX",g=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][f]||(c=a.cursorToScrollbarPosition(c)[f],f=a[f],f=c-f,a.hasDragged=!0,a.updatePosition(g[0]+f,g[1]+f),a.hasDragged&&G(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&G(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=
function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var c=u(a.to-a.from)*a.options.step;a.updatePosition(u(a.from-c),u(a.to-c));G(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var c=(a.to-a.from)*a.options.step;a.updatePosition(a.from+c,a.to+c);G(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};
a.trackClick=function(b){var c=a.chart.pointer.normalize(b),f=a.to-a.from,g=a.y+a.scrollbarTop,d=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>g||!a.options.vertical&&c.chartX>d?a.updatePosition(a.from+f,a.to+f):a.updatePosition(a.from-f,a.to-f);G(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-
this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,c){1<c&&(a=u(1-u(c-a)),c=1);0>a&&(c=u(c-a),a=0);this.from=a;this.to=c},update:function(a){this.destroy();this.init(this.chart.renderer,m(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],c=this.scrollbarButtons,d=this.scrollbarGroup.element,f=this.mouseDownHandler,g=this.mouseMoveHandler,n=this.mouseUpHandler,a=[[c[a[0]].element,"click",this.buttonToMinClick],[c[a[1]].element,"click",this.buttonToMaxClick],
[this.track.element,"click",this.trackClick],[d,"mousedown",f],[d.ownerDocument,"mousemove",g],[d.ownerDocument,"mouseup",n]];k&&a.push([d,"touchstart",f],[d.ownerDocument,"touchmove",g],[d.ownerDocument,"touchend",n]);a.forEach(function(a){h.apply(null,a)});this._events=a},removeEvents:function(){this._events.forEach(function(a){E.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(a){this[a]&&
this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,w(a.scrollbarButtons))}};a.Scrollbar||(h(x,"afterInit",function(){var b=this;b.options&&b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new p(b.chart.renderer,b.options.scrollbar,b.chart),h(b.scrollbar,"changed",function(c){var d=Math.min(r(b.options.min,b.min),b.min,b.dataMin),f=Math.max(r(b.options.max,b.max),
b.max,b.dataMax)-d,g;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(g=d+f*this.to,d+=f*this.from):(g=d+f*(1-this.from),d+=f*(1-this.to));r(this.options.liveRedraw,a.svg&&!a.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===c.DOMType||!C(c.DOMType)?b.setExtremes(d,g,!0,"mousemove"!==c.DOMType,c):this.setRange(this.from,this.to)}))}),h(x,"afterRender",function(){var a=Math.min(r(this.options.min,this.min),this.min,r(this.dataMin,this.min)),c=Math.max(r(this.options.max,this.max),this.max,r(this.dataMax,
this.max)),d=this.scrollbar,f=this.titleOffset||0;if(d){this.horiz?(d.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:f+this.axisTitleMargin+this.offset),this.width,this.height),f=1):(d.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?f+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),f=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[f]+=this.scrollbar.size+this.scrollbar.options.margin;
isNaN(a)||isNaN(c)||!C(this.min)||!C(this.max)?d.setRange(0,0):(f=(this.min-a)/(c-a),a=(this.max-a)/(c-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?d.setRange(f,a):d.setRange(1-a,1-f))}}),h(x,"afterGetOffset",function(){var a=this.horiz?2:1,c=this.scrollbar;c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[a]+=c.size+c.options.margin)}),a.Scrollbar=p)});H(v,"parts/RangeSelector.js",[v["parts/Globals.js"]],function(a){function p(a){this.init(a)}var h=a.addEvent,x=a.Axis,u=a.Chart,
v=a.css,C=a.createElement,w=a.defaultOptions,G=a.defined,k=a.destroyObjectProperties,m=a.discardElement,r=a.extend,E=a.fireEvent,B=a.isNumber,d=a.merge,b=a.pick,c=a.pInt,l=a.splat;r(w,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});w.lang=d(w.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});
p.prototype={clickButton:function(a,c){var f=this.chart,d=this.buttonOptions[a],e=f.xAxis[0],g=f.scroller&&f.scroller.getUnionExtremes()||e||{},t=g.dataMin,k=g.dataMax,D,z=e&&Math.round(Math.min(e.max,b(k,e.max))),m=d.type,p,g=d._range,r,u,w,T=d.dataGrouping;if(null!==t&&null!==k){f.fixedRange=g;T&&(this.forcedDataGrouping=!0,x.prototype.setDataGrouping.call(e||{chart:this.chart},T,!1),this.frozenStates=d.preserveDataGrouping);if("month"===m||"year"===m)e?(m={range:d,max:z,chart:f,dataMin:t,dataMax:k},
D=e.minFromRange.call(m),B(m.newMax)&&(z=m.newMax)):g=d;else if(g)D=Math.max(z-g,t),z=Math.min(D+g,k);else if("ytd"===m)if(e)void 0===k&&(t=Number.MAX_VALUE,k=Number.MIN_VALUE,f.series.forEach(function(a){a=a.xData;t=Math.min(a[0],t);k=Math.max(a[a.length-1],k)}),c=!1),z=this.getYTDExtremes(k,t,f.time.useUTC),D=r=z.min,z=z.max;else{this.deferredYTDClick=a;return}else"all"===m&&e&&(D=t,z=k);D+=d._offsetMin;z+=d._offsetMax;this.setSelected(a);e?e.setExtremes(D,z,b(c,1),null,{trigger:"rangeSelectorButton",
rangeSelectorButton:d}):(p=l(f.options.xAxis)[0],w=p.range,p.range=g,u=p.min,p.min=r,h(f,"load",function(){p.range=w;p.min=u}))}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,c=a.options.rangeSelector,f=c.buttons||[].concat(b.defaultButtons),e=c.selected,d=function(){var a=
b.minInput,e=b.maxInput;a&&a.blur&&E(a,"blur");e&&e.blur&&E(e,"blur")};b.chart=a;b.options=c;b.buttons=[];b.buttonOptions=f;this.unMouseDown=h(a.container,"mousedown",d);this.unResize=h(a,"resize",d);f.forEach(b.computeButtonRange);void 0!==e&&f[e]&&this.clickButton(e,!1);h(a,"load",function(){a.xAxis&&a.xAxis[0]&&h(a.xAxis[0],"setExtremes",function(e){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==e.trigger&&"updatedData"!==e.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,
!1)})})},updateButtonStates:function(){var a=this,b=this.chart,c=b.xAxis[0],d=Math.round(c.max-c.min),e=!c.hasVisibleSeries,q=b.scroller&&b.scroller.getUnionExtremes()||c,t=q.dataMin,h=q.dataMax,b=a.getYTDExtremes(h,t,b.time.useUTC),k=b.min,z=b.max,l=a.selected,m=B(l),p=a.options.allButtonsEnabled,r=a.buttons;a.buttonOptions.forEach(function(b,f){var g=b._range,q=b.type,n=b.count||1,D=r[f],y=0,F=b._offsetMax-b._offsetMin;b=f===l;var u=g>h-t,V=g<c.minRange,S=!1,w=!1,g=g===d;("month"===q||"year"===
q)&&d+36E5>=864E5*{month:28,year:365}[q]*n-F&&d-36E5<=864E5*{month:31,year:366}[q]*n+F?g=!0:"ytd"===q?(g=z-k+F===d,S=!b):"all"===q&&(g=c.max-c.min>=h-t,w=!b&&m&&g);q=!p&&(u||V||w||e);n=b&&g||g&&!m&&!S||b&&a.frozenStates;q?y=3:n&&(m=!0,y=2);D.state!==y&&(D.setState(y),0===y&&l===f&&a.setSelected(null))})},computeButtonRange:function(a){var c=a.type,d=a.count||1,f={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(f[c])a._range=f[c]*d;else if("month"===c||"year"===c)a._range=864E5*
{month:30,year:365}[c]*d;a._offsetMin=b(a.offsetMin,0);a._offsetMax=b(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,e=this[a+"Input"];G(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y",e.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];v(this[a+"Input"],
{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){v(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(b){function f(){var a=z.value,b=(t.inputDateParser||Date.parse)(a),e=k.xAxis[0],d=k.scroller&&k.scroller.xAxis?k.scroller.xAxis:e,f=d.dataMin,d=d.dataMax;b!==z.previousValue&&(z.previousValue=b,B(b)||(b=a.split("-"),b=Date.UTC(c(b[0]),c(b[1])-1,c(b[2]))),B(b)&&
(k.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),D?b>h.maxInput.HCTime?b=void 0:b<f&&(b=f):b<h.minInput.HCTime?b=void 0:b>d&&(b=d),void 0!==b&&e.setExtremes(D?b:e.min,D?e.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var h=this,k=h.chart,e=k.renderer.style||{},q=k.renderer,t=k.options.rangeSelector,l=h.div,D="min"===b,z,m,p=this.inputGroup;this[b+"Label"]=m=q.label(w.lang[D?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(p);
p.offset+=m.width+5;this[b+"DateBox"]=q=q.label("",p.offset).addClass("highcharts-range-input").attr({padding:2,width:t.inputBoxWidth||90,height:t.inputBoxHeight||17,"text-align":"center"}).on("click",function(){h.showInput(b);h[b+"Input"].focus()});k.styledMode||q.attr({stroke:t.inputBoxBorderColor||"#cccccc","stroke-width":1});q.add(p);p.offset+=q.width+(D?10:0);this[b+"Input"]=z=C("input",{name:b,className:"highcharts-range-selector",type:"text"},{top:k.plotTop+"px"},l);k.styledMode||(m.css(d(e,
t.labelStyle)),q.css(d({color:"#333333"},e,t.inputStyle)),v(z,r({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:e.fontSize,fontFamily:e.fontFamily,top:"-9999em"},t.inputStyle)));z.onfocus=function(){h.showInput(b)};z.onblur=function(){z===a.doc.activeElement&&(f(),h.hideInput(b),z.blur())};z.onchange=f;z.onkeypress=function(a){13===a.keyCode&&f()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:
0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,b,c){var d=this.chart.time,e=new d.Date(a),f=d.get("FullYear",e);c=c?d.Date.UTC(f,0,1):+new d.Date(f,0,1);b=Math.max(b||0,c);e=e.getTime();return{max:Math.min(a||e,e),min:b}},render:function(a,c){var d=this,f=d.chart,e=f.renderer,g=f.container,t=f.options,h=t.exporting&&!1!==t.exporting.enabled&&t.navigation&&t.navigation.buttonOptions,k=w.lang,l=d.div,m=t.rangeSelector,p=b(t.chart.style&&t.chart.style.zIndex,
0)+1,t=m.floating,r=d.buttons,l=d.inputGroup,u=m.buttonTheme,v=m.buttonPosition,x=m.inputPosition,A=m.inputEnabled,B=u&&u.states,E=f.plotLeft,G,H=d.buttonGroup,L;L=d.rendered;var M=d.options.verticalAlign,O=f.legend,P=O&&O.options,Q=v.y,N=x.y,R=L||!1,U=R?"animate":"attr",K=0,I=0,J;if(!1!==m.enabled){L||(d.group=L=e.g("range-selector-group").attr({zIndex:7}).add(),d.buttonGroup=H=e.g("range-selector-buttons").add(L),d.zoomText=e.text(k.rangeSelectorZoom,0,15).add(H),f.styledMode||(d.zoomText.css(m.labelStyle),
u["stroke-width"]=b(u["stroke-width"],0)),d.buttonOptions.forEach(function(a,b){r[b]=e.button(a.text,0,0,function(e){var c=a.events&&a.events.click,f;c&&(f=c.call(a,e));!1!==f&&d.clickButton(b);d.isActive=!0},u,B&&B.hover,B&&B.select,B&&B.disabled).attr({"text-align":"center"}).add(H)}),!1!==A&&(d.div=l=C("div",null,{position:"relative",height:0,zIndex:p}),g.parentNode.insertBefore(l,g),d.inputGroup=l=e.g("input-group").add(L),l.offset=0,d.drawInput("min"),d.drawInput("max")));d.zoomText[U]({x:b(E+
v.x,E)});G=b(E+v.x,E)+d.zoomText.getBBox().width+5;d.buttonOptions.forEach(function(a,e){r[e][U]({x:G});G+=r[e].width+b(m.buttonSpacing,5)});E=f.plotLeft-f.spacing[3];d.updateButtonStates();h&&this.titleCollision(f)&&"top"===M&&"right"===v.align&&v.y+H.getBBox().height-12<(h.y||0)+h.height&&(K=-40);"left"===v.align?J=v.x-f.spacing[3]:"right"===v.align&&(J=v.x+K-f.spacing[1]);H.align({y:v.y,width:H.getBBox().width,align:v.align,x:J},!0,f.spacingBox);d.group.placed=R;d.buttonGroup.placed=R;!1!==A&&
(K=h&&this.titleCollision(f)&&"top"===M&&"right"===x.align&&x.y-l.getBBox().height-12<(h.y||0)+h.height+f.spacing[0]?-40:0,"left"===x.align?J=E:"right"===x.align&&(J=-Math.max(f.axisOffset[1],-K)),l.align({y:x.y,width:l.getBBox().width,align:x.align,x:x.x+J-2},!0,f.spacingBox),g=l.alignAttr.translateX+l.alignOptions.x-K+l.getBBox().x+2,h=l.alignOptions.width,k=H.alignAttr.translateX+H.getBBox().x,J=H.getBBox().width+20,(x.align===v.align||k+J>g&&g+h>k&&Q<N+l.getBBox().height)&&l.attr({translateX:l.alignAttr.translateX+
(f.axisOffset[1]>=-K?0:-K),translateY:l.alignAttr.translateY+H.getBBox().height+10}),d.setInputValue("min",a),d.setInputValue("max",c),d.inputGroup.placed=R);d.group.align({verticalAlign:M},!0,f.spacingBox);a=d.group.getBBox().height+20;c=d.group.alignAttr.translateY;"bottom"===M&&(O=P&&"bottom"===P.verticalAlign&&P.enabled&&!P.floating?O.legendHeight+b(P.margin,10):0,a=a+O-20,I=c-a-(t?0:m.y)-10);if("top"===M)t&&(I=0),f.titleOffset&&(I=f.titleOffset+f.options.title.margin),I+=f.margin[0]-f.spacing[0]||
0;else if("middle"===M)if(N===Q)I=0>N?c+void 0:c;else if(N||Q)I=0>N||0>Q?I-Math.min(N,Q):c-a+NaN;d.group.translate(m.x,m.y+Math.floor(I));!1!==A&&(d.minInput.style.marginTop=d.group.translateY+"px",d.maxInput.style.marginTop=d.group.translateY+"px");d.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,e=a.inputPosition.y;if(a.height)return a.height;a=b?b.getBBox(!0).height+13+c:0;b=Math.min(e,d);if(0>e&&0>d||0<e&&0<d)a+=Math.abs(b);return a},titleCollision:function(a){return!(a.options.title.text||
a.options.subtitle.text)},update:function(a){var b=this.chart;d(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()},destroy:function(){var b=this,c=b.minInput,d=b.maxInput;b.unMouseDown();b.unResize();k(b.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);d&&(d.onfocus=d.onblur=d.onchange=null);a.objectEach(b,function(a,e){a&&"chart"!==e&&(a.destroy?a.destroy():a.nodeType&&m(this[e]));a!==p.prototype[e]&&(b[e]=null)},this)}};x.prototype.minFromRange=function(){var a=
this.range,c={month:"Month",year:"FullYear"}[a.type],d,h=this.max,e,q,t=this.chart.time,k=function(a,b){var e=new t.Date(a),d=t.get(c,e);t.set(c,e,d+b);d===t.get(c,e)&&e.setDate(0);return e.getTime()-a};B(a)?(d=h-a,q=a):(d=h+k(h,-a.count),this.chart&&(this.chart.fixedRange=h-d));e=b(this.dataMin,Number.MIN_VALUE);B(d)||(d=e);d<=e&&(d=e,void 0===q&&(q=k(d,a.count)),this.newMax=Math.min(d+q,this.dataMax));B(h)||(d=void 0);return d};a.RangeSelector||(h(u,"afterGetContainer",function(){this.options.rangeSelector.enabled&&
(this.rangeSelector=new p(this))}),h(u,"beforeRender",function(){var a=this.axes,b=this.rangeSelector;b&&(B(b.deferredYTDClick)&&(b.clickButton(b.deferredYTDClick),delete b.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),b.render(),a=b.options.verticalAlign,b.options.floating||("bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))}),h(u,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var c=this.extraBottomMargin,
d=this.extraTopMargin;b&&b.enabled&&!G(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new p(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==c||this.extraTopMargin!==d)&&(this.isDirtyBox=!0)}),h(u,"render",function(){var a=this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,
"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0))}),h(u,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))}),u.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();B(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,e,f;d&&(f=h(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),e=h(a,"redraw",b),b());h(a,"destroy",function(){d&&
(e(),f())})}),a.RangeSelector=p)});H(v,"parts/Navigator.js",[v["parts/Globals.js"]],function(a){function p(a){this.init(a)}var h=a.addEvent,v=a.Axis,u=a.Chart,A=a.color,C=a.defaultOptions,w=a.defined,G=a.destroyObjectProperties,k=a.erase,m=a.extend,r=a.hasTouch,E=a.isArray,B=a.isNumber,d=a.isTouchDevice,b=a.merge,c=a.pick,l=a.removeEvent,f=a.Scrollbar,g=a.Series,n,y=function(a){var b=[].filter.call(arguments,B);if(b.length)return Math[a].apply(0,b)};n=void 0===a.seriesTypes.areaspline?"line":"areaspline";
m(C,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:A("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:n,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",
[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",
gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,f){a=f.width/2;b=Math.round(a/3)+.5;f=f.height;return["M",-a-1,.5,"L",a,.5,"L",a,f+.5,"L",-a-1,f+.5,"L",-a-1,.5,"M",-b,4,"L",-b,f-3,"M",b-1,4,"L",b-1,f-3]};v.prototype.toFixedRange=function(a,b,d,f){var e=this.chart&&this.chart.fixedRange;a=c(d,this.translate(a,!0,!this.horiz));b=c(f,
this.translate(b,!0,!this.horiz));d=e&&(b-a)/e;.7<d&&1.3>d&&(f?a=b-e:b=a+e);B(a)&&B(b)||(a=b=void 0);return{min:a,max:b}};p.prototype={drawHandle:function(a,b,c,d){var e=this.navigatorOptions.handles.height;this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-e)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-e/2-1)})},drawOutline:function(a,b,c,d){var e=this.navigatorOptions.maskInside,
f=this.outline.strokeWidth(),g=f/2,f=f%2/2,q=this.outlineHeight,h=this.scrollbarHeight,t=this.size,k=this.left-h,l=this.top;c?(k-=g,c=l+b+f,b=l+a+f,a=["M",k+q,l-h-f,"L",k+q,c,"L",k,c,"L",k,b,"L",k+q,b,"L",k+q,l+t+h].concat(e?["M",k+q,c-g,"L",k+q,b+g]:[])):(a+=k+h-f,b+=k+h-f,l+=g,a=["M",k,l,"L",a,l,"L",a,l+q,"L",b,l+q,"L",b,l,"L",k+t+2*h,l].concat(e?["M",a-g,l,"L",b+g,l]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var e=this.left,f=this.top,g=this.height,q,h,t,k;c?(t=[e,e,e],k=[f,f+a,
f+b],h=[g,g,g],q=[a,b-a,this.size-b]):(t=[e,e+a,e+b],k=[f,f,f],h=[a,b-a,this.size-b],q=[g,g,g]);this.shades.forEach(function(a,b){a[d]({x:t[b],y:k[b],width:h[b],height:q[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,f=d.renderer,g,h={cursor:d.inverted?"ns-resize":"ew-resize"};a.navigatorGroup=g=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(e,c){a.shades[c]=f.rect().addClass("highcharts-navigator-mask"+(1===c?"-inside":
"-outside")).add(g);d.styledMode||a.shades[c].attr({fill:e?b.maskFill:"rgba(0,0,0,0)"}).css(1===c&&h)});a.outline=f.path().addClass("highcharts-navigator-outline").add(g);d.styledMode||a.outline.attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor});b.handles.enabled&&[0,1].forEach(function(e){b.handles.inverted=d.inverted;a.handles[e]=f.symbol(b.handles.symbols[e],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[e].attr({zIndex:7-e}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+
["left","right"][e]).add(g);if(!d.styledMode){var c=b.handles;a.handles[e].attr({fill:c.backgroundColor,stroke:c.borderColor,"stroke-width":c.lineWidth}).css(h)}})},update:function(a){(this.series||[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();b(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(b,d,f,g){var e=this.chart,h,q,k=this.scrollbarHeight,t,l=this.xAxis;h=l.fake?e.xAxis[0]:l;var m=this.navigatorEnabled,n,p=this.rendered;
q=e.inverted;var r,u=e.xAxis[0].minRange,F=e.xAxis[0].options.maxRange;if(!this.hasDragged||w(f)){if(!B(b)||!B(d))if(p)f=0,g=c(l.width,h.width);else return;this.left=c(l.left,e.plotLeft+k+(q?e.plotWidth:0));this.size=n=t=c(l.len,(q?e.plotHeight:e.plotWidth)-2*k);e=q?k:t+2*k;f=c(f,l.toPixels(b,!0));g=c(g,l.toPixels(d,!0));B(f)&&Infinity!==Math.abs(f)||(f=0,g=e);b=l.toValue(f,!0);d=l.toValue(g,!0);r=Math.abs(a.correctFloat(d-b));r<u?this.grabbedLeft?f=l.toPixels(d-u,!0):this.grabbedRight&&(g=l.toPixels(b+
u,!0)):w(F)&&r>F&&(this.grabbedLeft?f=l.toPixels(d-F,!0):this.grabbedRight&&(g=l.toPixels(b+F,!0)));this.zoomedMax=Math.min(Math.max(f,g,0),n);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(f,g),0),n);this.range=this.zoomedMax-this.zoomedMin;n=Math.round(this.zoomedMax);f=Math.round(this.zoomedMin);m&&(this.navigatorGroup.attr({visibility:"visible"}),p=p&&!this.hasDragged?"animate":"attr",this.drawMasks(f,n,q,p),this.drawOutline(f,n,q,p),this.navigatorOptions.handles.enabled&&
(this.drawHandle(f,0,q,p),this.drawHandle(n,1,q,p)));this.scrollbar&&(q?(q=this.top-k,h=this.left-k+(m||!h.opposite?0:(h.titleOffset||0)+h.axisTitleMargin),k=t+2*k):(q=this.top+(m?this.height:-k),h=this.left-k),this.scrollbar.position(h,q,e,k),this.scrollbar.setRange(this.zoomedMin/(t||1),this.zoomedMax/(t||1)));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,d=[],f,g;a.mouseMoveHandler=f=function(b){a.onMouseMove(b)};a.mouseUpHandler=g=function(b){a.onMouseUp(b)};
d=a.getPartsEvents("mousedown");d.push(h(c,"mousemove",f),h(c.ownerDocument,"mouseup",g));r&&(d.push(h(c,"touchmove",f),h(c.ownerDocument,"touchend",g)),d.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=d;a.series&&a.series[0]&&d.push(h(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,e=[];["shades","handles"].forEach(function(c){b[c].forEach(function(d,f){e.push(h(d.element,a,function(a){b[c+"Mousedown"](a,f)}))})});
return e},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var e=this.chart,c=this.xAxis,d=this.zoomedMin,f=this.left,g=this.size,h=this.range,q=a.chartX,k,l;e.inverted&&(q=a.chartY,f=this.top);1===b?(this.grabbedCenter=q,this.fixedWidth=h,this.dragOffset=q-d):(a=q-f-h/2,0===b?a=Math.max(0,a):2===b&&a+h>=g&&(a=g-h,this.reversedExtremes?(a-=h,l=this.getUnionExtremes().dataMin):k=this.getUnionExtremes().dataMax),a!==d&&(this.fixedWidth=h,b=c.toFixedRange(a,a+h,l,k),w(b.min)&&e.xAxis[0].setExtremes(Math.min(b.min,
b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var e=a.xAxis[0],c=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=c?e.min:e.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=c?e.max:e.min);a.fixedRange=null},onMouseMove:function(b){var e=this,f=e.chart,g=e.left,h=e.navigatorSize,k=e.range,l=e.dragOffset,n=f.inverted;b.touches&&
0===b.touches[0].pageX||(b=f.pointer.normalize(b),f=b.chartX,n&&(g=e.top,f=b.chartY),e.grabbedLeft?(e.hasDragged=!0,e.render(0,0,f-g,e.otherHandlePos)):e.grabbedRight?(e.hasDragged=!0,e.render(0,0,e.otherHandlePos,f-g)):e.grabbedCenter&&(e.hasDragged=!0,f<l?f=l:f>h+l-k&&(f=h+l-k),e.render(0,0,f-l,f-l+k)),e.hasDragged&&e.scrollbar&&c(e.scrollbar.options.liveRedraw,a.svg&&!d&&!this.chart.isBoosting)&&(b.DOMType=b.type,setTimeout(function(){e.onMouseUp(b)},0)))},onMouseUp:function(a){var b=this.chart,
e=this.xAxis,c=this.scrollbar,d,f,g=a.DOMEvent||a;(!this.hasDragged||c&&c.hasDragged)&&"scrollbar"!==a.trigger||(c=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?d=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(f=this.fixedExtreme),this.zoomedMax===this.size&&(f=this.reversedExtremes?c.dataMin:c.dataMax),0===this.zoomedMin&&(d=this.reversedExtremes?c.dataMax:c.dataMin),e=e.toFixedRange(this.zoomedMin,this.zoomedMax,d,f),w(e.min)&&b.xAxis[0].setExtremes(Math.min(e.min,e.max),
Math.max(e.min,e.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:g}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&
a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(function(a){l(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&l(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var e=a.options,d=e.navigator,g=d.enabled,k=e.scrollbar,l=k.enabled,e=g?d.height:0,n=l?k.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=e;this.scrollbarHeight=n;this.scrollbarEnabled=l;this.navigatorEnabled=g;this.navigatorOptions=d;this.scrollbarOptions=
k;this.outlineHeight=e+n;this.opposite=c(d.opposite,!g&&a.inverted);var m=this,g=m.baseSeries,k=a.xAxis.length,l=a.yAxis.length,p=g&&g[0]&&g[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;m.navigatorEnabled?(m.xAxis=new v(a,b({breaks:p.options.breaks,ordinal:p.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:k,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[n,
0,-n,0],width:e}:{offsets:[0,-n,0,n],height:e})),m.yAxis=new v(a,b(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:l,isInternal:!0,zoomEnabled:!1},a.inverted?{width:e}:{height:e})),g||d.series.data?m.updateNavigatorSeries(!1):0===a.series.length&&(m.unbindRedraw=h(a,"beforeRedraw",function(){0<a.series.length&&!m.series&&(m.setBaseSeries(),m.unbindRedraw())})),m.reversedExtremes=a.inverted&&!m.xAxis.reversed||!a.inverted&&m.xAxis.reversed,m.renderElements(),m.addMouseEvents()):m.xAxis=
{translate:function(b,c){var e=a.xAxis[0],d=e.getExtremes(),f=e.len-2*n,g=y("min",e.options.min,d.dataMin),e=y("max",e.options.max,d.dataMax)-g;return c?b*e/f+g:f*(b-g)/e},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:v.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=m.scrollbar=new f(a.renderer,b(a.options.scrollbar,{margin:m.navigatorEnabled?0:10,vertical:a.inverted}),a),h(m.scrollbar,"changed",function(b){var c=
m.size,e=c*this.to,c=c*this.from;m.hasDragged=m.scrollbar.hasDragged;m.render(0,0,c,e);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){m.onMouseUp(b)})}));m.addBaseSeriesEvents();m.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],e=this.xAxis,d=e.options,f=b.options,g;a&&null===b.dataMin||(g={dataMin:c(d&&d.min,y("min",f.min,b.dataMin,e.dataMin,e.min)),dataMax:c(d&&d.max,y("max",f.max,b.dataMax,e.dataMax,e.max))});return g},
setBaseSeries:function(b,c){var e=this.chart,d=this.baseSeries=[];b=b||e.options&&e.options.navigator.baseSeries||(e.series.length?a.find(e.series,function(a){return!a.options.isInternal}).index:0);(e.series||[]).forEach(function(a,c){a.options.isInternal||!a.options.showInNavigator&&(c!==b&&a.options.id!==b||!1===a.options.showInNavigator)||d.push(a)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,c)},updateNavigatorSeries:function(c,d){var e=this,f=e.chart,g=e.baseSeries,h,k,q=e.navigatorOptions.series,
n,p={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,states:{inactive:{opacity:1}}},r=e.series=(e.series||[]).filter(function(a){var b=a.baseSeries;return 0>g.indexOf(b)?(b&&(l(b,"updatedData",e.updatedDataHandler),delete b.navigatorSeries),a.chart&&a.destroy(),!1):!0});g&&g.length&&g.forEach(function(a){var c=a.navigatorSeries,l=m({color:a.color,visible:a.visible},E(q)?C.navigator.series:
q);c&&!1===e.navigatorOptions.adaptToUpdatedData||(p.name="Navigator "+g.length,h=a.options||{},n=h.navigatorOptions||{},k=b(h,p,l,n),l=n.data||l.data,e.hasNavigatorData=e.hasNavigatorData||!!l,k.data=l||h.data&&h.data.slice(0),c&&c.options?c.update(k,d):(a.navigatorSeries=f.initSeries(k),a.navigatorSeries.baseSeries=a,r.push(a.navigatorSeries)))});if(q.data&&(!g||!g.length)||E(q))e.hasNavigatorData=!1,q=a.splat(q),q.forEach(function(a,c){p.name="Navigator "+(r.length+1);k=b(C.navigator.series,{color:f.series[c]&&
!f.series[c].options.isInternal&&f.series[c].color||f.options.colors[c]||f.options.colors[0]},p,a);k.data=a.data;k.data&&(e.hasNavigatorData=!0,r.push(f.initSeries(k)))});c&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&h(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);b.forEach(function(b){h(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});h(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,
!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&h(b,"updatedData",this.updatedDataHandler);h(b,"remove",function(){this.navigatorSeries&&(k(a.series,this.navigatorSeries),w(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(a){return this.baseSeries.reduce(function(a,b){return Math.min(a,b.xData?b.xData[0]:a)},a)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||
b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),d=b.dataMin,f=b.dataMax,b=b.max-b.min,g=a.stickToMin,h=a.stickToMax,k=c(this.options.overscroll,0),l,m,n=a.series&&a.series[0],p=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(g&&(m=d,l=m+b),h&&(l=f+k,g||(m=Math.max(l-b,a.getBaseSeriesMin(n&&n.xData?n.xData[0]:-Number.MAX_VALUE)))),p&&(g||h)&&B(m)&&(this.min=
this.userMin=m,this.max=this.userMax=l));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=B(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||
(this.eventsToUnbind=[]);this.eventsToUnbind.push(h(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)}),h(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents();
this.xAxis&&(k(this.chart.xAxis,this.xAxis),k(this.chart.axes,this.xAxis));this.yAxis&&(k(this.chart.yAxis,this.yAxis),k(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){G(a)},this)}};a.Navigator||(a.Navigator=p,
h(v,"zoom",function(a){var b=this.chart.options,c=b.chart.zoomType,e=b.chart.pinchType,f=b.navigator,b=b.rangeSelector;this.isXAxis&&(f&&f.enabled||b&&b.enabled)&&("y"===c?a.zoomed=!1:(!d&&"xy"===c||d&&"xy"===e)&&this.options.range&&(c=this.previousZoom,w(a.newMin)?this.previousZoom=[this.min,this.max]:c&&(a.newMin=c[0],a.newMax=c[1],delete this.previousZoom)));void 0!==a.zoomed&&a.preventDefault()}),h(u,"beforeShowResetZoom",function(){var a=this.options,b=a.navigator,c=a.rangeSelector;if((b&&b.enabled||
c&&c.enabled)&&(!d&&"x"===a.chart.zoomType||d&&"x"===a.chart.pinchType))return!1}),h(u,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new p(this)}),h(u,"afterSetChartSize",function(){var a=this.legend,b=this.navigator,d,f,g,h;b&&(f=a&&a.options,g=b.xAxis,h=b.yAxis,d=b.scrollbarHeight,this.inverted?(b.left=b.opposite?this.chartWidth-d-b.height:this.spacing[3]+d,b.top=this.plotTop+d):(b.left=this.plotLeft+d,b.top=b.navigatorOptions.top||
this.chartHeight-b.height-d-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(f&&"bottom"===f.verticalAlign&&f.enabled&&!f.floating?a.legendHeight+c(f.margin,10):0)),g&&h&&(this.inverted?g.options.left=h.options.left=b.left:g.options.top=h.options.top=b.top,g.setAxisSize(),h.setAxisSize()))}),h(u,"update",function(a){var c=a.options.navigator||{},d=a.options.scrollbar||{};this.navigator||this.scroller||!c.enabled&&!d.enabled||(b(!0,this.options.navigator,
c),b(!0,this.options.scrollbar,d),delete a.options.navigator,delete a.options.scrollbar)}),h(u,"afterUpdate",function(a){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new p(this),c(a.redraw,!0)&&this.redraw(a.animation))}),h(u,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),h(g,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,
!1)}),u.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))}))});H(v,"masters/modules/gantt.src.js",[],function(){})});
//# sourceMappingURL=gantt.js.map
