!/**
 * Highcharts JS v12.5.0 (2026-01-12)
 * @module highcharts/modules/windbarb
 * @requires highcharts
 *
 * Wind barb series 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,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("highcharts"),require("highcharts").dataGrouping.approximations,require("highcharts").Series.types.column,require("highcharts").Series,require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/windbarb",[["highcharts/highcharts"],["highcharts/highcharts","dataGrouping","approximations"],["highcharts/highcharts","Series","types","column"],["highcharts/highcharts","Series"],["highcharts/highcharts","SeriesRegistry"]],r):"object"==typeof exports?exports["highcharts/modules/windbarb"]=r(require("highcharts"),require("highcharts").dataGrouping.approximations,require("highcharts").Series.types.column,require("highcharts").Series,require("highcharts").SeriesRegistry):t.Highcharts=r(t.Highcharts,t.Highcharts.dataGrouping.approximations,t.Highcharts.Series.types.column,t.Highcharts.Series,t.Highcharts.SeriesRegistry)}(this,function(t,r,e,o,i){return function(){"use strict";var n,s,a,p={448:function(t){t.exports=e},512:function(t){t.exports=i},820:function(t){t.exports=o},944:function(r){r.exports=t},956:function(t){t.exports=r}},h={};function l(t){var r=h[t];if(void 0!==r)return r.exports;var e=h[t]={exports:{}};return p[t](e,e.exports,l),e.exports}l.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return l.d(r,{a:r}),r},l.d=function(t,r){for(var e in r)l.o(r,e)&&!l.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},l.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};var u={};l.d(u,{default:function(){return F}});var c=l(944),f=l.n(c),d=l(956),g=l.n(d),y=l(448),b=l.n(y),v=l(820),x=l.n(v),m=f().composed,S=b().prototype,O=x().prototype,w=f().defined,L=f().pushUnique,_=f().stableSort,k=a||(a={});function P(t){return O.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,t)}function X(){S.translate.apply(this);var t,r,e,o,i,n,s,a,p,h=this,l=h.options,u=h.chart,c=h.points,f=l.onSeries,d=f&&u.get(f),g=d&&d.options.step,y=d&&d.points,b=u.inverted,v=h.xAxis,x=h.yAxis,m=c.length-1,O=l.onKey||"y",L=y&&y.length,k=0;if(d&&d.visible&&L)for(k=(d.pointXOffset||0)+(d.barW||0)/2,a=d.currentDataGrouping,n=y[L-1].x+(a?a.totalRange:0),_(c,function(t,r){return t.x-r.x}),O="plot"+O[0].toUpperCase()+O.substr(1);L--&&c[m]&&"break"!==function(){if(i=y[L],(e=c[m]).y=i.y,i.x<=e.x&&void 0!==i[O]){if(e.x<=n&&(e.plotY=i[O],i.x<e.x&&!g&&(s=y[L+1]))&&void 0!==s[O])if(w(e.plotX)&&d.is("spline")){for(var o=[i.plotX||0,i.plotY||0],a=[s.plotX||0,s.plotY||0],h=(null==(t=i.controlPoints)?void 0:t.high)||o,l=(null==(r=s.controlPoints)?void 0:r.low)||a,u=function(t,r){return Math.pow(1-t,3)*o[r]+3*(1-t)*(1-t)*t*h[r]+3*(1-t)*t*t*l[r]+t*t*t*a[r]},f=0,b=1,v=void 0,S=0;S<100;S++){var _=(f+b)/2,k=u(_,0);if(null===k)break;if(.25>Math.abs(k-e.plotX)){v=_;break}k<e.plotX?f=_:b=_}w(v)&&(e.plotY=u(v,1),e.y=x.toValue(e.plotY,!0))}else p=(e.x-i.x)/(s.x-i.x),e.plotY+=p*(s[O]-i[O]),e.y+=p*(s.y-i.y);if(m--,L++,m<0)return"break"}}(););c.forEach(function(t,r){var e;t.plotX+=k,(void 0===t.plotY||b)&&(t.plotX>=0&&t.plotX<=v.len?b?(t.plotY=v.translate(t.x,0,1,0,1),t.plotX=w(t.y)?x.translate(t.y,0,0,0,1):0):t.plotY=(v.opposite?0:h.yAxis.len)+v.offset:t.shapeArgs={}),(o=c[r-1])&&o.plotX===t.plotX&&(void 0===o.stackIndex&&(o.stackIndex=0),e=o.stackIndex+1),t.stackIndex=e}),this.onSeries=d}k.compose=function(t){if(L(m,"OnSeries")){var r=t.prototype;r.getPlotBox=P,r.translate=X}return t},k.getPlotBox=P,k.translate=X;var A=a,G=l(512),M=l.n(G),Y=(n=function(t,r){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)},function(t,r){function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}),j=f().isNumber,q=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return Y(r,t),r.prototype.isValid=function(){return j(this.value)&&this.value>=0},r}(b().prototype.pointClass),H={dataGrouping:{enabled:!0,approximation:"windbarb",groupPixelWidth:30},lineWidth:2,onSeries:null,states:{hover:{lineWidthPlus:0}},tooltip:{pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.value}</b> ({point.beaufort})<br/>'},vectorLength:20,colorKey:"value",yOffset:-20,xOffset:0},I=(s=function(t,r){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}s(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}),W=f().animObject,C=M().seriesTypes.column,T=f().extend,z=f().merge,N=f().pick,R=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return I(r,t),r.prototype.init=function(r,e){t.prototype.init.call(this,r,e)},r.prototype.pointAttribs=function(t,r){var e=this.options,o=t.color||this.color,i=this.options.lineWidth;return r&&(o=e.states[r].color||o,i=(e.states[r].lineWidth||i)+(e.states[r].lineWidthPlus||0)),{stroke:o,"stroke-width":i}},r.prototype.windArrow=function(t){var r,e=t.beaufortLevel,o=this.options.vectorLength/20,i=1.943844*t.value,n=-10;if(t.isNull)return[];if(0===e)return this.chart.renderer.symbols.circle(-10*o,-10*o,20*o,20*o);var s=[["M",0,7*o],["L",-1.5*o,7*o],["L",0,10*o],["L",1.5*o,7*o],["L",0,7*o],["L",0,-10*o]];if((r=(i-i%50)/50)>0)for(;r--;)s.push(-10===n?["L",0,n*o]:["M",0,n*o],["L",5*o,n*o+2],["L",0,n*o+4]),i-=50,n+=7;if((r=(i-i%10)/10)>0)for(;r--;)s.push(-10===n?["L",0,n*o]:["M",0,n*o],["L",7*o,n*o]),i-=10,n+=3;if((r=(i-i%5)/5)>0)for(;r--;)s.push(-10===n?["L",0,n*o]:["M",0,n*o],["L",4*o,n*o]),i-=5,n+=3;return s},r.prototype.drawPoints=function(){for(var t=this.chart,r=this.yAxis,e=t.inverted,o=this.options.vectorLength/2,i=0,n=this.points;i<n.length;i++){var s=n[i],a=s.plotX,p=s.plotY;!1===this.options.clip||t.isInsidePlot(a,0)?(s.graphic||(s.graphic=this.chart.renderer.path().add(this.markerGroup).addClass("highcharts-point highcharts-color-"+N(s.colorIndex,s.series.colorIndex))),s.graphic.attr({d:this.windArrow(s),translateX:a+this.options.xOffset,translateY:p+this.options.yOffset,rotation:s.direction}),this.chart.styledMode||s.graphic.attr(this.pointAttribs(s))):s.graphic&&(s.graphic=s.graphic.destroy()),s.tooltipPos=[a+this.options.xOffset+(e&&!this.onSeries?o:0),p+this.options.yOffset-(e?0:o+r.pos-t.plotTop)]}},r.prototype.animate=function(t){t?this.markerGroup.attr({opacity:.01}):this.markerGroup.animate({opacity:1},W(this.options.animation))},r.prototype.markerAttribs=function(){return{}},r.prototype.getExtremes=function(){return{}},r.prototype.shouldShowTooltip=function(r,e,o){return void 0===o&&(o={}),o.ignoreX=this.chart.inverted,o.ignoreY=!o.ignoreX,t.prototype.shouldShowTooltip.call(this,r,e,o)},r.defaultOptions=z(C.defaultOptions,H),r}(C);A.compose(R),T(R.prototype,{beaufortFloor:[0,.3,1.6,3.4,5.5,8,10.8,13.9,17.2,20.8,24.5,28.5,32.7],beaufortName:["Calm","Light air","Light breeze","Gentle breeze","Moderate breeze","Fresh breeze","Strong breeze","Near gale","Gale","Strong gale","Storm","Violent storm","Hurricane"],invertible:!1,parallelArrays:["x","value","direction"],pointArrayMap:["value","direction"],pointClass:q,trackerGroups:["markerGroup"],translate:function(){var t=this.beaufortFloor,r=this.beaufortName;A.translate.call(this);for(var e=0,o=this.points;e<o.length;e++){for(var i=o[e],n=0;n<t.length&&!(t[n]>i.value);n++);i.beaufortLevel=n-1,i.beaufort=r[n-1]}}}),M().registerSeriesType("windbarb",R),g().windbarb||(g().windbarb=function(t,r){for(var e=0,o=0,i=0,n=t.length;i<n;i++)e+=t[i]*Math.cos(r[i]*f().deg2rad),o+=t[i]*Math.sin(r[i]*f().deg2rad);return[t.reduce(function(t,r){return t+r},0)/t.length,Math.atan2(o,e)/f().deg2rad]});var F=f();return u.default}()});