!/**
 * Highcharts Gantt JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/grid-axis
 * @requires highcharts
 *
 * GridAxis
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Lars A. V. Cabrera
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(i._Highcharts,i._Highcharts.Axis):"function"==typeof define&&define.amd?define("highcharts/modules/grid-axis",["highcharts/highcharts"],function(i){return t(i,i.Axis)}):"object"==typeof exports?exports["highcharts/modules/grid-axis"]=t(i._Highcharts,i._Highcharts.Axis):i.Highcharts=t(i.Highcharts,i.Highcharts.Axis)}("u"<typeof window?this:window,function(i,t){return function(){"use strict";var e,s,r={532:function(i){i.exports=t},944:function(t){t.exports=i}},n={};function o(i){var t=n[i];if(void 0!==t)return t.exports;var e=n[i]={exports:{}};return r[i](e,e.exports,o),e.exports}o.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(t,{a:t}),t},o.d=function(i,t){for(var e in t)o.o(t,e)&&!o.o(i,e)&&Object.defineProperty(i,e,{enumerable:!0,get:t[e]})},o.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)};var a={};o.d(a,{default:function(){return z}});var h=o(944),d=o.n(h),l=o(532),c=o.n(l),u=d().dateFormats;function f(i){return(0,h.isObject)(i,!0)}function g(i,t){var e={width:0,height:0};if(t.forEach(function(t){var s,r=i[t],n=0,o=0;f(r)&&(n=(s=f(r.label)?r.label:{}).getBBox?s.getBBox().height:0,s.textStr&&!(0,h.isNumber)(s.textPxLength)&&(s.textPxLength=s.getBBox().width),o=(0,h.isNumber)(s.textPxLength)?Math.round(s.textPxLength):0,s.textStr&&(o=Math.round(s.getBBox().width)),e.height=Math.max(n,e.height),e.width=Math.max(o,e.width))}),"treegrid"===this.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode){var s=this.treeGrid.mapOfPosToGridNode[-1].height||0;e.width+=this.options.labels.indentation*(s-1)}return e}function p(i){var t=this.grid,e=3===this.side;if(e||i.apply(this),!(null==t?void 0:t.isColumn)){var s=(null==t?void 0:t.columns)||[];e&&(s=s.slice().reverse()),s.forEach(function(i){i.getOffset()})}e&&i.apply(this)}function v(i){var t;if(!0===(this.options.grid||{}).enabled){var e=this.axisTitle,r=this.height,n=this.horiz,o=this.left,a=this.offset,h=this.opposite,d=this.options,l=this.top,c=this.width,u=this.tickSize(),f=null==e?void 0:e.getBBox().width,g=d.title,p=g.x,v=g.y,m=null!=(t=g.margin)?t:n?5:10,x=e?this.chart.renderer.fontMetrics(e).f:0,k=(n?l+r:o)+(n?1:-1)*(h?-1:1)*(u?u[0]/2:0)+(this.side===s.bottom?x:0);if(i.titlePosition.x=n?o-(f||0)/2-m+p:k+(h?c:0)+a+p,i.titlePosition.y=n?k-(h?r:0)+(h?x:-x)/2+a+v:l-m+v,!n){var b=(u||[])[0],P=void 0===b?0:b;"left"===g.textAlign?i.titlePosition.x-=P/2:"right"===g.textAlign&&(i.titlePosition.x+=P/2)}}}function m(){var i,t=this.chart,e=this.options.grid,s=void 0===e?{}:e,r=this.userOptions;if(s.enabled&&((i=this.options).labels.align=(0,h.pick)(i.labels.align,"center"),this.categories||(i.showLastLabel=!1),this.labelRotation=0,i.labels.rotation=0,i.minTickInterval=1),s.columns)for(var n=this.grid.columns=[],o=this.grid.columnIndex=0;++o<s.columns.length;){var a=(0,h.merge)(r,s.columns[o],{isInternal:!0,linkedTo:0,scrollbar:{enabled:!1}},{grid:{columns:void 0}}),d=new(c())(this.chart,a,this.coll);d.grid.isColumn=!0,d.grid.columnIndex=o,(0,h.erase)(t.axes,d),(0,h.erase)(t[this.coll]||[],d),n.push(d)}}function x(){var i,t,e=this.axisTitle,r=this.grid,n=this.options;if(!0===(n.grid||{}).enabled){var o=this.min||0,a=this.max||0,h=this.ticks[this.tickPositions[0]];if(e&&!this.chart.styledMode&&(null==h?void 0:h.slotWidth)&&!this.options.title.style.width&&e.css({width:""+h.slotWidth+"px"}),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),this.rightWall&&this.rightWall.destroy(),(null==(i=this.grid)?void 0:i.isOuterAxis())&&this.axisLine){var d=n.lineWidth;if(d){var l=this.getLinePath(d),c=l[0],u=l[1],f=(this.tickSize("tick")||[1])[0]*(this.side===s.top||this.side===s.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 g=["L",this.left,c[2]||0],p=[c,g],v=["L",this.chart.chartWidth-this.chart.marginRight,this.toPixels(a+this.tickmarkOffset)],m=[["M",u[1]||0,this.toPixels(a+this.tickmarkOffset)],v];this.grid.upperBorder||o%1==0||(this.grid.upperBorder=this.grid.renderBorder(p)),this.grid.upperBorder&&(this.grid.upperBorder.attr({stroke:n.lineColor,"stroke-width":n.lineWidth}),this.grid.upperBorder.animate({d:p})),this.grid.lowerBorder||a%1==0||(this.grid.lowerBorder=this.grid.renderBorder(m)),this.grid.lowerBorder&&(this.grid.lowerBorder.attr({stroke:n.lineColor,"stroke-width":n.lineWidth}),this.grid.lowerBorder.animate({d:m}))}this.grid.axisLineExtra?(this.grid.axisLineExtra.attr({stroke:n.lineColor,"stroke-width":n.lineWidth}),this.grid.axisLineExtra.animate({d:l})):this.grid.axisLineExtra=this.grid.renderBorder(l),this.axisLine[this.showAxis?"show":"hide"]()}}if(((null==r?void 0:r.columns)||[]).forEach(function(i){return i.render()}),!this.horiz&&this.chart.hasRendered&&(this.scrollbar||(null==(t=this.linkedParent)?void 0:t.scrollbar))&&this.tickPositions.length){for(var x=this.tickmarkOffset,k=this.tickPositions[this.tickPositions.length-1],b=this.tickPositions[0],P=void 0,y=void 0;(P=this.hiddenLabels.pop())&&P.element;)P.show();for(;(y=this.hiddenMarks.pop())&&y.element;)y.show();(P=this.ticks[b].label)&&(o-b>x?this.hiddenLabels.push(P.hide()):P.show()),(P=this.ticks[k].label)&&(k-a>x?this.hiddenLabels.push(P.hide()):P.show());var w=this.ticks[k].mark;w&&k-a<x&&k-a>0&&this.ticks[k].isLast&&this.hiddenMarks.push(w.hide())}}}function k(){var i,t=null==(i=this.tickPositions)?void 0:i.info,e=this.options,s=e.grid||{},r=this.userOptions.labels||{};s.enabled&&(this.horiz?(this.series.forEach(function(i){i.options.pointRange=0}),t&&e.dateTimeLabelFormats&&e.labels&&!(0,h.defined)(r.align)&&(!1===e.dateTimeLabelFormats[t.unitName].range||t.count>1)&&(e.labels.align="left",(0,h.defined)(r.x)||(e.labels.x=3))):"treegrid"!==this.type&&this.grid&&this.grid.columns&&(this.minPointOffset=this.tickInterval))}function b(i){var t,e=this.options,s=i.userOptions,r=e&&f(e.grid)?e.grid:{};!0===r.enabled&&(t=(0,h.merge)(!0,{className:"highcharts-grid-axis "+(s.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]]},s),"xAxis"===this.coll&&((0,h.defined)(s.linkedTo)&&!(0,h.defined)(s.tickPixelInterval)&&(t.tickPixelInterval=350),!(!(0,h.defined)(s.tickPixelInterval)&&(0,h.defined)(s.linkedTo))||(0,h.defined)(s.tickPositioner)||(0,h.defined)(s.tickInterval)||(0,h.defined)(s.units)||(t.tickPositioner=function(i,e){var s,r,n=null==(r=null==(s=this.linkedParent)?void 0:s.tickPositions)?void 0:r.info;if(n){for(var o=t.units||[],a=void 0,d=1,l="year",c=0;c<o.length;c++){var u=o[c];if(u&&u[0]===n.unitName){a=c;break}}var f=(0,h.isNumber)(a)&&o[a+1];if(f){l=f[0]||"year";var g=f[1];d=(null==g?void 0:g[0])||1}else"year"===n.unitName&&(d=10*n.count);var p=h.timeUnits[l];return this.tickInterval=p*d,this.chart.time.getTimeTicks({unitRange:p,count:d,unitName:l},i,e,this.options.startOfWeek)}})),(0,h.merge)(!0,this.options,t),this.horiz&&(e.minPadding=(0,h.pick)(s.minPadding,0),e.maxPadding=(0,h.pick)(s.maxPadding,0)),(0,h.isNumber)(e.grid.borderWidth)&&(e.tickWidth=e.lineWidth=r.borderWidth))}function P(i){var t=i.userOptions,e=(null==t?void 0:t.grid)||{},s=e.columns;e.enabled&&s&&(0,h.merge)(!0,this.options,s[0])}function y(){(this.grid.columns||[]).forEach(function(i){return i.setScale()})}function w(i){var t=this.horiz,e=this.maxLabelDimensions,s=this.options.grid,r=void 0===s?{}:s;if(r.enabled&&e){var n=2*this.options.labels.distance,o=t?r.cellHeight||n+e.height:n+e.width;(0,h.isArray)(i.tickSize)?i.tickSize[0]=o:i.tickSize=[o,0]}}function L(){this.axes.forEach(function(i){var t;((null==(t=i.grid)?void 0:t.columns)||[]).forEach(function(i){i.setAxisSize(),i.setAxisTranslation()})})}function E(i){var t=this.grid;(t.columns||[]).forEach(function(t){return t.destroy(i.keepEvents)}),t.columns=void 0}function B(i){var t=i.userOptions||{},e=(0,h.merge)({borderColor:"var(--highcharts-neutral-color-20)"},t.grid||{});e.enabled&&(0,h.defined)(e.borderColor)&&(t.tickColor=t.lineColor=e.borderColor),this.grid||(this.grid=new A(this)),this.hiddenLabels=[],this.hiddenMarks=[],this.clippable=!1}function O(i){var t=this.label,e=this.axis,r=e.reversed,n=e.chart,o=e.options.grid||{},a=e.options.labels,d=a.align,l=s[e.side],c=i.tickmarkOffset,u=e.tickPositions,f=this.pos-c,g=(0,h.isNumber)(u[i.index+1])?u[i.index+1]-c:(e.max||0)+c,p=e.tickSize("tick"),v=p?p[0]:0,m=p?p[1]/2:0;if(!0===o.enabled){var x,k=void 0,b=void 0,P=void 0;if("top"===l?x=(k=e.top+e.offset)-v:"bottom"===l?k=(x=n.chartHeight-e.bottom+e.offset)+v:(k=e.top+e.len-(e.translate(r?g:f)||0),x=e.top+e.len-(e.translate(r?f:g)||0)),"right"===l?P=(b=n.chartWidth-e.right+e.offset)+v:"left"===l?b=(P=e.left+e.offset)-v:(b=Math.round(e.left+(e.translate(r?g:f)||0))-m,P=Math.min(Math.round(e.left+(e.translate(r?f:g)||0))-m,e.left+e.len)),this.slotWidth=P-b,i.pos.x="left"===d?b:"right"===d?P:b+(P-b)/2,i.pos.y=x+(k-x)/2,t){var y=n.renderer.fontMetrics(t),w=t.getBBox().height;if(a.useHTML)i.pos.y+=y.b+-(w/2);else{var L=Math.round(w/y.h);i.pos.y+=(y.b-(y.h-y.f))/2+-((L-1)*y.h/2)}}i.pos.x+=e.horiz&&a.x||0}}function T(i){var t,e,s=i.axis,r=i.value;if(null==(t=s.options.grid)?void 0:t.enabled){var n=s.tickPositions,o=(s.linkedParent||s).series,a=null!=(e=o.reduce(function(i,t){var e,s;return t.is("gantt")?null==i?void 0:i.concat(null!=(s=null==(e=t.options)?void 0:e.data)?s:[]):i},[]))?e:[],l=r===n[0],c=r===n[n.length-1],u=o[0]&&(0,h.find)(a,function(i){return i[s.isXAxis?"x":"y"]===r}),f=void 0;u&&(f=(0,h.merge)(u),d().seriesTypes.gantt.prototype.pointClass.setGanttPointAliases(f,s.chart)),i.isFirst=l,i.isLast=c,i.point=f}}function M(){var i,t,e=this.options,s=e.grid||{},r=this.categories,n=this.tickPositions,o=n[0],a=n[1],d=n[n.length-1],l=n[n.length-2],c=null==(i=this.linkedParent)?void 0:i.min,u=null==(t=this.linkedParent)?void 0:t.max,f=c||this.min,g=u||this.max,p=this.tickInterval,v=(0,h.isNumber)(f)&&f>=o+p&&f<a,m=(0,h.isNumber)(f)&&o<f&&o+p>f,x=(0,h.isNumber)(g)&&d>g&&d-p<g,k=(0,h.isNumber)(g)&&g<=d-p&&g>l;!0===s.enabled&&!r&&(this.isXAxis||this.isLinked)&&((m||v)&&!e.startOnTick&&(n[0]=f),(x||k)&&!e.endOnTick&&(n[n.length-1]=g))}function W(i){var t,e=this.options.grid;return!0===(void 0===e?{}:e).enabled&&this.categories?this.tickInterval:i.apply(this,(t=arguments,Array.prototype.slice.call(t,1)))}(e=s||(s={}))[e.top=0]="top",e[e.right=1]="right",e[e.bottom=2]="bottom",e[e.left=3]="left";var A=function(){function i(i){this.axis=i}return i.prototype.isOuterAxis=function(){var i,t=this.axis,e=t.chart,s=t.grid.columnIndex,r=(null==(i=t.linkedParent)?void 0:i.grid.columns)||t.grid.columns||[],n=s?t.linkedParent:t,o=-1,a=0;return 3===t.side&&!e.inverted&&r.length?!t.linkedParent:((e[t.coll]||[]).forEach(function(i,e){i.side!==t.side||i.options.isInternal||(a=e,i===n&&(o=e))}),a===o&&(!(0,h.isNumber)(s)||r.length===s))},i.prototype.renderBorder=function(i){var t=this.axis,e=t.chart.renderer,s=t.options,r=e.path(i).addClass("highcharts-axis-line").add(t.axisGroup);return e.styledMode||r.attr({stroke:s.lineColor,"stroke-width":s.lineWidth,zIndex:7}),r},i}();u.E=function(i){return this.dateFormat("%a",i,!0).charAt(0)},u.W=function(i){var t=this.toParts(i),e=(t[7]+6)%7,s=t.slice(0);s[2]=t[2]-e+3;var r=this.toParts(this.makeTime(s[0],0,1));return 4!==r[7]&&(t[1]=0,t[2]=1+(11-r[7])%7),(1+Math.floor((this.makeTime(s[0],s[1],s[2])-this.makeTime(r[0],r[1],r[2]))/6048e5)).toString()};var S=d();({compose:function(i,t,e){return i.keepProps.includes("grid")||(i.keepProps.push("grid"),i.prototype.getMaxLabelDimensions=g,(0,h.wrap)(i.prototype,"unsquish",W),(0,h.wrap)(i.prototype,"getOffset",p),(0,h.addEvent)(i,"init",B),(0,h.addEvent)(i,"afterGetTitlePosition",v),(0,h.addEvent)(i,"afterInit",m),(0,h.addEvent)(i,"afterRender",x),(0,h.addEvent)(i,"afterSetAxisTranslation",k),(0,h.addEvent)(i,"afterSetOptions",b),(0,h.addEvent)(i,"afterSetOptions",P),(0,h.addEvent)(i,"afterSetScale",y),(0,h.addEvent)(i,"afterTickSize",w),(0,h.addEvent)(i,"trimTicks",M),(0,h.addEvent)(i,"destroy",E),(0,h.addEvent)(t,"afterSetChartSize",L),(0,h.addEvent)(e,"afterGetLabelPosition",O),(0,h.addEvent)(e,"labelFormat",T)),i}}).compose(S.Axis,S.Chart,S.Tick);var z=d();return a.default}()});