!/**
 * Highcharts JS v12.5.0 (2026-01-12)
 * @module highcharts/modules/variwide
 * @requires highcharts
 *
 * Highcharts variwide module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Honsi
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(require("highcharts"),require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/variwide",[["highcharts/highcharts"],["highcharts/highcharts","SeriesRegistry"]],i):"object"==typeof exports?exports["highcharts/modules/variwide"]=i(require("highcharts"),require("highcharts").SeriesRegistry):t.Highcharts=i(t.Highcharts,t.Highcharts.SeriesRegistry)}(this,function(t,i){return function(){"use strict";var r,e,s={512:function(t){t.exports=i},944:function(i){i.exports=t}},o={};function n(t){var i=o[t];if(void 0!==i)return i.exports;var r=o[t]={exports:{}};return s[t](r,r.exports,n),r.exports}n.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(i,{a:i}),i},n.d=function(t,i){for(var r in i)n.o(i,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},n.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)};var a={};n.d(a,{default:function(){return W}});var h=n(944),p=n.n(h),c=n(512),l=n.n(c),u=p().composed,d=p().addEvent,f=p().pushUnique,y=p().wrap;function v(t){var i;this.variwide&&this.cross&&this.cross.attr("stroke-width",null==(i=t.point)?void 0:i.crosshairWidth)}function x(){var t=this;this.chart.labelCollectors.push(function(){return t.variwide?t.tickPositions.filter(function(i){return!!t.ticks[i].label}).map(function(i,r){var e,s=t.ticks[i].label;return s.labelrank=null==(e=t.zData)?void 0:e[r],s}):[]})}function g(t){var i=this.axis,r=i.horiz?"x":"y";i.variwide&&(this[r+"Orig"]=t.pos[r],this.postTranslate(t.pos,r,this.pos))}function m(t,i,r){var e=this.axis,s=t[i]-e.pos;e.horiz||(s=e.len-s),s=e.series[0].postTranslate(r,s),e.horiz||(s=e.len-s),t[i]=e.pos+s}function w(t,i,r,e,s,o,n,a){var h=Array.prototype.slice.call(arguments,1),p=s?"x":"y";this.axis.variwide&&"number"==typeof this[p+"Orig"]&&(h[+!s]=this[p+"Orig"]);var c=t.apply(this,h);return this.axis.variwide&&this.axis.categories&&this.postTranslate(c,p,this.pos),c}var b=function(t,i){if(f(u,"Variwide")){var r=i.prototype;d(t,"afterDrawCrosshair",v),d(t,"afterRender",x),d(i,"afterGetPosition",g),r.postTranslate=m,y(r,"getLabelPosition",w)}},O=(r=function(t,i){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])})(t,i)},function(t,i){function e(){this.constructor=t}r(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),A=l().seriesTypes.column.prototype.pointClass,P=p().isNumber,_=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return O(i,t),i.prototype.isValid=function(){return P(this.y)&&P(this.z)},i}(A),T={pointPadding:0,groupPadding:0},k=(e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}),z=l().seriesTypes.column,j=p().addEvent,M=p().arrayMin,S=p().arrayMax,C=p().crisp,R=p().extend,Z=p().merge,q=p().pick,D=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return k(i,t),i.prototype.processData=function(t){this.totalZ=0,this.relZ=[],l().seriesTypes.column.prototype.processData.call(this,t);var i=this.getColumn("z");(this.xAxis.reversed?i.slice().reverse():i).forEach(function(t,i){this.relZ[i]=this.totalZ,this.totalZ+=t},this),this.xAxis.categories&&(this.xAxis.variwide=!0,this.xAxis.zData=i)},i.prototype.postTranslate=function(t,i,r){var e=this.xAxis,s=this.relZ,o=e.reversed?s.length-t:t,n=e.reversed?-1:1,a=e.toPixels(e.reversed?(e.dataMax||0)+e.pointRange:e.dataMin||0),h=e.toPixels(e.reversed?e.dataMin||0:(e.dataMax||0)+e.pointRange),p=Math.abs(h-a),c=this.totalZ,l=this.chart.inverted?h-(this.chart.plotTop-n*e.minPixelPadding):a-this.chart.plotLeft-n*e.minPixelPadding,u=o/s.length*p,d=(o+n)/s.length*p,f=q(s[o],c)/c*p,y=q(s[o+n],c)/c*p;return r&&(r.crosshairWidth=y-f),l+f+(i-(l+u))*(y-f)/(d-u)},i.prototype.translate=function(){this.crispOption=this.options.crisp,this.options.crisp=!1,t.prototype.translate.call(this),this.options.crisp=this.crispOption},i.prototype.correctStackLabels=function(){for(var t,i,r,e,s=this.options,o=this.yAxis,n=0,a=this.points;n<a.length;n++){var h=a[n];e=h.x,i=h.shapeArgs.width,(r=o.stacking.stacks[(this.negStacks&&h.y<(s.startFromThreshold?0:s.threshold)?"-":"")+this.stackKey])&&(t=r[e])&&!h.isNull&&t.setOffset(-(i/2)||0,i||0,void 0,void 0,h.plotX,this.xAxis)}},i.prototype.getXExtremes=function(t){var i=S(t),r=this.getColumn("z")[t.indexOf(i)];return{min:M(t),max:i+(this.xAxis.categories?0:r)}},i.compose=b,i.defaultOptions=Z(z.defaultOptions,T),i}(z);j(D,"afterColumnTranslate",function(){for(var t=this.xAxis,i=this.chart.inverted,r=-1,e=0,s=this.points;e<s.length;e++){var o=s[e];++r;var n=o.shapeArgs||{},a=n.x,h=void 0===a?0:a,p=n.width,c=void 0===p?0:p,l=o.plotX,u=void 0===l?0:l,d=o.tooltipPos,f=o.z,y=void 0===f?0:f,v=void 0,x=void 0;t.variwide?(v=this.postTranslate(r,h,o),x=this.postTranslate(r,h+c)):(v=u,x=t.translate(o.x+y,!1,!1,!1,!0)),this.crispOption&&(v=C(v,this.borderWidth),x=C(x,this.borderWidth)),n.x=v,n.width=Math.max(x-v,1),o.plotX=(v+x)/2,d&&(i?d[1]=t.len-n.x-n.width/2:d[0]=n.x+n.width/2)}this.options.stacking&&this.correctStackLabels()},{order:2}),R(D.prototype,{irregularWidths:!0,keysAffectYAxis:["y"],pointArrayMap:["y","z"],parallelArrays:["x","y","z"],pointClass:_}),l().registerSeriesType("variwide",D);var E=p();D.compose(E.Axis,E.Tick);var W=p();return a.default}()});