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

 Tree Grid

 (c) 2016-2019 Jon Arild Nygard

 License: www.highcharts.com/license
*/
(function(k){"object"===typeof module&&module.exports?(k["default"]=k,module.exports=k):"function"===typeof define&&define.amd?define("highcharts/modules/treegrid",["highcharts"],function(y){k(y);k.Highcharts=y;return k}):k("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(k){function y(b,n,k,r){b.hasOwnProperty(n)||(b[n]=r.apply(null,k))}k=k?k._modules:{};y(k,"parts-gantt/GridAxis.js",[k["parts/Globals.js"]],function(b){var n=b.addEvent,k=b.dateFormat,r=b.defined,v=b.isArray,z=b.isNumber,
t=function(c){return b.isObject(c,!0)},p=b.merge,m=b.pick,h=b.wrap,e=b.Axis,g=b.Tick,l={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};e.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};e.prototype.isOuterAxis=function(){var c=this,a=-1,f=!0;c.chart.axes.forEach(function(d,q){d.side!==c.side||d.isNavigatorAxis()||(d===c?a=q:0<=a&&q>a&&(f=!1))});return f};e.prototype.getMaxLabelDimensions=function(c,a){var f={width:0,height:0};
a.forEach(function(a){a=c[a];var d;t(a)&&(d=t(a.label)?a.label:{},a=d.getBBox?d.getBBox().height:0,d=z(d.textPxLength)?d.textPxLength:0,f.height=Math.max(a,f.height),f.width=Math.max(d,f.width))});return f};b.dateFormats.W=function(c){c=new Date(c);var a;c.setHours(0,0,0,0);c.setDate(c.getDate()-(c.getDay()||7));a=new Date(c.getFullYear(),0,1);return Math.ceil(((c-a)/864E5+1)/7)};b.dateFormats.E=function(c){return k("%a",c,!0).charAt(0)};n(g,"afterGetLabelPosition",function(c){var a=this.label,f=
this.axis,d=f.reversed,q=f.chart,e=f.options,b=e&&t(e.grid)?e.grid:{},e=f.options.labels,g=e.align,u=l[f.side],h=c.tickmarkOffset,p=f.tickPositions,m=this.pos-h,p=z(p[c.index+1])?p[c.index+1]-h:f.max+h,n=f.tickSize("tick",!0),h=v(n)?n[0]:0,n=n&&n[1]/2,x;!0===b.enabled&&("top"===u?(b=f.top+f.offset,x=b-h):"bottom"===u?(x=q.chartHeight-f.bottom+f.offset,b=x+h):(b=f.top+f.len-f.translate(d?p:m),x=f.top+f.len-f.translate(d?m:p)),"right"===u?(u=q.chartWidth-f.right+f.offset,d=u+h):"left"===u?(d=f.left+
f.offset,u=d-h):(u=Math.round(f.left+f.translate(d?p:m))-n,d=Math.round(f.left+f.translate(d?m:p))-n),this.slotWidth=d-u,c.pos.x="left"===g?u:"right"===g?d:u+(d-u)/2,c.pos.y=x+(b-x)/2,q=q.renderer.fontMetrics(e.style.fontSize,a.element),a=a.getBBox().height,e.useHTML?c.pos.y+=q.b+-(a/2):(a=Math.round(a/q.h),c.pos.y+=(q.b-(q.h-q.f))/2+-((a-1)*q.h/2)),c.pos.x+=f.horiz&&e.x||0)});n(e,"afterTickSize",function(c){var a=this.maxLabelDimensions,f=this.options;!0===(f&&t(f.grid)?f.grid:{}).enabled&&(f=2*
Math.abs(this.defaultLeftAxisOptions.labels.x),a=f+(this.horiz?a.height:a.width),v(c.tickSize)?c.tickSize[0]=a:c.tickSize=[a])});n(e,"afterGetTitlePosition",function(c){var a=this.options;if(!0===(a&&t(a.grid)?a.grid:{}).enabled){var f=this.axisTitle,d=f&&f.getBBox().width,e=this.horiz,b=this.left,g=this.top,h=this.width,p=this.height,n=a.title,a=this.opposite,r=this.offset,k=this.tickSize()||[0],B=n.x||0,x=n.y||0,A=m(n.margin,e?5:10),f=this.chart.renderer.fontMetrics(n.style&&n.style.fontSize,f).f,
k=(e?g+p:b)+k[0]/2*(a?-1:1)*(e?1:-1)+(this.side===l.bottom?f:0);c.titlePosition.x=e?b-d/2-A+B:k+(a?h:0)+r+B;c.titlePosition.y=e?k-(a?p:0)+(a?f:-f)/2+r+x:g-A+x}});h(e.prototype,"unsquish",function(c){var a=this.options;return!0===(a&&t(a.grid)?a.grid:{}).enabled&&this.categories?this.tickInterval:c.apply(this,Array.prototype.slice.call(arguments,1))});n(e,"afterSetOptions",function(c){var a=this.options;c=c.userOptions;var f,d=a&&t(a.grid)?a.grid:{};!0===d.enabled&&(f=p(!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&&(r(c.linkedTo)&&!r(c.tickPixelInterval)&&(f.tickPixelInterval=
350),r(c.tickPixelInterval)||!r(c.linkedTo)||r(c.tickPositioner)||r(c.tickInterval)||(f.tickPositioner=function(a,c){var d=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(d){var e,q,g,h,l=f.units;for(h=0;h<l.length;h++)if(l[h][0]===d.unitName){e=h;break}if(l[e][1])return l[e+1]&&(g=l[e+1][0],q=(l[e+1][1]||[1])[0]),d=b.timeUnits[g],this.tickInterval=d*q,this.getTimeTicks({unitRange:d,count:q,unitName:g},a,c,this.options.startOfWeek)}})),p(!0,this.options,
f),this.horiz&&(a.minPadding=m(c.minPadding,0),a.maxPadding=m(c.maxPadding,0)),z(a.grid.borderWidth)&&(a.tickWidth=a.lineWidth=d.borderWidth))});n(e,"afterSetAxisTranslation",function(){var c=this.options,a=c&&t(c.grid)?c.grid:{},f=this.tickPositions&&this.tickPositions.info,d=this.userOptions.labels||{};this.horiz&&(!0===a.enabled&&this.series.forEach(function(a){a.options.pointRange=0}),f&&(!1===c.dateTimeLabelFormats[f.unitName].range||1<f.count)&&!r(d.align)&&(c.labels.align="left",r(d.x)||(c.labels.x=
3)))});n(e,"trimTicks",function(){var c=this.options,a=c&&t(c.grid)?c.grid:{},f=this.categories,d=this.tickPositions,e=d[0],b=d[d.length-1],g=this.linkedParent&&this.linkedParent.min||this.min,l=this.linkedParent&&this.linkedParent.max||this.max,h=this.tickInterval;!0!==a.enabled||f||!this.horiz&&!this.isLinked||((e>g||e<g&&e+h>g)&&!c.startOnTick&&(d[0]=g),(b<l||b>l&&b-h<l)&&!c.endOnTick&&(d[d.length-1]=l))});n(e,"afterRender",function(){var c=this.options,a=c&&t(c.grid)?c.grid:{},e,d,b,g,h,p,u=this.chart.renderer,
m=this.horiz;if(!0===a.enabled&&(a=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),a=this.maxLabelDimensions.width+a,e=c.lineWidth,this.rightWall&&this.rightWall.destroy(),d=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(m&&(a=d.height-1),e))){d=this.getLinePath(e);h=d.indexOf("M")+1;p=d.indexOf("L")+1;b=d.indexOf("M")+2;g=d.indexOf("L")+2;if(this.side===l.top||this.side===l.left)a=-a;m?(d[b]+=a,d[g]+=
a):(d[h]+=a,d[p]+=a);this.axisLineExtra?this.axisLineExtra.animate({d:d}):this.axisLineExtra=u.path(d).attr({stroke:c.lineColor,"stroke-width":e,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}});n(e,"init",function(c){function a(){var a=f.options,d=25/11,c=f.chart.renderer.fontMetrics(a.labels.style.fontSize);a.labels||(a.labels={});a.labels.align=m(a.labels.align,"center");f.categories||(a.showLastLabel=!1);f.horiz&&(a.tickLength=g.cellHeight||
c.h*d);f.labelRotation=0;a.labels.rotation=0}var f=this,d=f.chart,g=(c=c.userOptions)&&t(c.grid)?c.grid:{},l,k,w;if(g.enabled)if(r(g.borderColor)&&(c.tickColor=c.lineColor=g.borderColor),v(g.columns)){k=0;for(w=g.columns.length;w--;)l=p(c,g.columns[w],{type:"category"}),delete l.grid.columns,l=new e(f.chart,l),l.isColumn=!0,l.columnIndex=k,h(l,"labelFormatter",function(a){var d=this.axis,c=d.tickPositions,e=this.value,f=e===c[0],c=e===c[c.length-1],g=b.find(d.series[0].options.data,function(a){return a[d.isXAxis?
"x":"y"]===e});this.isFirst=f;this.isLast=c;this.point=g;return a.call(this)}),k++;n(this,"afterInit",function(){b.erase(d.axes,this);b.erase(d[f.coll],this)})}else n(this,"afterInit",a)})});y(k,"parts-gantt/Tree.js",[k["parts/Globals.js"]],function(b){var n=b.extend,k=b.isNumber,r=b.pick,v=function(b,p){var m=b.reduce(function(b,e){var g=r(e.parent,"");void 0===b[g]&&(b[g]=[]);b[g].push(e);return b},{});Object.keys(m).forEach(function(b,e){var g=m[b];""!==b&&-1===p.indexOf(b)&&(g.forEach(function(b){e[""].push(b)}),
delete e[b])});return m},z=function(b,p,m,h,e,g){var l=0,c=0,a=g&&g.after,f=g&&g.before;p={data:h,depth:m-1,id:b,level:m,parent:p};var d,q;"function"===typeof f&&f(p,g);f=(e[b]||[]).map(function(a){var f=z(a.id,b,m+1,a,e,g),h=a.start;a=!0===a.milestone?h:a.end;d=!k(d)||h<d?h:d;q=!k(q)||a>q?a:q;l=l+1+f.descendants;c=Math.max(f.height+1,c);return f});h&&(h.start=r(h.start,d),h.end=r(h.end,q));n(p,{children:f,descendants:l,height:c});"function"===typeof a&&a(p,g);return p};return{getListOfParents:v,
getNode:z,getTree:function(b,p){var m=b.map(function(b){return b.id});b=v(b,m);return z("",null,1,null,b,p)}}});y(k,"mixins/tree-series.js",[k["parts/Globals.js"]],function(b){var n=b.extend,k=b.isArray,r=b.isObject,v=b.isNumber,z=b.merge,t=b.pick;return{getColor:function(p,m){var h=m.index,e=m.mapOptionsToLevel,g=m.parentColor,l=m.parentColorIndex,c=m.series,a=m.colors,f=m.siblings,d=c.points,q=c.chart.options.chart,n,k,w,u;if(p){d=d[p.i];p=e[p.level]||{};if(e=d&&p.colorByPoint)k=d.index%(a?a.length:
q.colorCount),n=a&&a[k];if(!c.chart.styledMode){a=d&&d.options.color;q=p&&p.color;if(w=g)w=(w=p&&p.colorVariation)&&"brightness"===w.key?b.color(g).brighten(h/f*w.to).get():g;w=t(a,q,n,w,c.color)}u=t(d&&d.options.colorIndex,p&&p.colorIndex,k,l,m.colorIndex)}return{color:w,colorIndex:u}},getLevelOptions:function(b){var p=null,h,e,g,l;if(r(b))for(p={},g=v(b.from)?b.from:1,l=b.levels,e={},h=r(b.defaults)?b.defaults:{},k(l)&&(e=l.reduce(function(c,a){var b,d;r(a)&&v(a.level)&&(d=z({},a),b="boolean"===
typeof d.levelIsConstant?d.levelIsConstant:h.levelIsConstant,delete d.levelIsConstant,delete d.level,a=a.level+(b?0:g-1),r(c[a])?n(c[a],d):c[a]=d);return c},{})),l=v(b.to)?b.to:1,b=0;b<=l;b++)p[b]=z({},h,r(e[b])?e[b]:{});return p},setTreeValues:function m(b,e){var g=e.before,l=e.idRoot,c=e.mapIdToNode[l],a=e.points[b.i],f=a&&a.options||{},d=0,q=[];n(b,{levelDynamic:b.level-(("boolean"===typeof e.levelIsConstant?e.levelIsConstant:1)?0:c.level),name:t(a&&a.name,""),visible:l===b.id||("boolean"===typeof e.visible?
e.visible:!1)});"function"===typeof g&&(b=g(b,e));b.children.forEach(function(a,c){var f=n({},e);n(f,{index:c,siblings:b.children.length,visible:b.visible});a=m(a,f);q.push(a);a.visible&&(d+=a.val)});b.visible=0<d||b.visible;g=t(f.value,d);n(b,{children:q,childrenTotal:d,isLeaf:b.visible&&!d,val:g});return b},updateRootId:function(b){var h;r(b)&&(h=r(b.options)?b.options:{},h=t(b.rootNode,h.rootId,""),r(b.userOptions)&&(b.userOptions.rootId=h),b.rootNode=h);return h}}});y(k,"modules/broken-axis.src.js",
[k["parts/Globals.js"]],function(b){var n=b.addEvent,k=b.pick,r=b.extend,v=b.isArray,z=b.find,t=b.fireEvent,p=b.Axis,m=b.Series,h=function(b,g){return z(g,function(e){return e.from<b&&b<e.to})};r(p.prototype,{isInBreak:function(b,g){var e=b.repeat||Infinity,c=b.from,a=b.to-b.from;g=g>=c?(g-c)%e:e-(c-g)%e;return b.inclusive?g<=a:g<a&&0!==g},isInAnyBreak:function(b,g){var e=this.options.breaks,c=e&&e.length,a,f,d;if(c){for(;c--;)this.isInBreak(e[c],b)&&(a=!0,f||(f=k(e[c].showPoints,!this.isXAxis)));
d=a&&g?a&&!f:a}return d}});n(p,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});n(p,"afterSetTickPositions",function(){if(this.isBroken){var b=this.tickPositions,g=this.tickPositions.info,l=[],c;for(c=0;c<b.length;c++)this.isInAnyBreak(b[c])||l.push(b[c]);this.tickPositions=l;this.tickPositions.info=g}});n(p,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});p.prototype.setBreaks=function(b,g){function e(b){var c=b,d,e;for(e=
0;e<a.breakArray.length;e++)if(d=a.breakArray[e],d.to<=b)c-=d.len;else if(d.from>=b)break;else if(a.isInBreak(d,b)){c-=b-d.from;break}return c}function c(b){var c,d;for(d=0;d<a.breakArray.length&&!(c=a.breakArray[d],c.from>=b);d++)c.to<b?b+=c.len:a.isInBreak(c,b)&&(b+=c.len);return b}var a=this,f=v(b)&&!!b.length;a.isDirty=a.isBroken!==f;a.isBroken=f;a.options.breaks=a.userOptions.breaks=b;a.forceRedraw=!0;f||a.val2lin!==e||(delete a.val2lin,delete a.lin2val);f&&(a.userOptions.ordinal=!1,a.val2lin=
e,a.lin2val=c,a.setExtremes=function(a,b,c,e,f){if(this.isBroken){for(var d,g=this.options.breaks;d=h(a,g);)a=d.to;for(;d=h(b,g);)b=d.from;b<a&&(b=a)}p.prototype.setExtremes.call(this,a,b,c,e,f)},a.setAxisTranslation=function(b){p.prototype.setAxisTranslation.call(this,b);this.unitLength=null;if(this.isBroken){b=a.options.breaks;var c=[],d=[],e=0,f,g,l=a.userMin||a.min,h=a.userMax||a.max,n=k(a.pointRangePadding,0),m,x;b.forEach(function(b){g=b.repeat||Infinity;a.isInBreak(b,l)&&(l+=b.to%g-l%g);a.isInBreak(b,
h)&&(h-=h%g-b.from%g)});b.forEach(function(a){m=a.from;for(g=a.repeat||Infinity;m-g>l;)m-=g;for(;m<l;)m+=g;for(x=m;x<h;x+=g)c.push({value:x,move:"in"}),c.push({value:x+(a.to-a.from),move:"out",size:a.breakSize})});c.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});f=0;m=l;c.forEach(function(a){f+="in"===a.move?1:-1;1===f&&"in"===a.move&&(m=a.value);0===f&&(d.push({from:m,to:a.value,len:a.value-m-(a.size||0)}),e+=a.value-m-(a.size||0))});a.breakArray=
d;a.unitLength=h-l-e+n;t(a,"afterBreaks");a.staticScale?a.transA=a.staticScale:a.unitLength&&(a.transA*=(h-a.min+n)/a.unitLength);n&&(a.minPixelPadding=a.transA*a.minPointOffset);a.min=l;a.max=h}});k(g,!0)&&this.chart.redraw()};n(m,"afterGeneratePoints",function(){var b=this.xAxis,g=this.yAxis,l=this.points,c,a=l.length,f=this.options.connectNulls,d;if(b&&g&&(b.options.breaks||g.options.breaks))for(;a--;)c=l[a],d=null===c.y&&!1===f,d||!b.isInAnyBreak(c.x,!0)&&!g.isInAnyBreak(c.y,!0)||(l.splice(a,
1),this.data[a]&&this.data[a].destroyElements())});n(m,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,k(this.pointArrayMap,["y"]))});b.Series.prototype.drawBreaks=function(b,g){var e=this,c=e.points,a,f,d,h;b&&g.forEach(function(g){a=b.breakArray||[];f=b.isXAxis?b.min:k(e.options.threshold,b.min);c.forEach(function(c){h=k(c["stack"+g.toUpperCase()],c[g]);a.forEach(function(a){d=!1;if(f<a.from&&h>a.to||f>a.from&&h<a.from)d="pointBreak";else if(f<a.from&&h>a.from&&
h<a.to||f>a.from&&h>a.to&&h<a.from)d="pointInBreak";d&&t(b,d,{point:c,brk:a})})})})};b.Series.prototype.gappedPath=function(){var e=this.currentDataGrouping,g=e&&e.gapSize,e=this.options.gapSize,l=this.points.slice(),c=l.length-1,a=this.yAxis;if(e&&0<c)for("value"!==this.options.gapUnit&&(e*=this.closestPointRange),g&&g>e&&(e=g);c--;)l[c+1].x-l[c].x>e&&(g=(l[c].x+l[c+1].x)/2,l.splice(c+1,0,{isNull:!0,x:g}),this.options.stacking&&(g=a.stacks[this.stackKey][g]=new b.StackItem(a,a.options.stackLabels,
!1,g,this.stack),g.total=0));return this.getGraphPath(l)}});y(k,"parts-gantt/TreeGrid.js",[k["parts/Globals.js"],k["parts-gantt/Tree.js"],k["mixins/tree-series.js"]],function(b,k,y){var n=b.addEvent,v=function(a){return Array.prototype.slice.call(a,1)},z=b.defined,t=b.extend,p=b.find,m=b.fireEvent,h=y.getLevelOptions,e=b.merge,g=b.isNumber,l=function(a){return b.isObject(a,!0)},c=b.isString,a=b.pick,f=b.wrap;y=b.Axis;var d=b.Tick,q=function(a,b){var c,d;for(c in b)b.hasOwnProperty(c)&&(d=b[c],f(a,
c,d))},C=function(a,b){var c=a.collapseStart;a=a.collapseEnd;a>=b&&(c-=.5);return{from:c,to:a,showPoints:!1}},E=function(a){return Object.keys(a.mapOfPosToGridNode).reduce(function(b,c){c=+c;a.min<=c&&a.max>=c&&!a.isInAnyBreak(c)&&b.push(c);return b},[])},w=function(a,b){var c=a.options.breaks||[],d=C(b,a.max);return c.some(function(a){return a.from===d.from&&a.to===d.to})},u=function(a,b){var c=a.options.breaks||[];a=C(b,a.max);c.push(a);return c},D=function(a,b){var c=a.options.breaks||[],d=C(b,
a.max);return c.reduce(function(a,b){b.to===d.to&&b.from===d.from||a.push(b);return a},[])},F=function(c,d){var f=c.labelIcon,e=!f,g=d.renderer,l=d.xy,h=d.options,A=h.width,k=h.height,p=l.x-A/2-h.padding,l=l.y-k/2,n=d.collapsed?90:180,m=d.show&&b.isNumber(l);e&&(c.labelIcon=f=g.path(g.symbols[h.type](h.x,h.y,A,k)).addClass("highcharts-label-icon").add(d.group));m||f.attr({y:-9999});g.styledMode||f.attr({"stroke-width":1,fill:a(d.color,"#666666")}).css({cursor:"pointer",stroke:h.lineColor,strokeWidth:h.lineWidth});
f[e?"attr":"animate"]({translateX:p,translateY:l,rotation:n})},G=function(a,b,d){var f=[],e=[],g={},h={},A=-1,n="boolean"===typeof b?b:!1;a=k.getTree(a,{after:function(a){a=h[a.pos];var b=0,c=0;a.children.forEach(function(a){c+=a.descendants+1;b=Math.max(a.height+1,b)});a.descendants=c;a.height=b;a.collapsed&&e.push(a)},before:function(a){var b=l(a.data)?a.data:{},d=c(b.name)?b.name:"",e=g[a.parent],e=l(e)?h[e.pos]:null,k=function(a){return a.name===d},m;n&&l(e)&&(m=p(e.children,k))?(k=m.pos,m.nodes.push(a)):
k=A++;h[k]||(h[k]=m={depth:e?e.depth+1:0,name:d,nodes:[a],children:[],pos:k},-1!==k&&f.push(d),l(e)&&e.children.push(m));c(a.id)&&(g[a.id]=a);!0===b.collapsed&&(m.collapsed=!0);a.pos=k}});h=function(a,b){var c=function(a,d,e){var f=d+(-1===d?0:b-1),g=(f-d)/2,h=d+g;a.nodes.forEach(function(a){var b=a.data;l(b)&&(b.y=d+b.seriesIndex,delete b.seriesIndex);a.pos=h});e[h]=a;a.pos=h;a.tickmarkOffset=g+.5;a.collapseStart=f+.5;a.children.forEach(function(a){c(a,f+1,e);f=a.collapseEnd-.5});a.collapseEnd=f+
.5;return e};return c(a["-1"],-1,{})}(h,d);return{categories:f,mapOfIdToNode:g,mapOfPosToGridNode:h,collapsedNodes:e,tree:a}},B=function(a){a.target.axes.filter(function(a){return"treegrid"===a.options.type}).forEach(function(a){var c=a.options||{},d=c.labels,f,g=c.uniqueNames,k=0,c=a.series.reduce(function(a,b){b.visible&&(b.options.data.forEach(function(b){l(b)&&(b.seriesIndex=k,a.push(b))}),!0===g&&k++);return a},[]),m=G(c,g,!0===g?k:1);a.categories=m.categories;a.mapOfPosToGridNode=m.mapOfPosToGridNode;
a.hasNames=!0;a.tree=m.tree;a.series.forEach(function(a){var b=a.options.data.map(function(a){return l(a)?e(a):a});a.visible&&a.setData(b,!1)});a.mapOptionsToLevel=h({defaults:d,from:1,levels:d.levels,to:a.tree.height});f=b.addEvent(a,"foundExtremes",function(){m.collapsedNodes.forEach(function(b){b=u(a,b);a.setBreaks(b,!1)});f()})})};q(y.prototype,{init:function(a,b,c){var d="treegrid"===c.type;d&&(n(b,"beforeRender",B),n(b,"beforeRedraw",B),c=e({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},
{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10,padding:5}},uniqueNames:!1},c,{reversed:!0,grid:{columns:void 0}}));a.apply(this,[b,c]);d&&(this.hasNames=!0,this.options.showLastLabel=!0)},getMaxLabelDimensions:function(a){var b=this.options,c=b&&b.labels,b=c&&g(c.indentation)?b.labels.indentation:0,c=a.apply(this,v(arguments)),d;"treegrid"===this.options.type&&this.mapOfPosToGridNode&&(d=this.mapOfPosToGridNode[-1].height,c.width+=b*(d-1));return c},generateTick:function(a,
b){var c=l(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},e=this.ticks,f=e[b],g,h;"treegrid"===this.options.type?(h=this.mapOfPosToGridNode[b],(c=c[h.depth])&&(g={labels:c}),f?(f.parameters.category=h.name,f.options=g,f.addLabel()):e[b]=new d(this,b,null,void 0,{category:h.name,tickmarkOffset:h.tickmarkOffset,options:g})):a.apply(this,v(arguments))},setTickInterval:function(b){var c=this.options;"treegrid"===c.type?(this.min=a(this.userMin,c.min,this.dataMin),this.max=a(this.userMax,c.max,this.dataMax),
m(this,"foundExtremes"),this.setAxisTranslation(!0),this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.mapOfPosToGridNode?E(this):[]):b.apply(this,v(arguments))}});q(d.prototype,{getLabelPosition:function(b,c,d,f,e,h,k,m,p){var n=a(this.options&&this.options.labels,h);h=this.pos;var q=this.axis,A="treegrid"===q.options.type;b=b.apply(this,[c,d,f,e,n,k,m,p]);A&&(c=n&&l(n.symbol)?n.symbol:{},n=n&&g(n.indentation)?n.indentation:0,h=(h=(q=q.mapOfPosToGridNode)&&q[h])&&h.depth||1,b.x+=
c.width+2*c.padding+(h-1)*n);return b},renderLabel:function(c){var d=this,f=d.pos,e=d.axis,g=d.label,h=e.mapOfPosToGridNode,k=e.options,m=a(d.options&&d.options.labels,k&&k.labels),n=m&&l(m.symbol)?m.symbol:{},p=(h=h&&h[f])&&h.depth,k="treegrid"===k.type,q=!(!g||!g.element),r=-1<e.tickPositions.indexOf(f),f=e.chart.styledMode;k&&h&&q&&g.addClass("highcharts-treegrid-node-level-"+p);c.apply(d,v(arguments));k&&h&&q&&0<h.descendants&&(e=w(e,h),F(d,{color:!f&&g.styles.color,collapsed:e,group:g.parentGroup,
options:n,renderer:g.renderer,show:r,xy:g.xy}),n="highcharts-treegrid-node-"+(e?"expanded":"collapsed"),g.addClass("highcharts-treegrid-node-"+(e?"collapsed":"expanded")).removeClass(n),f||g.css({cursor:"pointer"}),[g,d.labelIcon].forEach(function(a){a.attachedTreeGridEvents||(b.addEvent(a.element,"mouseover",function(){var a=g;a.addClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:"underline"})}),b.addEvent(a.element,"mouseout",function(){var a=g,b=m,b=z(b.style)?
b.style:{};a.removeClass("highcharts-treegrid-node-active");a.renderer.styledMode||a.css({textDecoration:b.textDecoration})}),b.addEvent(a.element,"click",function(){d.toggleCollapse()}),a.attachedTreeGridEvents=!0)}))}});t(d.prototype,{collapse:function(b){var c=this.axis,d=u(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,a(b,!0))},expand:function(b){var c=this.axis,d=D(c,c.mapOfPosToGridNode[this.pos]);c.setBreaks(d,a(b,!0))},toggleCollapse:function(b){var c=this.axis,d;d=c.mapOfPosToGridNode[this.pos];
d=w(c,d)?D(c,d):u(c,d);c.setBreaks(d,a(b,!0))}});y.prototype.utils={getNode:k.getNode}});y(k,"masters/modules/treegrid.src.js",[],function(){})});
//# sourceMappingURL=treegrid.js.map
