/*
 Highcharts Gantt JS v8.0.0 (2019-12-10)

 Gantt series

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

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