highcharts
Version:
JavaScript charting framework
25 lines • 84 kB
JavaScript
!/**
* Highmaps JS v12.6.0 (2026-04-13)
* @module highcharts/modules/map
* @requires highcharts
*
* Highmaps as a plugin for Highcharts or Highcharts Stock.
*
* (c) 2011-2026 Highsoft AS
* Author: Torstein Hønsi
*
* 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(t._Highcharts,t._Highcharts.Axis,t._Highcharts.Color,t._Highcharts.SeriesRegistry,t._Highcharts.SVGElement,t._Highcharts.Series,t._Highcharts.Chart,t._Highcharts.SVGRenderer,t._Highcharts.Templating,t._Highcharts.Series.types.scatter,t._Highcharts.Point):"function"==typeof define&&define.amd?define("highcharts/modules/map",["highcharts/highcharts"],function(t){return e(t,t.Axis,t.Color,t.SeriesRegistry,t.SVGElement,t.Series,t.Chart,t.SVGRenderer,t.Templating,t.Series,["types"],["scatter"],t.Point)}):"object"==typeof exports?exports["highcharts/modules/map"]=e(t._Highcharts,t._Highcharts.Axis,t._Highcharts.Color,t._Highcharts.SeriesRegistry,t._Highcharts.SVGElement,t._Highcharts.Series,t._Highcharts.Chart,t._Highcharts.SVGRenderer,t._Highcharts.Templating,t._Highcharts.Series.types.scatter,t._Highcharts.Point):t.Highcharts=e(t.Highcharts,t.Highcharts.Axis,t.Highcharts.Color,t.Highcharts.SeriesRegistry,t.Highcharts.SVGElement,t.Highcharts.Series,t.Highcharts.Chart,t.Highcharts.SVGRenderer,t.Highcharts.Templating,t.Highcharts.Series.types.scatter,t.Highcharts.Point)}("u"<typeof window?this:window,(t,e,i,o,s,r,a,n,l,h,p)=>(()=>{"use strict";let d;var c,u,m,g,f,y,b,x,M,v,w,C={28:t=>{t.exports=s},260:t=>{t.exports=p},512:t=>{t.exports=o},532:t=>{t.exports=e},540:t=>{t.exports=n},620:t=>{t.exports=i},632:t=>{t.exports=h},820:t=>{t.exports=r},944:e=>{e.exports=t},960:t=>{t.exports=a},984:t=>{t.exports=l}},T={};function P(t){var e=T[t];if(void 0!==e)return e.exports;var i=T[t]={exports:{}};return C[t](i,i.exports,P),i.exports}P.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return P.d(e,{a:e}),e},P.d=(t,e)=>{for(var i in e)P.o(e,i)&&!P.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},P.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var L={};P.d(L,{default:()=>ip});var A=P(944),j=P.n(A),z=P(532),k=P.n(z),S=P(620),I=P.n(S);let{doc:E,win:B}=j();function O(t,e,i,o={}){let s="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(s,"hcEvents")||(s.hcEvents={});let r=s.hcEvents;j().Point&&t instanceof j().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let a=t.addEventListener;a&&a.call(t,e,i,!!j().supportsPassiveEvents&&{passive:void 0===o.passive?-1!==e.indexOf("touch"):o.passive,capture:!1}),r[e]||(r[e]=[]);let n={fn:i,order:"number"==typeof o.order?o.order:1/0};return r[e].push(n),r[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,i){function o(e,i){let o=t.removeEventListener;o&&o.call(t,e,i,!1)}function s(i){let s,r;t.nodeName&&(e?(s={})[e]=!0:s=i,q(s,function(t,e){if(i[e])for(r=i[e].length;r--;)o(e,i[e][r].fn)}))}let r="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(r,"hcEvents")){let t=r.hcEvents;if(e){let r=t[e]||[];i?(t[e]=r.filter(function(t){return i!==t.fn}),o(e,i)):(s(t),t[e]=[])}else s(t),delete r.hcEvents}}(t,e,i)}}function D(t){let e=t.length,i=t[0];for(;e--;)t[e]<i&&(i=t[e]);return i}function V(t){let e=t.length,i=t[0];for(;e--;)t[e]>i&&(i=t[e]);return i}function R(t,e,i){return t>e?t<i?t:i:e}function G(t,e=0,i){let o=e%2/2,s=i?-1:1;return(Math.round(t*s-o)+o)*s}function X(t){return null!=t}function N(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function H(t,e,i,o){if(i=i||{},E?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==j())){let o=E.createEvent("Events");o.initEvent(e,!0,!0),i=N(o,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||N(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e});let o=[],s=t,r=!1;for(;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[e]&&(o.length&&(r=!0),o.unshift.apply(o,s.hcEvents[e])),s=Object.getPrototypeOf(s);r&&o.sort((t,e)=>t.order-e.order),o.forEach(e=>{!1===e.fn.call(t,i,t)&&i.preventDefault()})}o&&!i.defaultPrevented&&o.call(t,i)}function W(t,e){let i=t.split(".");for(;i.length&&X(e);){let t=i.shift();if(void 0===t||"__proto__"===t)return;if("this"===t){let t;return K(e)&&(t=e["@this"]),t??e}let o=e[t.replace(/[\\'"]/g,"")];if(!X(o)||"function"==typeof o||"number"==typeof o.nodeType||o===B)return;e=o}return e}let Y=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let i,o=t.length;for(i=0;i<o;i++)if(e(t[i],i))return t[i]};function F(t){X(t)&&clearTimeout(t)}function Z(t){return K(t)&&"number"==typeof t.nodeType}function U(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function _(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function K(t,e){return!!t&&"object"==typeof t&&(!e||!_(t))}function $(t,...e){let i,o=[t,...e],s={},r=function(t,e){return"object"!=typeof t&&(t={}),q(e,function(i,o){if("__proto__"!==o&&"constructor"!==o){let s;!K(i,!0)||(s=i?.constructor,K(i,!0)&&!Z(i)&&s?.name&&"Object"!==s.name)||Z(i)?t[o]=e[o]:t[o]=r(t[o]||{},i)}}),t};!0===t&&(s=o[1],o=Array.prototype.slice.call(o,2));let a=o.length;for(i=0;i<a;i++)s=r(s,o[i]);return s}function q(t,e,i){for(let o in t)Object.hasOwnProperty.call(t,o)&&e.call(i||t[o],t[o],o,t)}function J(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}function Q(t,e){return 0>t.indexOf(e)&&!!t.push(e)}function tt(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)}function te(t,e,i){let o=t[e];t[e]=function(){let t=arguments,e=this;return i.apply(this,[function(){return o.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}let{parse:ti}=I();(c=f||(f={})).initDataClasses=function(t){let e=this.chart,i=this.legendItem=this.legendItem||{},o=this.options,s=t.dataClasses||[],r,a,n=e.options.chart.colorCount,l=0,h;this.dataClasses=a=[],i.labels=[];for(let t=0,i=s.length;t<i;++t)r=$(r=s[t]),a.push(r),(e.styledMode||!r.color)&&("category"===o.dataClassColor?(e.styledMode||(n=(h=e.options.colors||[]).length,r.color=h[l]),r.colorIndex=l,++l===n&&(l=0)):r.color=ti(o.minColor).tweenTo(ti(o.maxColor),i<2?.5:t/(i-1)))},c.initStops=function(){let t=this.options,e=this.stops=t.stops||[[0,t.minColor||""],[1,t.maxColor||""]];for(let t=0,i=e.length;t<i;++t)e[t].color=ti(e[t][1])},c.normalizedValue=function(t){let e=this.max||0,i=this.min||0;return this.logarithmic&&(t=this.logarithmic.log2lin(t)),1-(e-t)/(e-i||1)},c.toColor=function(t,e){let i,o,s,r,a,n,l=this.dataClasses,h=this.stops;if(l){for(n=l.length;n--;)if(o=(a=l[n]).from,s=a.to,(void 0===o||t>=o)&&(void 0===s||t<=s)){r=a.color,e&&(e.dataClass=n,e.colorIndex=a.colorIndex);break}}else{for(i=this.normalizedValue(t),n=h.length;n--&&!(i>h[n][0]););o=h[n]||h[n+1],i=1-((s=h[n+1]||o)[0]-i)/(s[0]-o[0]||1),r=o.color.tweenTo(s.color,i)}return r};let to=f,{parse:ts}=I();!function(t){let e;function i(){let{userOptions:t}=this;if(this.colorAxis=[],t.colorAxis){var i;t.colorAxis=_(i=t.colorAxis)?i:[i],t.colorAxis.map(t=>new e(this,t))}}function o(t){let e=this.chart.colorAxis||[],i=e=>{let i=t.allItems.indexOf(e);-1!==i&&(this.destroyItem(t.allItems[i]),t.allItems.splice(i,1))},o=[],s,r;for(e.forEach(function(t){s=t.options,s?.showInLegend&&(s.dataClasses&&s.visible?o=o.concat(t.getDataClassLegendSymbols()):s.visible&&o.push(t),t.series.forEach(function(t){(!t.options.showInLegend||s.dataClasses)&&("point"===t.options.legendType?t.points.forEach(function(t){i(t)}):i(t))}))}),r=o.length;r--;)t.allItems.unshift(o[r])}function s(t){t.visible&&t.item.legendColor&&t.item.legendItem.symbol.attr({fill:t.item.legendColor})}function r(t){this.chart.colorAxis?.forEach(e=>{e.update({},t.redraw)})}function a(){(this.chart.colorAxis?.length||this.colorAttribs)&&this.translateColors()}function n(){let t=this.axisTypes;t?-1===t.indexOf("colorAxis")&&t.push("colorAxis"):this.axisTypes=["colorAxis"]}function l(t){let e=this,i=t?"show":"hide";e.visible=e.options.visible=!!t,["graphic","dataLabel"].forEach(function(t){e[t]&&e[t][i]()}),this.series.buildKDTree()}function h(){let t=this,e=this.getPointsCollection(),i=this.options.nullColor,o=this.colorAxis,s=this.colorKey;e.forEach(e=>{let r=e.getNestedProperty(s),a=e.options.color||(e.isNull||null===e.value?i:o&&void 0!==r?o.toColor(r,e):e.color||t.color);a&&e.color!==a&&(e.color=a,"point"===t.options.legendType&&e.legendItem&&e.legendItem.label&&t.chart.legend.colorizeItem(e,e.visible))})}function p(){this.elem.attr("fill",ts(this.start).tweenTo(ts(this.end),this.pos),void 0,!0)}function d(){this.elem.attr("stroke",ts(this.start).tweenTo(ts(this.end),this.pos),void 0,!0)}t.compose=function(t,c,u,m,g){var f;let y,b=c.prototype,x=u.prototype,M=g.prototype;b.collectionsWithUpdate.includes("colorAxis")||(e=t,b.collectionsWithUpdate.push("colorAxis"),b.collectionsWithInit.colorAxis=[b.addColorAxis],O(c,"afterCreateAxes",i),y=(f=c).prototype.createAxis,f.prototype.createAxis=function(t,i){if("colorAxis"!==t)return y.apply(this,arguments);let o=new e(this,$(i.axis,{index:this[t].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(t=>{t.series=[]}),this.series.forEach(t=>{t.bindAxes(),t.isDirtyData=!0}),J(i.redraw,!0)&&this.redraw(i.animation),o},x.fillSetter=p,x.strokeSetter=d,O(m,"afterGetAllItems",o),O(m,"afterColorizeItem",s),O(m,"afterUpdate",r),N(M,{optionalAxis:"colorAxis",translateColors:h}),N(M.pointClass.prototype,{setVisible:l}),O(g,"afterTranslate",a,{order:1}),O(g,"bindAxes",n))},t.pointSetVisible=l}(y||(y={}));let tr=y;var ta=P(512),tn=P.n(ta);let{defaultOptions:tl}=j(),{series:th}=tn();tl.colorAxis=$(tl.xAxis,{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,title:{margin:5},showInLegend:!0});class tp extends k(){static compose(t,e,i,o){tr.compose(tp,t,e,i,o)}constructor(t,e){super(t,e),this.coll="colorAxis",this.visible=!0,this.init(t,e)}init(t,e){let i=t.options.legend||{},o=e.layout?"vertical"!==e.layout:"vertical"!==i.layout;this.side=e.side||o?2:1,this.reversed=e.reversed,this.opposite=!o,super.init(t,e,"colorAxis"),this.userOptions=e,_(t.userOptions.colorAxis)&&(t.userOptions.colorAxis[this.index]=e),e.dataClasses&&this.initDataClasses(e),this.initStops(),this.horiz=o,this.zoomEnabled=!1}hasData(){return!!(this.tickPositions||[]).length}setTickPositions(){if(!this.dataClasses)return super.setTickPositions()}setOptions(t){let e=this.chart.options.legend||{},i=tl.colorAxis,o=$("vertical"!==(t.layout||e.layout||i.layout)?{title:{rotation:0}}:{title:{rotation:90,margin:10}},i,t,{showEmpty:!1,visible:this.chart.options.legend.enabled&&!1!==t.visible});super.setOptions(o),this.options.crosshair=this.options.marker}setAxisSize(){let t=this.chart,e=this.legendItem?.symbol,{width:i,height:o}=this.getSize();e&&(this.left=+e.attr("x"),this.top=+e.attr("y"),this.width=i=+e.attr("width"),this.height=o=+e.attr("height"),this.right=t.chartWidth-this.left-i,this.bottom=t.chartHeight-this.top-o,this.pos=this.horiz?this.left:this.top),this.len=(this.horiz?i:o)||tp.defaultLegendLength}getOffset(){let t=this.legendItem?.group,e=this.chart.axisOffset[this.side];if(t){this.axisParent=t,super.getOffset();let i=this.chart.legend;i.allItems.forEach(function(t){t instanceof tp&&t.drawLegendSymbol(i,t)}),i.render(),this.chart.getMargins(!0),this.added||(this.added=!0),this.labelLeft=0,this.labelRight=this.width,this.chart.axisOffset[this.side]=e}}setLegendColor(){let t=this.horiz,e=this.reversed,i=+!!e,o=+!e,s=t?[i,0,o,0]:[0,o,0,i];this.legendColor={linearGradient:{x1:s[0],y1:s[1],x2:s[2],y2:s[3]},stops:this.stops}}drawLegendSymbol(t,e){let i=e.legendItem||{},o=t.padding,s=t.options,r=this.options.labels,a=J(s.itemDistance,10),n=this.horiz,{width:l,height:h}=this.getSize(),p=J(s.labelPadding,n?16:30);this.setLegendColor();let d=0,c=0;if(this.options.title?.text&&!this.axisTitle){this.axisGroup||(this.axisParent=i.group,this.createGroups());let t=this.len,e=this.top,o=this.left,s=this.width;this.len=n?l:h,this.top=0,this.left=0,this.width=l,this.addTitle(!0),this.len=t,this.top=e,this.left=o,this.width=s}if(this.axisTitle){let t=this.axisTitle.getBBox();d=t.height,c=t.width}let u=this.options.title||{},m=this.axisTitle?u.margin??0:0,g=n?d+m:0;i.symbol||(i.symbol=this.chart.renderer.symbol("roundedRect").attr({r:s.symbolRadius??3,zIndex:1}).add(i.group)),i.symbol.attr({x:0,y:(t.baseline||0)-11+g,width:l,height:h}),n?(i.labelWidth=Math.max(l+o+a,c||0),i.labelHeight=h+o+p+d+m):(i.labelWidth=l+o+(r.x??r.distance??0)+(this.maxLabelLength||0)+(c||0)+m,i.labelHeight=Math.max(h+o,d||0))}getTitlePosition(t){let e=super.getTitlePosition(t),i=this.options.title?.margin??0;if(this.horiz&&t)e.y=this.top-i;else if(!this.horiz&&t){let t=this.options.labels||{},o=t.x??t.distance??0;e.x=this.left+this.width+o+(this.maxLabelLength||0)+i}return e}setState(t){this.series.forEach(function(e){e.setState(t)})}setVisible(){}getSeriesExtremes(){let t=this.series,e,i,o,s,r=t.length;for(this.dataMin=1/0,this.dataMax=-1/0;r--;){for(let a of(i=(s=t[r]).colorKey=J(s.options.colorKey,s.colorKey,s.pointValKey,s.zoneAxis,"y"),o=s[i+"Min"]&&s[i+"Max"],[i,"value","y"]))if((e=s.getColumn(a)).length)break;if(o)s.minColorValue=s[i+"Min"],s.maxColorValue=s[i+"Max"];else{let t=th.prototype.getExtremes.call(s,e);s.minColorValue=t.dataMin,s.maxColorValue=t.dataMax}X(s.minColorValue)&&X(s.maxColorValue)&&(this.dataMin=Math.min(this.dataMin,s.minColorValue),this.dataMax=Math.max(this.dataMax,s.maxColorValue)),o||th.prototype.applyExtremes.call(s)}}drawCrosshair(t,e){let i,o=this.legendItem||{},s=e?.plotX,r=e?.plotY,a=this.pos,n=this.len;e&&((i=this.toPixels(e.getNestedProperty(e.series.colorKey)))<a?i=a-2:i>a+n&&(i=a+n+2),e.plotX=i,e.plotY=this.len-i,super.drawCrosshair(t,e),e.plotX=s,e.plotY=r,this.cross&&!this.cross.addedToColorAxis&&o.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(o.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||"object"!=typeof this.crosshair||this.cross.attr({fill:this.crosshair.color})))}getPlotLinePath(t){let e=this.left,i=t.translatedValue,o=this.top;return U(i)?this.horiz?[["M",i-4,o-6],["L",i+4,o-6],["L",i,o],["Z"]]:[["M",e,i],["L",e-6,i+6],["L",e-6,i-6],["Z"]]:super.getPlotLinePath(t)}update(t,e){let i=this.chart.legend;this.series.forEach(t=>{t.isDirtyData=!0}),(t.dataClasses&&i.allItems||this.dataClasses)&&this.destroyItems(),super.update(t,e),this.legendItem?.label&&(this.setLegendColor(),i.colorizeItem(this,!0))}destroyItems(){let t=this.chart,e=this.legendItem||{};if(e.label)t.legend.destroyItem(this);else if(e.labels)for(let i of e.labels)t.legend.destroyItem(i);t.isDirtyLegend=!0}destroy(){this.chart.isDirtyLegend=!0,this.destroyItems(),super.destroy(...[].slice.call(arguments))}remove(t){this.destroyItems(),super.remove(t)}getDataClassLegendSymbols(){let t,e=this,i=e.chart,o=e.legendItem&&e.legendItem.labels||[],s=i.options.legend,r=J(s.valueDecimals,-1),a=J(s.valueSuffix,""),n=t=>e.series.reduce((e,i)=>(e.push(...i.points.filter(e=>e.dataClass===t)),e),[]);return o.length||e.dataClasses.forEach((s,l)=>{let h=s.from,p=s.to,{numberFormatter:d}=i,c=!0;t="",void 0===h?t="< ":void 0===p&&(t="> "),void 0!==h&&(t+=d(h,r)+a),void 0!==h&&void 0!==p&&(t+=" - "),void 0!==p&&(t+=d(p,r)+a),o.push(N({chart:i,name:t,options:{},drawLegendSymbol:th.prototype.drawLegendSymbol,visible:!0,isDataClass:!0,setState:t=>{for(let e of n(l))e.setState(t)},setVisible:function(){this.visible=c=e.visible=!c;let t=[];for(let e of n(l))e.setVisible(c),e.hiddenInDataClass=!c,-1===t.indexOf(e.series)&&t.push(e.series);i.legend.colorizeItem(this,c),t.forEach(t=>{H(t,"afterDataClassLegendClick")})}},s))}),o}getSize(){let{chart:t,horiz:e}=this,{height:i,width:o}=this.options,{legend:s}=t.options;return{width:J(X(o)?tt(o,t.chartWidth):void 0,s?.symbolWidth,e?tp.defaultLegendLength:12),height:J(X(i)?tt(i,t.chartHeight):void 0,s?.symbolHeight,e?12:tp.defaultLegendLength)}}}tp.defaultLegendLength=200,tp.keepProps=["legendItem"],N(tp.prototype,to),Array.prototype.push.apply(k().keepProps,tp.keepProps);/**
* @license Highcharts JS v12.6.0 (2026-04-13)
* @module highcharts/modules/color-axis
* @requires highcharts
*
* ColorAxis module
*
* (c) 2012-2026 Highsoft AS
* Author: Paweł Potaczek
*
* A commercial license may be required depending on use.
* See www.highcharts.com/license
*/let td=j();td.ColorAxis=td.ColorAxis||tp,td.ColorAxis.compose(td.Chart,td.Fx,td.Legend,td.Series);let tc={lang:{zoomIn:"Zoom in",zoomOut:"Zoom out"},mapNavigation:{buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,height:18,padding:5,style:{color:"#666666",fontSize:"1em",fontWeight:"bold"},theme:{fill:"#ffffff",stroke:"#e6e6e6","stroke-width":1,"text-align":"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1}};!function(t){let e,i=0;function o(t){let e=this.chart;t=this.normalize(t),e.options.mapNavigation.enableDoubleClickZoomTo?e.pointer.inClass(t.target,"highcharts-tracker")&&e.hoverPoint&&e.hoverPoint.zoomTo():e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&e.mapZoom(.5,void 0,void 0,t.chartX,t.chartY)}function s(t){let o=this.chart,s=X((t=this.normalize(t)).wheelDelta)&&-t.wheelDelta/120||t.deltaY||t.detail;Math.abs(s)>=1&&(i+=Math.abs(s),e&&F(e),e=setTimeout(()=>{i=0},50)),i<10&&o.isInsidePlot(t.chartX-o.plotLeft,t.chartY-o.plotTop)&&o.mapView&&o.mapView.zoomBy(-((o.options.mapNavigation.mouseWheelSensitivity-1)*s),void 0,[t.chartX,t.chartY],!(1>Math.abs(s))&&void 0)}function r(t,e,i){let o=this.chart;if(e=t.call(this,e,i),o&&o.mapView){let t=o.mapView.pixelsToLonLat({x:e.chartX-o.plotLeft,y:e.chartY-o.plotTop});t&&N(e,t)}return e}function a(t){let e=this.chart.options.mapNavigation;e&&J(e.enableTouchZoom,e.enabled)&&(this.chart.zooming.pinchType="xy"),t.apply(this,[].slice.call(arguments,1))}t.compose=function(t){let e=t.prototype;e.onContainerDblClick||(N(e,{onContainerDblClick:o,onContainerMouseWheel:s}),te(e,"normalize",r),te(e,"zoomOption",a))}}(b||(b={}));let tu=b;function tm(t,e,i,o,s){if(s){let t=s?.r||0;s.brBoxY=e-t,s.brBoxHeight=o+t}return d.roundedRect(t,e,i,o,s)}function tg(t,e,i,o,s){if(s){let t=s?.r||0;s.brBoxHeight=o+t}return d.roundedRect(t,e,i,o,s)}let tf=function(t){(d=t.prototype.symbols).bottombutton=tm,d.topbutton=tg},{setOptions:ty}=j(),{composed:tb}=j();function tx(t){t&&(t.preventDefault?.(),t.stopPropagation?.(),t.cancelBubble=!0)}class tM{static compose(t,e,i){tu.compose(e),tf(i),Q(tb,"Map.Navigation")&&(O(t,"beforeRender",function(){this.mapNavigation=new tM(this),this.mapNavigation.update()}),ty(tc))}constructor(t){this.chart=t,this.navButtons=[]}update(t){let e=this,i=e.chart,o=e.navButtons,s=function(t){this.handler.call(i,t),tx(t)},r=i.options.mapNavigation;for(t&&(r=i.options.mapNavigation=$(i.options.mapNavigation,t));o.length;)o.pop()?.destroy();!i.renderer.forExport&&J(r.enableButtons,r.enabled)&&(e.navButtonsGroup||(e.navButtonsGroup=i.renderer.g().attr({zIndex:7}).add()),q(r.buttons,(t,a)=>{let n={padding:(t=$(r.buttonOptions,t)).padding};!i.styledMode&&t.theme&&(N(n,t.theme),n.style=$(t.theme.style,t.style));let{text:l,width:h=0,height:p=0,padding:d=0}=t,c=i.renderer.button("+"!==l&&"-"!==l&&l||"",0,0,s,n,void 0,void 0,void 0,"zoomIn"===a?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+({zoomIn:"zoom-in",zoomOut:"zoom-out"})[a]).attr({width:h,height:p,title:i.options.lang[a],zIndex:5}).add(e.navButtonsGroup);if("+"===l||"-"===l){let e=h+1,o=[["M",d+3,d+p/2],["L",d+e-3,d+p/2]];"+"===l&&o.push(["M",d+e/2,d+3],["L",d+e/2,d+p-3]),i.renderer.path(o).addClass("highcharts-button-symbol").attr(i.styledMode?{}:{stroke:t.style?.color,"stroke-width":3,"stroke-linecap":"round"}).add(c)}if(c.handler=t.onclick,O(c.element,"dblclick",tx),o.push(c),N(t,{width:c.width,height:2*(c.height||0)}),i.hasLoaded)c.align(t,!1,t.alignTo);else{let e=O(i,"load",()=>{c.element&&c.align(t,!1,t.alignTo),e()})}}),i.hasLoaded||O(i,"render",function(){let t=i.exporting?.group?.getBBox();if(t){let i=e.navButtonsGroup.getBBox();if(!(i.x>=t.x+t.width||i.x+i.width<=t.x||i.y>=t.y+t.height||i.y+i.height<=t.y)){let o=-i.y-i.height+t.y-5,s=t.y+t.height-i.y+5,a=r.buttonOptions&&r.buttonOptions.verticalAlign;e.navButtonsGroup.attr({translateY:"bottom"===a?o:s})}}})),this.updateEvents(r)}updateEvents(t){let e=this.chart;J(t.enableDoubleClickZoom,t.enabled)||t.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||O(e.container,"dblclick",function(t){e.pointer.onContainerDblClick(t)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()),J(t.enableMouseWheelZoom,t.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||O(e.container,"wheel",function(t){if(!e.pointer.inClass(t.target,"highcharts-no-mousewheel")){let i=e.mapView?.zoom;e.pointer.onContainerMouseWheel(t),i!==e.mapView?.zoom&&tx(t)}return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())}}var tv=P(28),tw=P.n(tv);let{column:{prototype:tC}}=tn().seriesTypes;var tT=x||(x={});function tP(t){let e=this.series,i=e.chart.renderer;this.moveToTopOnHover&&this.graphic&&(e.stateMarkerGraphic||(e.stateMarkerGraphic=new(tw())(i,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),t?.state==="hover"?(this.graphic.attr({id:this.id}),e.stateMarkerGraphic.attr({href:`${i.url}#${this.id}`,visibility:"visible"})):e.stateMarkerGraphic.attr({href:""}))}tT.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&this.value!==1/0&&this.value!==-1/0&&(void 0===this.value||!isNaN(this.value))}},tT.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(t){let e={};return X(t.color)&&(!t.state||"normal"===t.state)&&(e[this.colorProp||"fill"]=t.color),e},pointAttribs:tC.pointAttribs},tT.compose=function(t){return O(t.prototype.pointClass,"afterSetState",tP),t};let tL=x;var tA=P(820),tj=P.n(tA);let{deg2rad:tz}=j();(u=M||(M={})).getCenter=function(){let t=this.options,e=this.chart,i=2*(t.slicedOffset||0),o=e.plotWidth-2*i,s=e.plotHeight-2*i,r=t.center,a=Math.min(o,s),n=t.thickness,l,h=t.size,p=t.innerSize||0,d,c;"string"==typeof h&&(h=parseFloat(h)),"string"==typeof p&&(p=parseFloat(p));let u=[J(r?.[0],"50%"),J(r?.[1],"50%"),J(h&&h<0?void 0:t.size,"100%"),J(p&&p<0?void 0:t.innerSize||0,"0%")];for(!e.angular||this instanceof tj()||(u[3]=0),d=0;d<4;++d)c=u[d],l=d<2||2===d&&/%$/.test(c),u[d]=tt(c,[o,s,a,u[2]][d])+(l?i:0);return u[3]>u[2]&&(u[3]=u[2]),U(n)&&2*n<u[2]&&n>0&&(u[3]=u[2]-2*n),H(this,"afterGetCenter",{positions:u}),u},u.getStartAndEndRadians=function(t,e){let i=U(t)?t:0,o=U(e)&&e>i&&e-i<360?e:i+360;return{start:tz*(i+-90),end:tz*(o+-90)}};let tk=M;var tS=P(960),tI=P.n(tS),tE=P(540),tB=P.n(tE);let{getOptions:tO}=j();class tD extends tI(){init(t,e){let i=tO().credits,o=$({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:J(i.mapText,' \xa9 <a href="{geojson.copyrightUrl}">{geojson.copyrightShort}</a>'),mapTextFull:J(i.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},t);super.init(o,e)}mapZoom(t,e,i,o,s){this.mapView&&(U(t)&&(t=Math.log(t)/Math.log(.5)),this.mapView.zoomBy(t,U(e)&&U(i)?this.mapView.projection.inverse([e,i]):void 0,U(o)&&U(s)?[o,s]:void 0))}update(t){t.chart&&"map"in t.chart&&this.mapView?.recommendMapView(this,[t.chart.map,...(this.options.series||[]).map(t=>t.mapData)],!0),super.update.apply(this,arguments)}}(m=tD||(tD={})).maps={},m.mapChart=function(t,e,i){return new m(t,e,i)},m.splitPath=function(t){let e;return e="string"==typeof t?(t=t.replace(/([A-Z])/gi," $1 ").replace(/^\s*/,"").replace(/\s*$/,"")).split(/[ ,;]+/).map(t=>/[A-Z]/i.test(t)?t:parseFloat(t)):t,tB().prototype.pathToSegments(e)};let tV=tD,tR={boundsFromPath:function(t){let e=-Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,r;if(t.forEach(t=>{let a=t[t.length-2],n=t[t.length-1];"number"==typeof a&&"number"==typeof n&&(i=Math.min(i,a),e=Math.max(e,a),s=Math.min(s,n),o=Math.max(o,n),r=!0)}),r)return{x1:i,y1:s,x2:e,y2:o}}},{boundsFromPath:tG}=tR,tX=tn().seriesTypes.scatter.prototype.pointClass;class tN extends tX{static getProjectedPath(t,e){return t.projectedPath||(e&&t.geometry?(e.hasCoordinates=!0,t.projectedPath=e.path(t.geometry)):t.projectedPath=t.path),t.projectedPath||[]}applyOptions(t,e){let i=this.series,o=super.applyOptions(t,e),s=i.joinBy;if(i.mapData&&i.mapMap){let t=s[1],e=super.getNestedProperty(t),r=void 0!==e&&i.mapMap[e];r?N(o,{...r,name:o.name??r.name}):-1!==i.pointArrayMap.indexOf("value")&&(o.value=o.value||null)}return o}getProjectedBounds(t){let e=tG(tN.getProjectedPath(this,t)),i=this.properties,o=this.series.chart.mapView;if(e){let s=i?.["hc-middle-lon"],r=i?.["hc-middle-lat"];if(o&&U(s)&&U(r)){let i=t.forward([s,r]);e.midX=i[0],e.midY=i[1]}else{let t=i?.["hc-middle-x"],o=i?.["hc-middle-y"];e.midX=e.x1+(e.x2-e.x1)*J(this.middleX,U(t)?t:.5);let s=J(this.middleY,U(o)?o:.5);this.geometry||(s=1-s),e.midY=e.y2-(e.y2-e.y1)*s}return e}}onMouseOver(t){F(this.colorInterval),!this.isNull&&this.visible||this.series.options.nullInteraction?super.onMouseOver.call(this,t):this.series.onMouseOut()}setVisible(t){this.visible=this.options.visible=!!t,this.dataLabel&&this.dataLabel[t?"show":"hide"](),this.graphic&&this.graphic.attr(this.series.pointAttribs(this))}zoomTo(t){let e=this.series.chart,i=e.mapView,o=this.bounds;if(i&&o){let s=U(this.insetIndex)&&i.insets[this.insetIndex];if(s){let t=s.projectedUnitsToPixels({x:o.x1,y:o.y1}),e=s.projectedUnitsToPixels({x:o.x2,y:o.y2}),r=i.pixelsToProjectedUnits({x:t.x,y:t.y}),a=i.pixelsToProjectedUnits({x:e.x,y:e.y});o={x1:r.x,y1:r.y,x2:a.x,y2:a.y}}i.fitToBounds(o,void 0,!1),this.series.isDirty=!0,e.redraw(t)}}}N(tN.prototype,{dataLabelOnNull:tL.pointMembers.dataLabelOnNull,moveToTopOnHover:tL.pointMembers.moveToTopOnHover,isValid:tL.pointMembers.isValid});let tH={center:[0,0],fitToGeometry:void 0,maxZoom:void 0,padding:0,projection:{name:void 0,parallels:void 0,rotation:void 0},zoom:void 0,insetOptions:{borderColor:"#cccccc",borderWidth:1,padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}};var tW=P(984),tY=P.n(tW);let{win:tF}=j(),{format:tZ}=tY();!function(t){function e(t){return this.mapView?.lonLatToProjectedUnits(t)}function i(t){return this.mapView?.projectedUnitsToLonLat(t)}function o(t,e){let i=this.options.chart.proj4||tF.proj4;if(!i)return void(0,A.error)(21,!1,this);let{jsonmarginX:o=0,jsonmarginY:s=0,jsonres:r=1,scale:a=1,xoffset:n=0,xpan:l=0,yoffset:h=0,ypan:p=0}=e,d=i(e.crs,[t.lon,t.lat]),c=e.cosAngle||e.rotation&&Math.cos(e.rotation),u=e.sinAngle||e.rotation&&Math.sin(e.rotation),m=e.rotation?[d[0]*c+d[1]*u,-d[0]*u+d[1]*c]:d;return{x:((m[0]-n)*a+l)*r+o,y:-(((h-m[1])*a+p)*r-s)}}function s(t,e){let i=this.options.chart.proj4||tF.proj4;if(!i)return void(0,A.error)(21,!1,this);if(null===t.y)return;let{jsonmarginX:o=0,jsonmarginY:s=0,jsonres:r=1,scale:a=1,xoffset:n=0,xpan:l=0,yoffset:h=0,ypan:p=0}=e,d={x:((t.x-o)/r-l)/a+n,y:((t.y-s)/r+p)/a+h},c=e.cosAngle||e.rotation&&Math.cos(e.rotation),u=e.sinAngle||e.rotation&&Math.sin(e.rotation),m=i(e.crs,"WGS84",e.rotation?{x:d.x*c+-(d.y*u),y:d.x*u+d.y*c}:d);return{lat:m.y,lon:m.x}}function r(t,e){e||(e=Object.keys(t.objects)[0]);let i=t.objects[e];if(i["hc-decoded-geojson"]&&i["hc-decoded-geojson"].title===t.title)return i["hc-decoded-geojson"];let o=t.arcs;if(t.transform){let e,i,s,r=t.arcs,{scale:a,translate:n}=t.transform;o=[];for(let t=0,l=r.length;t<l;++t){let l=r[t];o.push(e=[]),i=0,s=0;for(let t=0,o=l.length;t<o;++t)e.push([(i+=l[t][0])*a[0]+n[0],(s+=l[t][1])*a[1]+n[1]])}}let s=t=>"number"==typeof t[0]?t.reduce((t,e,i)=>{let s=e<0?o[~e]:o[e];return e<0?(s=s.slice(0,0===i?s.length:s.length-1)).reverse():i&&(s=s.slice(1)),t.concat(s)},[]):t.map(s),r=i.geometries,a=[];for(let t=0,e=r.length;t<e;++t)a.push({type:"Feature",properties:r[t].properties,geometry:{type:r[t].type,coordinates:r[t].coordinates||s(r[t].arcs)}});let n={type:"FeatureCollection",copyright:t.copyright,copyrightShort:t.copyrightShort,copyrightUrl:t.copyrightUrl,features:a,"hc-recommended-mapview":i["hc-recommended-mapview"],bbox:t.bbox,title:t.title};return i["hc-decoded-geojson"]=n,n}function a(t,e){e=$(!0,this.options.credits,e),t.call(this,e),this.credits&&this.mapCreditsFull&&this.credits.attr({title:this.mapCreditsFull})}t.compose=function(t){let r=t.prototype;r.transformFromLatLon||(r.fromLatLonToPoint=e,r.fromPointToLatLon=i,r.transformFromLatLon=o,r.transformToLatLon=s,te(r,"addCredits",a))},t.geojson=function(t,e="map",i){let o=[],s="Topology"===t.type?r(t):t,a=s.features;for(let t=0,i=a.length;t<i;++t){let i,s=a[t],r=s.geometry||{},n=r.type,l=r.coordinates,h=s.properties;if(("map"===e||"mapbubble"===e)&&("Polygon"===n||"MultiPolygon"===n)||"mapline"===e&&("LineString"===n||"MultiLineString"===n)?l.length&&(i={geometry:{coordinates:l,type:n}}):"mappoint"===e&&"Point"===n&&l.length&&(i={geometry:{coordinates:l,type:n}}),i){let t=h&&(h.name||h.NAME),e=h&&h.lon,s=h&&h.lat;o.push(N(i,{lat:"number"==typeof s?s:void 0,lon:"number"==typeof e?e:void 0,name:"string"==typeof t?t:void 0,properties:h}))}}return i&&s.copyrightShort&&(i.chart.mapCredits=tZ(i.chart.options.credits?.mapText,{geojson:s}),i.chart.mapCreditsFull=tZ(i.chart.options.credits?.mapTextFull,{geojson:s})),o},t.topo2geo=r}(v||(v={}));let tU=v;(g=w||(w={})).getCenterOfPoints=function(t){let e=t.reduce((t,e)=>(t.x+=e.x,t.y+=e.y,t),{x:0,y:0});return{x:e.x/t.length,y:e.y/t.length}},g.getDistanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},g.getAngleBetweenPoints=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)},g.pointInPolygon=function({x:t,y:e},i){let o=i.length,s,r,a=!1;for(s=0,r=o-1;s<o;r=s++){let[o,n]=i[s],[l,h]=i[r];n>e!=h>e&&t<(l-o)*(e-n)/(h-n)+o&&(a=!a)}return a};let t_=w;function tK(t,e,i=!0){let o=e[e.length-1],s,r,a,n=t;for(let t=0;t<e.length;t++){let l=n;s=e[t],n=[],r=i?l[l.length-1]:l[0];for(let t=0;t<l.length;t++)t$(o,s,a=l[t])?(t$(o,s,r)||n.push(tq(o,s,r,a)),n.push(a)):t$(o,s,r)&&n.push(tq(o,s,r,a)),r=a;o=s}return n}function t$(t,e,i){return(e[0]-t[0])*(i[1]-t[1])>(e[1]-t[1])*(i[0]-t[0])}function tq(t,e,i,o){let s=[t[0]-e[0],t[1]-e[1]],r=[i[0]-o[0],i[1]-o[1]],a=t[0]*e[1]-t[1]*e[0],n=i[0]*o[1]-i[1]*o[0],l=1/(s[0]*r[1]-s[1]*r[0]),h=[(a*r[0]-n*s[0])*l,(a*r[1]-n*s[1])*l];return h.isIntersection=!0,h}let tJ=Math.sign||(t=>0===t?0:t>0?1:-1),tQ=Math.PI/180,t0=Math.PI/2,t1=t=>Math.tan((t0+t)/2),t2=class{constructor(t){const e=(t.parallels||[]).map(t=>t*tQ),i=e[0]||0,o=e[1]??i,s=Math.cos(i);"object"==typeof t.projectedBounds&&(this.projectedBounds=t.projectedBounds);let r=i===o?Math.sin(i):Math.log(s/Math.cos(o))/Math.log(t1(o)/t1(i));1e-10>Math.abs(r)&&(r=1e-10*(tJ(r)||1)),this.n=r,this.c=s*Math.pow(t1(i),r)/r}forward(t){let{c:e,n:i,projectedBounds:o}=this,s=t[0]*tQ,r=t[1]*tQ;e>0?r<-t0+1e-6&&(r=-t0+1e-6):r>t0-1e-6&&(r=t0-1e-6);let a=e/Math.pow(t1(r),i),n=a*Math.sin(i*s)*63.78137,l=(e-a*Math.cos(i*s))*63.78137,h=[n,l];return o&&(n<o.x1||n>o.x2||l<o.y1||l>o.y2)&&(h.outside=!0),h}inverse(t){let{c:e,n:i}=this,o=t[0]/63.78137,s=e-t[1]/63.78137,r=tJ(i)*Math.sqrt(o*o+s*s),a=Math.atan2(o,Math.abs(s))*tJ(s);return s*i<0&&(a-=Math.PI*tJ(o)*tJ(s)),[a/i/tQ,(2*Math.atan(Math.pow(e/r,1/i))-t0)/tQ]}},t6=Math.sqrt(3)/2,t3=class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}forward(t){let e=Math.PI/180,i=Math.asin(t6*Math.sin(t[1]*e)),o=i*i,s=o*o*o;return[t[0]*e*Math.cos(i)*74.03120656864502/(t6*(1.340264+-.24331799999999998*o+s*(.0062510000000000005+.034164*o))),74.03120656864502*i*(1.340264+-.081106*o+s*(893e-6+.003796*o))]}inverse(t){let e=t[0]/74.03120656864502,i=t[1]/74.03120656864502,o=180/Math.PI,s=i,r,a,n,l;for(let t=0;t<12&&(a=(r=s*s)*r*r,n=s*(1.340264+-.081106*r+a*(893e-6+.003796*r))-i,s-=l=n/(1.340264+-.24331799999999998*r+a*(.0062510000000000005+.034164*r)),!(1e-9>Math.abs(l)));++t);a=(r=s*s)*r*r;let h=o*t6*e*(1.340264+-.24331799999999998*r+a*(.0062510000000000005+.034164*r))/Math.cos(s),p=o*Math.asin(Math.sin(s)/t6);return Math.abs(h)>180?[NaN,NaN]:[h,p]}},t8=Math.PI/4,t7=Math.PI/180,t9=class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}forward(t){return[t[0]*t7*63.78137,79.7267125*Math.log(Math.tan(t8+.4*t[1]*t7))]}inverse(t){return[t[0]/63.78137/t7,2.5*(Math.atan(Math.exp(.8*(t[1]/63.78137)))-t8)/t7]}},t4=Math.PI/180,t5=class{constructor(){this.antimeridianCutting=!1,this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,y2:63.78460826781007}}forward(t){let e=t[0],i=t[1]*t4,o=[Math.cos(i)*Math.sin(e*t4)*63.78460826781007,63.78460826781007*Math.sin(i)];return(e<-90||e>90)&&(o.outside=!0),o}inverse(t){let e=t[0]/63.78460826781007,i=t[1]/63.78460826781007,o=Math.sqrt(e*e+i*i),s=Math.asin(o),r=Math.sin(s);return[Math.atan2(e*r,o*Math.cos(s))/t4,Math.asin(o&&i*r/o)/t4]}},et=Math.PI/180,ee=class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071},this.maxLatitude=85.0511287798}forward(t){let e=Math.sin(t[1]*et),i=[63.78137*t[0]*et,63.78137*Math.log((1+e)/(1-e))/2];return Math.abs(t[1])>this.maxLatitude&&(i.outside=!0),i}inverse(t){return[t[0]/(63.78137*et),(2*Math.atan(Math.exp(t[1]/63.78137))-Math.PI/2)/et]}},{clipLineString:ei,clipPolygon:eo}={clipLineString:function(t,e){let i=[],o=tK(t,e,!1);for(let t=1;t<o.length;t++)o[t].isIntersection&&o[t-1].isIntersection&&(i.push(o.splice(0,t)),t=0),t===o.length-1&&i.push(o);return i},clipPolygon:tK},es=2*Math.PI/360,er=t=>(t<-180&&(t+=360),t>180&&(t-=360),t),ea=t=>(1-Math.cos(t))/2;class en{static add(t,e){en.registry[t]=e}static distance(t,e){let i,o,s,r,a,{atan2:n,sqrt:l}=Math,h=(i=Math.cos,o=t[1]*es,s=t[0]*es,r=e[1]*es,a=e[0]*es,ea(r-o)+i(o)*i(r)*ea(a-s));return 6371e3*(2*n(l(h),l(1-h)))}static geodesic(t,e,i,o=5e5){let{atan2:s,cos:r,sin:a,sqrt:n}=Math,l=en.distance,h=t[1]*es,p=t[0]*es,d=e[1]*es,c=e[0]*es,u=r(h)*r(p),m=r(d)*r(c),g=r(h)*a(p),f=r(d)*a(c),y=a(h),b=a(d),x=l(t,e),M=x/6371e3,v=a(M),w=Math.round(x/o),C=[];if(i&&C.push(t),w>1){let t=1/w;for(let e=t;e<.999;e+=t){let t=a((1-e)*M)/v,i=a(e*M)/v,o=t*u+i*m,r=t*g+i*f,l=s(t*y+i*b,n(o*o+r*r)),h=s(r,o);C.push([h/es,l/es])}}return i&&C.push(e),C}static insertGeodesics(t){let e=t.length-1;for(;e--;)if(Math.max(Math.abs(t[e][0]-t[e+1][0]),Math.abs(t[e][1]-t[e+1][1]))>10){let i=en.geodesic(t[e],t[e+1]);i.length&&t.splice(e+1,0,...i)}}static toString(t){let{name:e,rotation:i}=t||{};return[e,i&&i.join(",")].join(";")}constructor(t={}){this.hasCoordinates=!1,this.hasGeoProjection=!1,this.maxLatitude=90,this.options=t;const{name:e,projectedBounds:i,rotation:o}=t;this.rotator=o?this.getRotator(o):void 0;const s=e?en.registry[e]:void 0;s&&(this.def=new s(t));const{def:r,rotator:a}=this;r&&(this.maxLatitude=r.maxLatitude||90,this.hasGeoProjection=!0),a&&r?(this.forward=t=>r.forward(a.forward(t)),this.inverse=t=>a.inverse(r.inverse(t))):r?(this.forward=t=>r.forward(t),this.inverse=t=>r.inverse(t)):a&&(this.forward=a.forward,this.inverse=a.inverse),this.bounds="world"===i?r&&r.bounds:i}lineIntersectsBounds(t){let{x1:e,x2:i,y1:o,y2:s}=this.bounds||{},r=(t,e,i)=>{let[o,s]=t,r=+!e;if("number"==typeof i&&o[e]>=i!=s[e]>=i){let t=(i-o[e])/(s[e]-o[e]),a=o[r]+t*(s[r]-o[r]);return e?[a,i]:[i,a]}},a,n=t[0];return(a=r(t,0,e))?(n=a,t[1]=a):(a=r(t,0,i))&&(n=a,t[1]=a),(a=r(t,1,o))?n=a:(a=r(t,1,s))&&(n=a),n}getRotator(t){let e=t[0]*es,i=(t[1]||0)*es,o=(t[2]||0)*es,s=Math.cos(i),r=Math.sin(i),a=Math.cos(o),n=Math.sin(o);if(0!==e||0!==i||0!==o)return{forward:t=>{let i=t[0]*es+e,o=t[1]*es,l=Math.cos(o),h=Math.cos(i)*l,p=Math.sin(i)*l,d=Math.sin(o),c=d*s+h*r;return[Math.atan2(p*a-c*n,h*s-d*r)/es,Math.asin(c*a+p*n)/es]},inverse:t=>{let i=t[0]*es,o=t[1]*es,l=Math.cos(o),h=Math.cos(i)*l,p=Math.sin(i)*l,d=Math.sin(o),c=d*a-p*n;return[(Math.atan2(p*a+d*n,h*s+c*r)-e)/es,Math.asin(c*s-h*r)/es]}}}forward(t){return t}inverse(t){return t}cutOnAntimeridian(t,e){let i,o=[],s=[t];for(let i=0,s=t.length;i<s;++i){let s=t[i],r=t[i-1];if(!i){if(!e)continue;r=t[t.length-1]}let a=r[0],n=s[0];if((a<-90||a>90)&&(n<-90||n>90)&&a>0!=n>0){let t=R((180-(a+360)%360)/((n+360)%360-(a+360)%360),0,1),e=r[1]+t*(s[1]-r[1]);o.push({i,lat:e,direction:a<0?1:-1,previousLonLat:r,lonLat:s})}}if(o.length)if(e){if(o.length%2==1){var r=i=o.slice().sort((t,e)=>Math.abs(e.lat)-Math.abs(t.lat))[0];let t=o.length;for(;t--;)if(o[t]===r){o.splice(t,1);break}}let e=o.length-2;for(;e>=0;){let i=o[e].i,r=er(180+1e-6*o[e].direction),a=er(180-1e-6*o[e].direction),n=t.splice(i,o[e+1].i-i,...en.geodesic([r,o[e].lat],[r,o[e+1].lat],!0));n.push(...en.geodesic([a,o[e+1].lat],[a,o[e].lat],!0)),s.push(n),e-=2}if(i)for(let t=0;t<s.length;t++){let{direction:e,lat:o}=i,r=s[t],a=r.indexOf(i.lonLat);if(a>-1){let t=(o<0?-1:1)*this.maxLatitude,s=er(180+1e-6*e),n=er(180-1e-6*e),l=en.geodesic([s,o],[s,t],!0);for(let i=s+120*e;i>-180&&i<180;i+=120*e)l.push([i,t]);l.push(...en.geodesic([n,t],[n,i.lat],!0)),r.splice(a,0,...l);break}}}else{let e=o.length;for(;e--;){let i=o[e].i,r=t.splice(i,t.length,[er(180+1e-6*o[e].direction),o[e].lat]);r.unshift([er(180-1e-6*o[e].direction),o[e].lat]),s.push(r)}}return s}path(t){let e,{bounds:i,def:o,rotator:s}=this,r=[],a="Polygon"===t.type||"MultiPolygon"===t.type,n=this.hasGeoProjection,l=!o||!1!==o.antimeridianCutting,h=l?s:void 0,p=l&&o||this;i&&(e=[[i.x1,i.y1],[i.x2,i.y1],[i.x2,i.y2],[i.x1,i.y2]]);let d=t=>{let o=t.map(t=>{if(l){h&&(t=h.forward(t));let e=t[0];1e-6>Math.abs(e-180)&&(e=e<180?179.999999:180.000001),t=[e,t[1]]}return t}),s=[o];n&&(en.insertGeodesics(o),l&&(s=this.cutOnAntimeridian(o,a))),s.forEach(t=>{let o,s;if(t.length<2)return;let h=!1,d=!1,c=t=>{h?r.push(["L",t[0],t[1]]):(r.push(["M",t[0],t[1]]),h=!0)},u=!1,m=!1,g=t.map(t=>{let e=p.forward(t);return e.outside?u=!0:m=!0,e[1]===1/0?e[1]=1e10:e[1]===-1/0&&(e[1]=-1e10),e});if(l){if(a&&g.push(g[0]),u){if(!m)return;if(e){if(a)g=eo(g,e);else if(i)return void ei(g,e).forEach(t=>{h=!1,t.forEach(c)})}}g.forEach(c)}else for(let e=0;e<g.length;e++){let i=t[e],r=g[e];r.outside?d=!0:(a&&!o&&(o=i,t.push(i),g.push(r)),d&&s&&(a&&n?en.geodesic(s,i).forEach(t=>c(p.forward(t))):h=!1),c(r),s=i,d=!1)}})};return"LineString"===t.type?d(t.coordinates):"MultiLineString"===t.type?t.coordinates.forEach(t=>d(t)):"Polygon"===t.type?(t.coordinates.forEach(t=>d(t)),r.length&&r.push(["Z"])):"MultiPolygon"===t.type&&(t.coordinates.forEach(t=>{t.forEach(t=>d(t))}),r.length&&r.push(["Z"])),r}}en.registry={EqualEarth:t3,LambertConformalConic:t2,Miller:t9,Orthographic:t5,WebMercator:ee};let{composed:el}=j(),{pointInPolygon:eh}=t_,{topo2geo:ep}=tU,{boundsFromPath:ed}=tR,ec={};function eu(t,e){let{width:i,height:o}=e;return Math.log(400.979322/Math.max((t.x2-t.x1)/(i/256),(t.y2-t.y1)/(o/256)))/Math.log(2)}function em(t){t.seriesOptions.mapData&&this.mapView?.recommendMapView(this,[this.options.chart.map,t.seriesOptions.mapData],this.options.drilldown?.mapZooming)}class eg{static compose(t){Q(el,"MapView")&&(ec=t.maps,O(t,"afterInit",function(){this.mapView=new eg(this,this.options.mapView)},{order:0}),O(t,"addSeriesAsDrilldown",em),O(t,"afterDrillUp",em))}static compositeBounds(t){if(t.length)return t.slice(1).reduce((t,e)=>(t.x1=Math.min(t.x1,e.x1),t.y1=Math.min(t.y1,e.y1),t.x2=Math.max(t.x2,e.x2),t.y2=Math.max(t.y2,e.y2),t),$(t[0]))}static mergeInsets(t,e){let i=t=>{let e={};return t.forEach((t,i)=>{e[t&&t.id||`i${i}`]=t}),e},o=$(i(t),i(e));return Object.keys(o).map(t=>o[t])}constructor(t,e){this.allowTransformAnimation=!0,this.eventsToUnbind=[],this.insets=[],this.padding=[0,0,0,0],this.recommendedMapView={},this instanceof ef||this.recommendMapView(t,[t.options.chart.map,...(t.options.series||[]).map(t=>t.mapData)]),this.userOptions=e||{};const i=$(tH,this.recommendedMapView,e),o=this.recommendedMapView?.insets,s=e&&e.insets;o&&s&&(i.insets=eg.mergeInsets(o,s)),this.chart=t,this.center=i.center,this.options=i,this.projection=new en(i.projection),this.playingField=t.plotBox,this.zoom=i.zoom||0,this.minZoom=i.minZoom,this.createInsets(),this.eventsToUnbind.push(O(t,"afterSetChartSize",()=>{this.playingField=this.getField(),(void 0===this.minZoom||this.minZoom===this.zoom)&&(this.fitToBounds(void 0,void 0,!1),!this.chart.hasRendered&&U(this.userOptions.zoom)&&(this.zoom=this.userOptions.zoom),this.userOptions.center&&$(!0,this.center,this.userOptions.center))})),this.setUpEvents()}createInsets(){let t=this.options,e=t.insets;e&&e.forEach(e=>{let i=new ef(this,$(t.insetOptions,e));this.insets.push(i)})}fitToBounds(t,e,i=!0,o){let s=t||this.getProjectedBounds();if(s){let r=J(e,t?0:this.options.padding),a=this.getField(!1),n=_(r)?r:[r,r,r,r];this.padding=[tt(n[0],a.height),tt(n[1],a.width),tt(n[2],a.height),tt(n[3],a.width)],this.playingField=this.getField();let l=eu(s,this.playingField);t||(this.minZoom=l);let h=this.projection.inverse([(s.x2+s.x1)/2,(s.y2+s.y1)/2]);this.setView(h,l,i,o)}}getField(t=!0){let e=t?this.padding:[0,0,0,0];return{x:e[3],y:e[0],width:this.chart.plotWidth-e[1]-e[3],height:this.chart.plotHeight-e[0]-e[2]}}getGeoMap(t){if("string"==typeof t)return ec[t]&&"Topology"===ec[t].type?ep(ec[t]):ec[t];if(K(t,!0)){if("FeatureCollection"===t.type)return t;if("Topology"===t.type)return ep(t)}}getMapBBox(){let t=this.getProjectedBounds(),e=this.getScale();if(t){let i=this.padding,o=this.projectedUnitsToPixels({x:t.x1,y:t.y2});return{width:(t.x2-t.x1)*e+i[1]+i[3],height:(t.y2-t.y1)*e+i[0]+i[2],x:o.x-i[3],y:o.y-i[0]}}}getProjectedBounds(){let t=this.projection,e=this.chart.series.reduce((t,e)=>{let i=e.getProjectedBounds&&e.getProjectedBounds();return i&&!1!==e.options.affectsMapView&&t.push(i),t},[]),i=this.options.fitToGeometry;if(i){if(!this.fitToGeometryCache)if("MultiPoint"===i.type){let e=i.coordinates.map(e=>t.forward(e)),o=e.map(t=>t[0]),s=e.map(t=>t[1]);this.fitToGeometryCache={x1:Math.min.apply(0,o),x2:Math.max.apply(0,o),y1:Math.min.apply(0,s),y2:Math.max.apply(0,s)}}else this.fitToGeometryCache=ed(t.path(i));return this.fitToGeometryCache}return this.projection.bounds||eg.compositeBounds(e)}getScale(){return 256/400.979322*Math.pow(2,this.zoom)}getSVGTransform(){let{x:t,y:e,width:i,height:o}=this.playingField,s=this.projection.forward(this.center),r=this.projection.hasCoordinates?-1:1,a=this.getScale(),n=a*r,l=t+i/2-s[0]*a,h=e+o/2-s[1]*n;return{scaleX:a,scaleY:n,translateX:l,translateY:h}}lonLatToPixels(t){let e=this.lonLatToProjectedUnits(t);if(e)return this.projectedUnitsToPixels(e)}lonLatToProjectedUnits(t){let e=this.chart,i=e.mapTransforms;if(i){for(let o in i)if(Object.hasOwnProperty.call(i,o)&&i[o].hitZone){let s=e.transformFromLatLon(t,i[o]);if(s&&eh(s,i[o].hitZone.coordinates[0]))return s}return e.transformFromLatLon(t,i.default)}for(let e of this.insets)if(e.options.geoBounds&&eh({x:t.lon,y:t.lat},e.options.geoBounds.coordinates[0])){let i=e.projection.forward([t.lon,t.lat]),o=e.projectedUnitsToPixels({x:i[0],y:i[1]});return this.pixelsToProjectedUnits(o)}let o=this.projection.forward([t.lon,t.lat]);if(!o.outside)return{x:o[0],y:o[1]}}pixelsToLonLat(t){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(t))}pixelsToProjectedUnits(t){let{x:e,y:i}=t,o=this.getScale(),s=this.projection.forward(this.center),r=this.playingField,a=r.x+r.width/2,n=r.y+r.height/2;return{x:s[0]+(e-a)/o,y:s[1]-(i-n)/o}}projectedUnitsToLonLat(t){let e=this.chart,i=e.mapTransforms;if(i){for(let o in i)if(Object.hasOwnProperty.call(i,o)&&i[o].hitZone&&eh(t,i[o].hitZone.coordinates[0]))return e.transformToLatLon(t,i[o]);return e.transformToLatLon(t,i.default)}let o=this.projectedUnitsToPixels(t);for(let t of this.insets)if(t.hitZone&&eh(o,t.hitZone.coordinates[0])){let e=t.pixelsToProjectedUnits(o),i=t.projection.inverse([e.x,e.y]);return{lon:i[0],lat:i[1]}}let s=this.projection.inverse([t.x,t.y]);return{lon:s[0],lat:s[1]}}projectedUnitsToPixels(t){let e=this.getScale(),i=this.projection.forward(this.center),o=this.playingField,s=o.x+o.width/2,r=o.y+o.height/2;return{x:s-e*(i[0]-t.x),y:r+e*(i[1]-t.y)}}recommendMapView(t,e,i=!1){this.recommendedMapView={};let o=e.map(t=>this.getGeoMap(t)),s=[];o.forEach(t=>{if(t&&(Object.keys(this.recommendedMapView).length||(this.recommendedMapView=t["hc-recommended-mapview"]||{}),t.bbox)){let[e,i,o,r]=t.bbox;s.push({x1:e,y1:i,x2:o,y2:r})}});let r=s.length&&eg.compositeBounds(s);H(this,"onRecommendMapView",{geoBounds:r,chart:t},function(){if(r&&this.recommendedMapView){if(!this.recommendedMapView.projection){let{x1:t,y1:e,x2:i,y2:o}=r;this.recommendedMapView.projection=i-t>180&&o-e>90?{name:"EqualEarth",parallels:[0,0],rotation:[0]}:{name:"LambertConformalConic",parallels:[e,o],rotation:[-(t+i)/2]}}this.recommendedMapView.insets||(this.recommendedMapView.insets=void 0)}}),this.geoMap=o[0],i&&t.hasRendered&&!t.userOptions.mapView?.projection&&this.recommendedMapView&&this.update(this.recommendedMapView)}redraw(t){this.chart.series.forEach(t=>{t.useMapGeometry&&(t.isDirty=!0)}),this.chart.redraw(t)}setView(t,e,i=!0,o){t&&(this.center=t),"number"==typeof e&&("number"==typeof this.minZoom&&(e=Math.max(e,this.minZoom)),"number"==typeof this.options.maxZoom&&(e=Math.min(e,this.options.maxZoom)),U(e)&&(this.zoom=e));let s=this.getProjectedBounds();if(s){let t=this.projection.forward(this.center),{x:e,y:i,width:o,height:r}=this.playingField,a=this.getScale(),n=this.projectedUnitsToPixels({x:s.x1,y:s.y1}),l=this.projectedUnitsToPixels({x:s.x2,y:s.y2}),h=[(s.x1+s.x2)/2,(s.y1+s.y2)/2];if(!this.chart.series.some(t=>t.isDrilling)){let s=n.x,p=l.y,d=l.x,c=n.y;d-s<o?t[0]=h[0]:s<e&&d<e+o?t[0]+=Math.max(s-e,d-o-e)/a:d>e+o&&s>e&&(t[0]+=Math.min(d-o-e,s-e)/a),c-p<r?t[1]=h[1]:p<i&&c<i+r?t[1]-=Math.max(p-i,c-r-i)/a:c>i+r&&p>i&&(t[1]-=Math.min(c-r-i,p-i)/a),this.center=this.projection.inverse(t)}this.insets.forEach(t=>{t.options.field&&(t.hitZone=t.getHitZone(),t.playingField=t.getField())}),this.render()}H(this,"afterSetView"),i&&this.redraw(o)}setUpEvents(){let t,e,i,{chart:o}=this,s=s=>{let{lastTouches:r,pinchDown:a}=o.pointer,n=this.projection,l=s.touches,{mouseDownX:h,mouseDownY:p}=o,d=0;if(a?.length===1?(h=a[0].chartX,p=a[0].chartY):a?.length===2&&(h=(a[0].chartX+a[1].chartX)/2,p=(a[0].chartY+a[1].chartY)/2),l?.length===2&&r&&(d=Math.log(Math.sqrt(Math.pow(r[0].chartX-r[1].chartX,2)+Math.pow(r[0].chartY-r[1].chartY,2))/Math.sqrt(Math.pow(l[0].chartX-l[1].chartX,2)+Math.pow(l[0].chartY-l[1].chartY,2)))/Math.log(.5)),U(h)&&U(p)){let r=`${h},${p}`,{chartX:a,chartY:c}=s.originalEvent;l?.length===2&&(a=(l[0].chartX+l[1].chartX)/2,c=(l[0].chartY+l[1].chartY)/2),r!==e&&(e=r,t=this.projection.forward(this.center),i=(this.projection.options.rotation||[0,0]).slice());let u=n.def&&n.def.bounds,m=u&&eu(u,this.playingField)||-1/0;if("Orthographic"===n.options.name&&2>(l?.length||0)&&(this.minZoom||1/0)<1.3*m){let t=440/(this.getScale()*Math.min(o.plotWidth,o.plotHeight));if(i){let e=(h-a)*t-i[0],s=R(-i[1]-(p-c)*t,-80,80),r=this.zoom;this.update({projection:{rotation:[-e,-s]}},!1),this.fitToBounds(void 0,void 0,!1),this.zoom=r,o.redraw(!1)}}else if(U(a)&&U(c)){let e=this.getScale(),i=this.projection.hasCoordinates?1:-1,o=this.projection.inverse([t[0]+(h-a)/e,t[1]-(p-c)/e*i]);isNaN(o[0]+o[1])||this.zoomBy(d,o,void 0,!1)}s.preventDefault()}};O(o,"pan",s),O(o,"touchpan",s),O(o,"selection",t=>{if(t.resetSelection)this.zoomBy();else{let e=t.x-o.plotLeft,i=t.y-o.plotTop,{y:s,x:r}=this.pixelsToProjectedUnits({x:e,y:i}),{y:a,x:n}=this.pixelsToProjectedUnits({x:e+t.width,y:i+t.height});this.fitToBounds({x1:r,y1:s,x2:n,y2:a},void 0,!0,!t.originalEvent.touches&&void 0),/^touch/.test(t.originalEvent.type)||o.showResetZoom(),t.preventDefault()}})}render(){let t=this.chart;this.group?this.groupClipRect&&this.groupClipRect.animate(t.plotBox):(this.groupClipRect=t.renderer.clipRect(t.plotBox),this.group=t.renderer.g("map-view").attr({zIndex:4}).clip(this.groupClipRect).add())}update(t,e=!0,i){let o=t.projection,s=o&&en.toString(o)!==en.toString(this.options.projection),r=!1;$(!0,this.userOptions,t),$(!0,this.options,t),"insets"in t&&(this.insets.forEach(t=>t.destroy()),this.insets.length=0,r=!0),(s||"fitToGeometry"in t)&&delete this.fitToGeometryCache,(s||r)&&(this.chart.series.forEach(t=>{let e=t.transformGroups;if(t.clearBounds&&t.clearBounds(),t.isDirty=!0,t.isDirtyData=!0,r&&e)for(;e.length>1;){let t=e.pop();t&&t.destroy()}}),s&&(this.projection=new en(this.options.projection)),r&&this.createInsets(),!t.center&&Object.hasOwnProperty.call(t,"zoom")&&!U(t.zoom)&&this.fitToBounds(void 0,void 0,!1)),t.center||U(t.zoom)?this.setView(this.options.center,t.zoom,!1):"fitToGeometry"in t&&this.fitToBounds(void 0,void 0,!1),e&&this.chart.redraw(i)}zoomBy(t,e,i,o){let s=this.chart,r=this.projection.forward(this.center);if("number"==typeof t){let a,n,l,h=this.zoom+t;if(i){let[t,e]=i,o=this.getScale(),a=t-s.plotLeft-s.plotWidth/2,h=e-s.plotTop-s.plotHeight/2;n=r[0]+a/o,l=r[1]+h/o}if("number"==typeof n&&"number"==typeof l){let t=1-Math.pow(2,this.zoom)/Math.pow(2,h),e=r[0]-n,i=r[1]-l;r[0]-=e*t,r[1]+=i*t,a=this.projection.inverse(r)}this.setView(e||a,h,void 0,o)}else this.fitToBounds(void 0,void 0,void 0,o)}}class ef extends eg{constructor(t,e){if(super(t.chart,e),this.id=e.id,this.mapView=t,this.options=$({center:[0,0]},t.options.insetOptions,e),this.allBounds=[],this.options.geoBounds){const e=t.projection.path(this.options.geoBounds);this.geoBoundsProjectedBox=ed(e),this.geoBoundsProjectedPolygon=e.map(t=>[t[1]||0,t[2]||0])}}getField(t=!0){let e=this.hitZone;if(e){let i=t?this.padding:[0,0,0,0],o=e.coordinates[0],s=o.map(t=>t[0])