!/**
 * Highcharts Gantt JS v12.5.0 (2026-01-12)
 * @module highcharts/modules/treegrid
 * @requires highcharts
 *
 * Tree Grid
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Jon Arild Nygard
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("highcharts").StackItem,require("highcharts").Axis,require("highcharts").Color):"function"==typeof define&&define.amd?define("highcharts/modules/treegrid",[["highcharts/highcharts"],["highcharts/highcharts","StackItem"],["highcharts/highcharts","Axis"],["highcharts/highcharts","Color"]],e):"object"==typeof exports?exports["highcharts/modules/treegrid"]=e(require("highcharts"),require("highcharts").StackItem,require("highcharts").Axis,require("highcharts").Color):t.Highcharts=e(t.Highcharts,t.Highcharts.StackItem,t.Highcharts.Axis,t.Highcharts.Color)}(this,function(t,e,i,r){return function(){"use strict";var s,o,n,a,l={184:function(t){t.exports=e},532:function(t){t.exports=i},620:function(t){t.exports=r},944:function(e){e.exports=t}},d={};function h(t){var e=d[t];if(void 0!==e)return e.exports;var i=d[t]={exports:{}};return l[t](i,i.exports,h),i.exports}h.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return h.d(e,{a:e}),e},h.d=function(t,e){for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var c={};h.d(c,{default:function(){return tV}});var u=h(944),f=h.n(u),p=h(184),v=h.n(p),m=f().addEvent,g=f().find,k=f().fireEvent,x=f().isArray,b=f().isNumber,y=f().pick;!function(t){function e(){void 0!==this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function i(){var t;Object.keys((null==(t=this.options.breaks)?void 0:t[0])||{}).length&&(this.options.ordinal=!1)}function r(){var t=this.brokenAxis;if(null==t?void 0:t.hasBreaks){for(var e=this.tickPositions,i=this.tickPositions.info,r=[],s=0;s<e.length;s++)t.isInAnyBreak(e[s])||r.push(e[s]);this.tickPositions=r,this.tickPositions.info=i}}function s(){this.brokenAxis||(this.brokenAxis=new d(this))}function o(){var t,e,i=this.isDirty,r=this.options.connectNulls,s=this.points,o=this.xAxis,n=this.yAxis;if(i)for(var a=s.length;a--;){var l=s[a],d=(null!==l.y||!1!==r)&&((null==(t=null==o?void 0:o.brokenAxis)?void 0:t.isInAnyBreak(l.x,!0))||(null==(e=null==n?void 0:n.brokenAxis)?void 0:e.isInAnyBreak(l.y,!0)));l.visible=!d&&!1!==l.options.visible}}function n(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,y(this.pointArrayMap,["y"]))}function a(t,e){var i,r,s,o,n=this,a=n.points;if(null==(i=null==t?void 0:t.brokenAxis)?void 0:i.hasBreaks){var l=t.brokenAxis;e.forEach(function(e){r=(null==l?void 0:l.breakArray)||[],s=t.isXAxis?t.min:y(n.options.threshold,t.min),a.forEach(function(i){var n;o=null!=(n=i["stack"+e.toUpperCase()])?n:i[e],r.forEach(function(e){if(b(s)&&b(o)){var r="";s<e.from&&o>e.to||s>e.from&&o<e.from?r="pointBreak":(s<e.from&&o>e.from&&o<e.to||s>e.from&&o>e.to&&o<e.from)&&(r="pointInBreak"),r&&k(t,r,{point:i,brk:e})}})})})}}function l(){var t,e=this.currentDataGrouping,i=null==e?void 0:e.gapSize,r=this.points.slice(),s=this.yAxis,o=this.options.gapSize,n=r.length-1;if(o&&n>0){"value"!==this.options.gapUnit&&(o*=this.basePointRange),i&&i>o&&i>=this.basePointRange&&(o=i);for(var a=void 0,l=void 0;n--;)if(l&&!1!==l.visible||(l=r[n+1]),a=r[n],!1!==l.visible&&!1!==a.visible){if(l.x-a.x>o){var d=(a.x+l.x)/2;r.splice(n+1,0,{isNull:!0,x:d}),s.stacking&&this.options.stacking&&((s.stacking.stacks[this.stackKey][d]=new(v())(s,s.options.stackLabels,!1,d,null!=(t=this.stack)?t:"")).total=0)}l=a}}return this.getGraphPath(r)}t.compose=function(t,d){if(!t.keepProps.includes("brokenAxis")){t.keepProps.push("brokenAxis"),m(t,"init",s),m(t,"afterInit",e),m(t,"afterSetTickPositions",r),m(t,"afterSetOptions",i);var h=d.prototype;h.drawBreaks=a,h.gappedPath=l,m(d,"afterGeneratePoints",o),m(d,"afterRender",n)}return t};var d=function(){function t(t){this.axis=t}return t.isInBreak=function(t,e){var i=t.repeat||1/0,r=t.from,s=t.to-t.from,o=e>=r?(e-r)%i:i-(r-e)%i;return t.inclusive?o<=s:o<s&&0!==o},t.lin2Val=function(e){var i=this.min||0,r=this.brokenAxis,s=null==r?void 0:r.breakArray;if(!(null==s?void 0:s.length)||!b(e))return e;var o=e;if(e>i)for(var n=0;n<s.length;n++){var a=s[n];if(a.from>o)break;a.to<=o&&a.to>i?o+=a.len:t.isInBreak(a,o)&&(o+=a.len)}else if(e<i)for(var l=0;l<s.length;l++){var a=s[l];if(a.from>i)break;a.from>=o&&a.from<i?o-=a.len:t.isInBreak(a,o)&&(o-=a.len)}return o},t.val2Lin=function(e){var i=this.min||0,r=this.brokenAxis,s=null==r?void 0:r.breakArray;if(!(null==s?void 0:s.length)||!b(e))return e;var o=e;if(e>i)for(var n=0;n<s.length;n++){var a=s[n];if(a.to<=e&&a.to>i)o-=a.len;else if(a.from>e)break;else if(t.isInBreak(a,e)){o-=e-a.from;break}}else if(e<i)for(var l=0;l<s.length;l++){var a=s[l];if(a.from>=e&&a.from<i)o+=a.len;else if(a.from>i)break;else if(t.isInBreak(a,e)){o+=a.to-e;break}}return o},t.prototype.findBreakAt=function(t,e){return g(e,function(e){return e.from<t&&t<e.to})},t.prototype.isInAnyBreak=function(e,i){var r,s,o,n=this.axis,a=n.options.breaks||[],l=a.length;if(l&&b(e)){for(;l--;)t.isInBreak(a[l],e)&&(r=!0,s||(s=y(a[l].showPoints,!n.isXAxis)));o=r&&i?r&&!s:r}return o},t.prototype.setBreaks=function(e,i){var r,s=this,o=s.axis,n=o.chart.time,a=x(e)&&!!Object.keys((null==e?void 0:e[0])||{}).length;o.isDirty=(null!=(r=s.hasBreaks)&&r)!==a,s.hasBreaks=a,null==e||e.forEach(function(t){t.from=n.parse(t.from)||0,t.to=n.parse(t.to)||0}),e!==o.options.breaks&&(o.options.breaks=o.userOptions.breaks=e),o.forceRedraw=!0,o.series.forEach(function(t){t.isDirty=!0}),a||o.val2lin!==t.val2Lin||(delete o.val2lin,delete o.lin2val),a&&(o.userOptions.ordinal=!1,o.lin2val=t.lin2Val,o.val2lin=t.val2Lin,o.setExtremes=function(t,e,i,r,n){var a;if(s.hasBreaks&&!(null==(a=o.treeGrid)?void 0:a.tree)){for(var l=this.brokenAxis.breakArray||[],d=void 0;d=s.findBreakAt(t,l);)t=d.to;for(;d=s.findBreakAt(e,l);)e=d.from;e<t&&(e=t)}o.constructor.prototype.setExtremes.call(this,t,e,i,r,n)},o.setAxisTranslation=function(){if(o.constructor.prototype.setAxisTranslation.call(this),s.unitLength=void 0,s.hasBreaks){var e,i,r,n,a,l,d,h,c,u,f=o.options.breaks||[],p=[],v=[],m=null!=(e=o.pointRangePadding)?e:0,g=0,x=null!=(i=o.userMin)?i:o.min,y=null!=(r=o.userMax)?r:o.max,P=null!=(n=o.dataMin)?n:x,A=null!=(a=o.dataMax)?a:y;b(o.threshold)&&(P=Math.min(null!=P?P:o.threshold,o.threshold),A=Math.max(null!=A?A:o.threshold,o.threshold)),(null==(l=o.treeGrid)?void 0:l.tree)||f.forEach(function(e){h=e.repeat||1/0,b(x)&&b(y)&&(t.isInBreak(e,x)&&(x+=e.to%h-x%h),t.isInBreak(e,y)&&(y-=y%h-e.from%h))}),b(P)&&b(A)&&f.forEach(function(t){for(c=t.from,h=t.repeat||1/0;c-h>P;)c-=h;for(;c<P;)c+=h;for(u=c;u<A;u+=h)p.push({value:u,move:"in"}),p.push({value:u+t.to-t.from,move:"out",size:t.breakSize})}),p.sort(function(t,e){return t.value===e.value?("in"!==t.move)-("in"!==e.move):t.value-e.value}),d=0,c=P,p.forEach(function(t){1===(d+="in"===t.move?1:-1)&&"in"===t.move&&(c=t.value),0===d&&b(c)&&(v.push({from:c,to:t.value,len:t.value-c-(t.size||0)}),b(x)&&b(y)&&c<y&&t.value>x&&(g+=t.value-c-(t.size||0)))}),s.breakArray=v,b(x)&&b(y)&&b(o.min)&&(s.unitLength=y-x-g+m,k(o,"afterBreaks"),o.staticScale?o.transA=o.staticScale:s.unitLength&&(o.transA*=(y-o.min+m)/s.unitLength),m&&(o.minPixelPadding=o.transA*(o.minPointOffset||0)),o.min=x,o.max=y)}}),y(i,!0)&&o.chart.redraw()},t}();t.Additions=d}(o||(o={}));var P=o,A=h(532),O=h.n(A),G=f().dateFormats,B=f().addEvent,w=f().defined,E=f().erase,T=f().find,I=f().isArray,M=f().isNumber,N=f().merge,S=f().pick,L=f().timeUnits,C=f().wrap;function z(t){return f().isObject(t,!0)}function W(t,e){var i={width:0,height:0};if(e.forEach(function(e){var r,s=t[e],o=0,n=0;z(s)&&(o=(r=z(s.label)?s.label:{}).getBBox?r.getBBox().height:0,r.textStr&&!M(r.textPxLength)&&(r.textPxLength=r.getBBox().width),n=M(r.textPxLength)?Math.round(r.textPxLength):0,r.textStr&&(n=Math.round(r.getBBox().width)),i.height=Math.max(o,i.height),i.width=Math.max(n,i.width))}),"treegrid"===this.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode){var r=this.treeGrid.mapOfPosToGridNode[-1].height||0;i.width+=this.options.labels.indentation*(r-1)}return i}function j(t){var e=this.grid,i=3===this.side;if(i||t.apply(this),!(null==e?void 0:e.isColumn)){var r=(null==e?void 0:e.columns)||[];i&&(r=r.slice().reverse()),r.forEach(function(t){t.getOffset()})}i&&t.apply(this)}function R(t){if(!0===(this.options.grid||{}).enabled){var e=this.axisTitle,i=this.height,r=this.horiz,s=this.left,o=this.offset,a=this.opposite,l=this.options,d=this.top,h=this.width,c=this.tickSize(),u=null==e?void 0:e.getBBox().width,f=l.title.x,p=l.title.y,v=S(l.title.margin,r?5:10),m=e?this.chart.renderer.fontMetrics(e).f:0,g=(r?d+i:s)+(r?1:-1)*(a?-1:1)*(c?c[0]/2:0)+(this.side===n.bottom?m:0);t.titlePosition.x=r?s-(u||0)/2-v+f:g+(a?h:0)+o+f,t.titlePosition.y=r?g-(a?i:0)+(a?m:-m)/2+o+p:d-v+p}}function D(){var t,e=this.chart,i=this.options.grid,r=void 0===i?{}:i,s=this.userOptions;if(r.enabled&&((t=this.options).labels.align=S(t.labels.align,"center"),this.categories||(t.showLastLabel=!1),this.labelRotation=0,t.labels.rotation=0,t.minTickInterval=1),r.columns)for(var o=this.grid.columns=[],n=this.grid.columnIndex=0;++n<r.columns.length;){var a=N(s,r.columns[n],{isInternal:!0,linkedTo:0,scrollbar:{enabled:!1}},{grid:{columns:void 0}}),l=new(O())(this.chart,a,"yAxis");l.grid.isColumn=!0,l.grid.columnIndex=n,E(e.axes,l),E(e[this.coll]||[],l),o.push(l)}}function q(){var t,e,i=this.axisTitle,r=this.grid,s=this.options;if(!0===(s.grid||{}).enabled){var o=this.min||0,a=this.max||0,l=this.ticks[this.tickPositions[0]];if(i&&!this.chart.styledMode&&(null==l?void 0:l.slotWidth)&&!this.options.title.style.width&&i.css({width:""+l.slotWidth+"px"}),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),this.rightWall&&this.rightWall.destroy(),(null==(t=this.grid)?void 0:t.isOuterAxis())&&this.axisLine){var d=s.lineWidth;if(d){var h=this.getLinePath(d),c=h[0],u=h[1],f=(this.tickSize("tick")||[1])[0]*(this.side===n.top||this.side===n.left?-1:1);if("M"===c[0]&&"L"===u[0]&&(this.horiz?(c[2]+=f,u[2]+=f):(c[1]+=f,u[1]+=f)),!this.horiz&&this.chart.marginRight){var p=["L",this.left,c[2]||0],v=[c,p],m=["L",this.chart.chartWidth-this.chart.marginRight,this.toPixels(a+this.tickmarkOffset)],g=[["M",u[1]||0,this.toPixels(a+this.tickmarkOffset)],m];this.grid.upperBorder||o%1==0||(this.grid.upperBorder=this.grid.renderBorder(v)),this.grid.upperBorder&&(this.grid.upperBorder.attr({stroke:s.lineColor,"stroke-width":s.lineWidth}),this.grid.upperBorder.animate({d:v})),this.grid.lowerBorder||a%1==0||(this.grid.lowerBorder=this.grid.renderBorder(g)),this.grid.lowerBorder&&(this.grid.lowerBorder.attr({stroke:s.lineColor,"stroke-width":s.lineWidth}),this.grid.lowerBorder.animate({d:g}))}this.grid.axisLineExtra?(this.grid.axisLineExtra.attr({stroke:s.lineColor,"stroke-width":s.lineWidth}),this.grid.axisLineExtra.animate({d:h})):this.grid.axisLineExtra=this.grid.renderBorder(h),this.axisLine[this.showAxis?"show":"hide"]()}}if(((null==r?void 0:r.columns)||[]).forEach(function(t){return t.render()}),!this.horiz&&this.chart.hasRendered&&(this.scrollbar||(null==(e=this.linkedParent)?void 0:e.scrollbar))&&this.tickPositions.length){for(var k=this.tickmarkOffset,x=this.tickPositions[this.tickPositions.length-1],b=this.tickPositions[0],y=void 0,P=void 0;(y=this.hiddenLabels.pop())&&y.element;)y.show();for(;(P=this.hiddenMarks.pop())&&P.element;)P.show();(y=this.ticks[b].label)&&(o-b>k?this.hiddenLabels.push(y.hide()):y.show()),(y=this.ticks[x].label)&&(x-a>k?this.hiddenLabels.push(y.hide()):y.show());var A=this.ticks[x].mark;A&&x-a<k&&x-a>0&&this.ticks[x].isLast&&this.hiddenMarks.push(A.hide())}}}function H(){var t,e=null==(t=this.tickPositions)?void 0:t.info,i=this.options,r=i.grid||{},s=this.userOptions.labels||{};r.enabled&&(this.horiz?(this.series.forEach(function(t){t.options.pointRange=0}),e&&i.dateTimeLabelFormats&&i.labels&&!w(s.align)&&(!1===i.dateTimeLabelFormats[e.unitName].range||e.count>1)&&(i.labels.align="left",w(s.x)||(i.labels.x=3))):"treegrid"!==this.type&&this.grid&&this.grid.columns&&(this.minPointOffset=this.tickInterval))}function F(t){var e,i=this.options,r=t.userOptions,s=i&&z(i.grid)?i.grid:{};!0===s.enabled&&(e=N(!0,{className:"highcharts-grid-axis "+(r.className||""),dateTimeLabelFormats:{hour:{list:["%[HM]","%[H]"]},day:{list:["%[AeB]","%[aeb]","%[E]"]},week:{list:["Week %W","W%W"]},month:{list:["%[B]","%[b]","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"0.9em"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0,style:{textOverflow:"ellipsis"}},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},r),"xAxis"===this.coll&&(w(r.linkedTo)&&!w(r.tickPixelInterval)&&(e.tickPixelInterval=350),!(!w(r.tickPixelInterval)&&w(r.linkedTo))||w(r.tickPositioner)||w(r.tickInterval)||w(r.units)||(e.tickPositioner=function(t,i){var r,s,o=null==(s=null==(r=this.linkedParent)?void 0:r.tickPositions)?void 0:s.info;if(o){for(var n=e.units||[],a=void 0,l=1,d="year",h=0;h<n.length;h++){var c=n[h];if(c&&c[0]===o.unitName){a=h;break}}var u=M(a)&&n[a+1];if(u){d=u[0]||"year";var f=u[1];l=(null==f?void 0:f[0])||1}else"year"===o.unitName&&(l=10*o.count);var p=L[d];return this.tickInterval=p*l,this.chart.time.getTimeTicks({unitRange:p,count:l,unitName:d},t,i,this.options.startOfWeek)}})),N(!0,this.options,e),this.horiz&&(i.minPadding=S(r.minPadding,0),i.maxPadding=S(r.maxPadding,0)),M(i.grid.borderWidth)&&(i.tickWidth=i.lineWidth=s.borderWidth))}function V(t){var e=t.userOptions,i=(null==e?void 0:e.grid)||{},r=i.columns;i.enabled&&r&&N(!0,this.options,r[0])}function X(){(this.grid.columns||[]).forEach(function(t){return t.setScale()})}function U(t){var e=this.horiz,i=this.maxLabelDimensions,r=this.options.grid,s=void 0===r?{}:r;if(s.enabled&&i){var o=2*this.options.labels.distance,n=e?s.cellHeight||o+i.height:o+i.width;I(t.tickSize)?t.tickSize[0]=n:t.tickSize=[n,0]}}function _(){this.axes.forEach(function(t){var e;((null==(e=t.grid)?void 0:e.columns)||[]).forEach(function(t){t.setAxisSize(),t.setAxisTranslation()})})}function K(t){var e=this.grid;(e.columns||[]).forEach(function(e){return e.destroy(t.keepEvents)}),e.columns=void 0}function Y(t){var e=t.userOptions||{},i=e.grid||{};i.enabled&&w(i.borderColor)&&(e.tickColor=e.lineColor=i.borderColor),this.grid||(this.grid=new tt(this)),this.hiddenLabels=[],this.hiddenMarks=[]}function J(t){var e=this.label,i=this.axis,r=i.reversed,s=i.chart,o=i.options.grid||{},a=i.options.labels,l=a.align,d=n[i.side],h=t.tickmarkOffset,c=i.tickPositions,u=this.pos-h,f=M(c[t.index+1])?c[t.index+1]-h:(i.max||0)+h,p=i.tickSize("tick"),v=p?p[0]:0,m=p?p[1]/2:0;if(!0===o.enabled){var g,k=void 0,x=void 0,b=void 0;if("top"===d?g=(k=i.top+i.offset)-v:"bottom"===d?k=(g=s.chartHeight-i.bottom+i.offset)+v:(k=i.top+i.len-(i.translate(r?f:u)||0),g=i.top+i.len-(i.translate(r?u:f)||0)),"right"===d?b=(x=s.chartWidth-i.right+i.offset)+v:"left"===d?x=(b=i.left+i.offset)-v:(x=Math.round(i.left+(i.translate(r?f:u)||0))-m,b=Math.min(Math.round(i.left+(i.translate(r?u:f)||0))-m,i.left+i.len)),this.slotWidth=b-x,t.pos.x="left"===l?x:"right"===l?b:x+(b-x)/2,t.pos.y=g+(k-g)/2,e){var y=s.renderer.fontMetrics(e),P=e.getBBox().height;if(a.useHTML)t.pos.y+=y.b+-(P/2);else{var A=Math.round(P/y.h);t.pos.y+=(y.b-(y.h-y.f))/2+-((A-1)*y.h/2)}}t.pos.x+=i.horiz&&a.x||0}}function Q(t){var e,i=t.axis,r=t.value;if(null==(e=i.options.grid)?void 0:e.enabled){var s=i.tickPositions,o=(i.linkedParent||i).series[0],n=r===s[0],a=r===s[s.length-1],l=o&&T(o.options.data,function(t){return t[i.isXAxis?"x":"y"]===r}),d=void 0;l&&o.is("gantt")&&(d=N(l),f().seriesTypes.gantt.prototype.pointClass.setGanttPointAliases(d,i.chart)),t.isFirst=n,t.isLast=a,t.point=d}}function Z(){var t,e,i=this.options,r=i.grid||{},s=this.categories,o=this.tickPositions,n=o[0],a=o[1],l=o[o.length-1],d=o[o.length-2],h=null==(t=this.linkedParent)?void 0:t.min,c=null==(e=this.linkedParent)?void 0:e.max,u=h||this.min,f=c||this.max,p=this.tickInterval,v=M(u)&&u>=n+p&&u<a,m=M(u)&&n<u&&n+p>u,g=M(f)&&l>f&&l-p<f,k=M(f)&&f<=l-p&&f>d;!0===r.enabled&&!s&&(this.isXAxis||this.isLinked)&&((m||v)&&!i.startOnTick&&(o[0]=u),(g||k)&&!i.endOnTick&&(o[o.length-1]=f))}function $(t){var e,i=this.options.grid;return!0===(void 0===i?{}:i).enabled&&this.categories?this.tickInterval:t.apply(this,(e=arguments,Array.prototype.slice.call(e,1)))}(s=n||(n={}))[s.top=0]="top",s[s.right=1]="right",s[s.bottom=2]="bottom",s[s.left=3]="left";var tt=function(){function t(t){this.axis=t}return t.prototype.isOuterAxis=function(){var t,e=this.axis,i=e.chart,r=e.grid.columnIndex,s=(null==(t=e.linkedParent)?void 0:t.grid.columns)||e.grid.columns||[],o=r?e.linkedParent:e,n=-1,a=0;return 3===e.side&&!i.inverted&&s.length?!e.linkedParent:((i[e.coll]||[]).forEach(function(t,i){t.side!==e.side||t.options.isInternal||(a=i,t===o&&(n=i))}),a===n&&(!M(r)||s.length===r))},t.prototype.renderBorder=function(t){var e=this.axis,i=e.chart.renderer,r=e.options,s=i.path(t).addClass("highcharts-axis-line").add(e.axisGroup);return i.styledMode||s.attr({stroke:r.lineColor,"stroke-width":r.lineWidth,zIndex:7}),s},t}();G.E=function(t){return this.dateFormat("%a",t,!0).charAt(0)},G.W=function(t){var e=this.toParts(t),i=(e[7]+6)%7,r=e.slice(0);r[2]=e[2]-i+3;var s=this.toParts(this.makeTime(r[0],0,1));return 4!==s[7]&&(e[1]=0,e[2]=1+(11-s[7])%7),(1+Math.floor((this.makeTime(r[0],r[1],r[2])-this.makeTime(s[0],s[1],s[2]))/6048e5)).toString()};var te=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)0>e.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(i[r[s]]=t[r[s]]);return i},ti=f().extend,tr=f().isNumber,ts=f().pick;function to(t,e,i,r,s,o){var n,a,l=o&&o.after,d=o&&o.before,h={data:r,depth:i-1,id:t,level:i,parent:e||""},c=0,u=0;"function"==typeof d&&d(h,o);var f=(s[t]||[]).map(function(e){var r=to(e.id,t,i+1,e,s,o),l=e.start||NaN,d=!0===e.milestone?l:e.end||NaN;return n=!tr(n)||l<n?l:n,a=!tr(a)||d>a?d:a,c=c+1+r.descendants,u=Math.max(r.height+1,u),r});return r&&(r.start=ts(r.start,n),r.end=ts(r.end,a)),ti(h,{children:f,descendants:c,height:u}),"function"==typeof l&&l(h,o),h}var tn=function(t,e){var i,r;return to("",null,1,null,(i=[],Object.keys(r=t.reduce(function(t,e){var r=e.parent,s=void 0===r?"":r,o=e.id;return void 0===t[s]&&(t[s]=[]),t[s].push(e),o&&i.push(o),t},{})).forEach(function(t){var e;if(""!==t&&-1===i.indexOf(t)){var s=r[t].map(function(t){return te(t,[])});(e=r[""]).push.apply(e,s),delete r[t]}}),r),e)},ta=f().addEvent,tl=f().correctFloat,td=f().removeEvent,th=f().isObject,tc=f().isNumber,tu=f().pick,tf=f().wrap;function tp(){this.treeGrid||(this.treeGrid=new tg(this))}function tv(t,e,i,r,s,o,n,a,l){var d,h,c,u,f=tu(null==(d=this.options)?void 0:d.labels,o),p=this.pos,v=this.axis,m="treegrid"===v.type,g=t.apply(this,[e,i,r,s,f,n,a,l]);if(m){var k=f&&th(f.symbol,!0)?f.symbol:{},x=k.width,b=k.padding,y=void 0===b?5*!v.linkedParent:b,P=f&&tc(f.indentation)?f.indentation:0;u=(null==(c=null==(h=v.treeGrid.mapOfPosToGridNode)?void 0:h[p])?void 0:c.depth)||1,g.x+=(void 0===x?0:x)+2*y+(u-1)*P}return g}function tm(t){var e,i,r,s,o,n,a,l,d,h,c,u,f,p,v,m=this.pos,g=this.axis,k=this.label,x=this.treeGrid,b=this.options,y=null==x?void 0:x.labelIcon,P=null==k?void 0:k.element,A=g.treeGrid,O=g.options,G=g.chart,B=g.tickPositions,w=A.mapOfPosToGridNode,E=tu(null==b?void 0:b.labels,null==O?void 0:O.labels),T=E&&th(E.symbol,!0)?E.symbol:{},I=null==w?void 0:w[m],M=I||{},N=M.descendants,S=M.depth,L=I&&N&&N>0,C="treegrid"===g.type&&P,z=B.indexOf(m)>-1,W="highcharts-treegrid-node-",j=W+"level-",R=G.styledMode;(C&&I&&k.removeClass(RegExp(j+".*")).addClass(j+S),t.apply(this,Array.prototype.slice.call(arguments,1)),C&&L)?(v=A.isCollapsed(I),e={color:!R&&k.styles.color||"",collapsed:v,group:k.parentGroup,options:T,renderer:k.renderer,show:z,xy:k.xy},s=!(r=this.treeGrid).labelIcon,o=e.renderer,n=e.xy,l=(a=e.options).width||0,d=a.height||0,h=5*(null!=(i=a.padding)?!i:!this.axis.linkedParent),c={x:n.x-l/2-h,y:n.y-d/2},u=e.collapsed?90:180,f=e.show&&tc(c.y),(p=r.labelIcon)||(r.labelIcon=p=o.path(o.symbols[a.type](a.x||0,a.y||0,l,d)).addClass("highcharts-label-icon").add(e.group)),p[f?"show":"hide"](),o.styledMode||p.attr({cursor:"pointer",fill:tu(e.color,"#666666"),"stroke-width":1,stroke:a.lineColor,strokeWidth:a.lineWidth||0}),p[s?"attr":"animate"]({translateX:c.x,translateY:c.y,rotation:u}),k.addClass(W+(v?"collapsed":"expanded")).removeClass(W+(v?"expanded":"collapsed")),R||k.css({cursor:"pointer"}),[k,y].forEach(function(t){t&&!t.attachedTreeGridEvents&&(ta(t.element,"mouseover",function(){k.addClass("highcharts-treegrid-node-active"),k.renderer.styledMode||k.css({textDecoration:"underline"})}),ta(t.element,"mouseout",function(){var t;t=th(E.style)?E.style:{},k.removeClass("highcharts-treegrid-node-active"),k.renderer.styledMode||k.css({textDecoration:t.textDecoration||"none"})}),ta(t.element,"click",function(){x.toggleCollapse()}),t.attachedTreeGridEvents=!0)})):y&&(td(P),null==k||k.css({cursor:"default"}),y.destroy(),x.labelIcon=void 0)}var tg=function(){function t(t){this.tick=t}return t.compose=function(t){var e=t.prototype;e.toggleCollapse||(ta(t,"init",tp),tf(e,"getLabelPosition",tv),tf(e,"renderLabel",tm),e.collapse=function(t){this.treeGrid.collapse(t)},e.expand=function(t){this.treeGrid.expand(t)},e.toggleCollapse=function(t){this.treeGrid.toggleCollapse(t)})},t.prototype.collapse=function(t){var e=this.tick,i=e.pos,r=e.axis,s=r.treeGrid,o=r.brokenAxis,n=s.mapOfPosToGridNode;o&&n&&o.setBreaks(s.collapse(n[i]),null==t||t)},t.prototype.destroy=function(){var t;null==(t=this.labelIcon)||t.destroy()},t.prototype.expand=function(t){var e=this.tick,i=e.pos,r=e.axis,s=r.treeGrid,o=r.brokenAxis,n=s.mapOfPosToGridNode;o&&n&&o.setBreaks(s.expand(n[i]),null==t||t)},t.prototype.toggleCollapse=function(t){void 0===t&&(t=!0);var e,i,r=this.tick,s=r.axis,o=r.pos,n=s.brokenAxis,a=s.treeGrid;if(n&&a.mapOfPosToGridNode){var l=!!(s.scrollbar&&s.staticScale),d=s.pos+s.len+(a.pendingSizeAdjustment||0);if(a.pendingSizeAdjustment=0,n.setBreaks(a.toggleCollapse(a.mapOfPosToGridNode[o]),l&&t),l){var h=s.toValue(s.toPixels(s.dataMax)),c=s.toValue(d)-s.tickmarkOffset,u=null!=(e=s.userMin)?e:s.min;if(a.adjustedMax=h!==s.dataMax?h-s.tickmarkOffset:void 0,c>s.dataMax){var f=d-s.toPixels(s.dataMax+s.tickmarkOffset);c=null!=(i=a.adjustedMax)?i:s.dataMax,(u=s.toValue(s.toPixels(u-s.tickmarkOffset)-f)+s.tickmarkOffset)<s.dataMin&&(f=s.toPixels(s.dataMin)-s.toPixels(u),u=s.dataMin,a.pendingSizeAdjustment=f)}s.setExtremes(tl(u),tl(c),!1,!1,{trigger:"toggleCollapse"})}t&&s.chart.redraw()}},t}(),tk=h(620),tx=(f().extend,f().isArray),tb=f().isNumber,ty=f().isObject,tP=f().merge,tA=f().pick,tO=(f().relativeLength,function(t){var e,i,r,s,o,n,a={};if(ty(t))for(s=tb(t.from)?t.from:1,n=t.levels,i={},e=ty(t.defaults)?t.defaults:{},tx(n)&&(i=n.reduce(function(t,i){var r,o,n;return ty(i)&&tb(i.level)&&(o=tA((n=tP({},i)).levelIsConstant,e.levelIsConstant),delete n.levelIsConstant,delete n.level,ty(t[r=i.level+(o?0:s-1)])?tP(!0,t[r],n):t[r]=n),t},{})),o=tb(t.to)?t.to:1,r=0;r<=o;r++)a[r]=tP({},e,ty(i[r])?i[r]:{});return a}),tG=f().addEvent,tB=f().isArray,tw=f().splat,tE=f().find,tT=f().fireEvent,tI=f().isObject,tM=f().isString,tN=f().merge,tS=f().removeEvent,tL=f().wrap;function tC(t){return{from:t.collapseStart||0,to:t.collapseEnd||0,showPoints:!1}}function tz(t,e,i){var r,s,o=[],n=[],a={},l=e||!1,d={},h=-1,c=tn(t,{after:function(t){var e=d[t.pos],i=0,r=0;e.children.forEach(function(t){r+=(t.descendants||0)+1,i=Math.max((t.height||0)+1,i)}),e.descendants=r,e.height=i,e.collapsed&&n.push(e)},before:function(t){var e,i,r=tI(t.data,!0)?t.data:{},s=tM(r.name)?r.name:"",n=a[t.parent],c=tI(n,!0)?d[n.pos]:null;l&&tI(c,!0)&&(e=tE(c.children,function(t){return t.name===s}))?(i=e.pos,e.nodes.push(t)):i=h++,!d[i]&&(d[i]=e={depth:c?c.depth+1:0,name:s,id:r.id,nodes:[t],children:[],pos:i},-1!==i&&o.push(s),tI(c,!0)&&c.children.push(e)),tM(t.id)&&(a[t.id]=t),e&&!0===r.collapsed&&(e.collapsed=!0),t.pos=i}});return r=d,{categories:o,mapOfIdToNode:a,mapOfPosToGridNode:d=(s=function(t,e,r){var o=t.nodes,n=e+(-1===e?0:i-1),a=(n-e)/2,l=e+a;return o.forEach(function(t){var i=t.data;tI(i,!0)&&(i.y=e+(i.seriesIndex||0),delete i.seriesIndex),t.pos=l}),r[l]=t,t.pos=l,t.tickmarkOffset=a+.5,t.collapseStart=n+.5,t.children.forEach(function(t){s(t,n+1,r),n=(t.collapseEnd||0)-.5}),t.collapseEnd=n+.5,r})(r["-1"],-1,{}),collapsedNodes:n,tree:c}}function tW(t){var e=t.target;e.axes.filter(function(t){return"treegrid"===t.type}).forEach(function(i){var r,s,o,n=i.options,a=n.labels,l=i.uniqueNames,d=e.time.parse(n.max),h=!i.treeGrid.mapOfPosToGridNode||i.series.some(function(t){return!t.hasRendered||t.isDirtyData||t.isDirty}),c=0;if(h){var u=[];if(s=i.series.reduce(function(t,i){var r=i.options.data||[],s=r[0],o=Array.isArray(s)&&!s.find(function(t){return"object"==typeof t});return u.push(o),i.visible&&(r.forEach(function(r){var s;(o||(null==(s=i.options.keys)?void 0:s.length))&&(r=i.pointClass.prototype.optionsToObject.call({series:i},r),i.pointClass.setGanttPointAliases(r,e)),tI(r,!0)&&(r.seriesIndex=c,t.push(r))}),!0===l&&c++),t},[]),d&&s.length<d)for(var f=s.length;f<=d;f++)s.push({name:f+"​"});i.categories=(o=tz(s,l||!1,!0===l?c:1)).categories,i.treeGrid.mapOfPosToGridNode=o.mapOfPosToGridNode,i.hasNames=!0,i.treeGrid.tree=o.tree,i.series.forEach(function(t,e){var i=(t.options.data||[]).map(function(i){var r;return(u[e]||tB(i)&&(null==(r=t.options.keys)?void 0:r.length))&&s.forEach(function(t){var e=tw(i);e.indexOf(t.x||0)>=0&&e.indexOf(t.x2||0)>=0&&(i=t)}),tI(i,!0)?tN(i):i});t.visible&&t.setData(i,!1)}),i.treeGrid.mapOptionsToLevel=tO({defaults:a,from:1,levels:null==a?void 0:a.levels,to:null==(r=i.treeGrid.tree)?void 0:r.height}),"beforeRender"===t.type&&(i.treeGrid.collapsedNodes=o.collapsedNodes)}})}function tj(t,e){var i,r,s,o=this.treeGrid.mapOptionsToLevel||{},n="treegrid"===this.type,l=this.ticks,d=l[e];n&&this.treeGrid.mapOfPosToGridNode?((i=o[(s=this.treeGrid.mapOfPosToGridNode[e]).depth])&&(r={labels:i}),!d&&a?l[e]=d=new a(this,e,void 0,void 0,{category:s.name,tickmarkOffset:s.tickmarkOffset,options:r}):(d.parameters.category=s.name,d.options=r,d.addLabel())):t.apply(this,Array.prototype.slice.call(arguments,1))}function tR(t,e,i,r){var s=this,o="treegrid"===i.type;s.treeGrid||(s.treeGrid=new tH(s)),o&&(tG(e,"beforeRender",tW),tG(e,"beforeRedraw",tW),tG(e,"addSeries",function(t){if(t.options.data){var e=tz(t.options.data,i.uniqueNames||!1,1);s.treeGrid.collapsedNodes=(s.treeGrid.collapsedNodes||[]).concat(e.collapsedNodes)}}),tG(s,"foundExtremes",function(){var t;null==(t=s.treeGrid.collapsedNodes)||t.forEach(function(t){var e=s.treeGrid.collapse(t);s.brokenAxis&&(s.brokenAxis.setBreaks(e,!1),s.treeGrid.collapsedNodes&&(s.treeGrid.collapsedNodes=s.treeGrid.collapsedNodes.filter(function(e){return t.collapseStart!==e.collapseStart||t.collapseEnd!==e.collapseEnd})))})}),tG(s,"afterBreaks",function(){"yAxis"===s.coll&&!s.staticScale&&s.chart.options.chart.height&&(s.isDirty=!0)}),i=tN({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}},uniqueNames:!1},i,{reversed:!0})),t.apply(s,[e,i,r]),o&&(s.hasNames=!0,s.options.showLastLabel=!0)}function tD(t){var e,i,r,s,o,n,a,l=this.options,d=this.chart.time,h="number"==typeof l.linkedTo?null==(e=this.chart[this.coll])?void 0:e[l.linkedTo]:void 0;if("treegrid"===this.type){if(this.min=null!=(r=null!=(i=this.userMin)?i:d.parse(l.min))?r:this.dataMin,this.max=null!=(o=null!=(s=this.userMax)?s:d.parse(l.max))?o:this.dataMax,tT(this,"foundExtremes"),this.setAxisTranslation(),this.tickInterval=1,this.tickmarkOffset=.5,this.tickPositions=this.treeGrid.mapOfPosToGridNode?this.treeGrid.getTickPositions():[],h){var c=h.getExtremes();this.min=null!=(n=c.min)?n:c.dataMin,this.max=null!=(a=c.max)?a:c.dataMax,this.tickPositions=h.tickPositions}this.linkedParent=h}else t.apply(this,Array.prototype.slice.call(arguments,1))}function tq(t){var e=this;"treegrid"===this.type&&e.visible&&e.tickPositions.forEach(function(t){var i,r=e.ticks[t];(null==(i=r.label)?void 0:i.attachedTreeGridEvents)&&(tS(r.label.element),r.label.attachedTreeGridEvents=!1)}),t.apply(e,Array.prototype.slice.call(arguments,1))}var tH=function(){function t(t){this.pendingSizeAdjustment=0,this.axis=t}return t.compose=function(t,e,i,r){if(!t.keepProps.includes("treeGrid")){var s,o,n,l=t.prototype;t.keepProps.push("treeGrid"),tL(l,"generateTick",tj),tL(l,"init",tR),tL(l,"setTickInterval",tD),tL(l,"redraw",tq),l.utils={getNode:to},a||(a=r)}return s=t,o=e,n=r,s.keepProps.includes("grid")||(s.keepProps.push("grid"),s.prototype.getMaxLabelDimensions=W,C(s.prototype,"unsquish",$),C(s.prototype,"getOffset",j),B(s,"init",Y),B(s,"afterGetTitlePosition",R),B(s,"afterInit",D),B(s,"afterRender",q),B(s,"afterSetAxisTranslation",H),B(s,"afterSetOptions",F),B(s,"afterSetOptions",V),B(s,"afterSetScale",X),B(s,"afterTickSize",U),B(s,"trimTicks",Z),B(s,"destroy",K),B(o,"afterSetChartSize",_),B(n,"afterGetLabelPosition",J),B(n,"labelFormat",Q)),P.compose(t,i),tg.compose(r),t},t.prototype.setCollapsedStatus=function(t){var e=this.axis,i=e.chart;e.series.forEach(function(e){var r=e.options.data;if(t.id&&r){var s=i.get(t.id),o=r[e.data.indexOf(s)];s&&o&&(s.collapsed=t.collapsed,o.collapsed=t.collapsed)}})},t.prototype.collapse=function(t){var e=this.axis,i=e.options.breaks||[],r=tC(t);return i.push(r),t.collapsed=!0,e.treeGrid.setCollapsedStatus(t),i},t.prototype.expand=function(t){var e,i=this.axis,r=tC(t);return t.collapsed=!1,i.treeGrid.setCollapsedStatus(t),(null==(e=i.options.breaks)?void 0:e.reduce(function(t,e){return(e.to!==r.to||e.from!==r.from)&&t.push(e),t},[]))||[]},t.prototype.getTickPositions=function(){var t=this.axis,e=Math.floor(t.min/t.tickInterval)*t.tickInterval,i=Math.ceil(t.max/t.tickInterval)*t.tickInterval;return Object.keys(t.treeGrid.mapOfPosToGridNode||{}).reduce(function(r,s){var o,n=+s;return n>=e&&n<=i&&!(null==(o=t.brokenAxis)?void 0:o.isInAnyBreak(n))&&r.push(n),r},[])},t.prototype.isCollapsed=function(t){var e=this.axis.options.breaks||[],i=tC(t);return e.some(function(t){return t.from===i.from&&t.to===i.to})},t.prototype.toggleCollapse=function(t){return this.isCollapsed(t)?this.expand(t):this.collapse(t)},t}(),tF=f();tH.compose(tF.Axis,tF.Chart,tF.Series,tF.Tick);var tV=f();return c.default}()});