let t;/**
 * 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
 */import*as e from"../highcharts.js";import"./coloraxis.js";var i,o,s,r,n,a,l,h,p={};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);let d=e.default;var c=p.n(d);let u={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}},{doc:m,win:g}=c();function f(t,e,i,o={}){let s="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(s,"hcEvents")||(s.hcEvents={});let r=s.hcEvents;c().Point&&t instanceof c().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let n=t.addEventListener;n&&n.call(t,e,i,!!c().supportsPassiveEvents&&{passive:void 0===o.passive?-1!==e.indexOf("touch"):o.passive,capture:!1}),r[e]||(r[e]=[]);let a={fn:i,order:"number"==typeof o.order?o.order:1/0};return r[e].push(a),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,E(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 b(t){let e=t.length,i=t[0];for(;e--;)t[e]<i&&(i=t[e]);return i}function y(t){let e=t.length,i=t[0];for(;e--;)t[e]>i&&(i=t[e]);return i}function x(t,e,i){return t>e?t<i?t:i:e}function M(t,e=0,i){let o=e%2/2,s=i?-1:1;return(Math.round(t*s-o)+o)*s}function v(t){return null!=t}function w(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function T(t,e,i,o){if(i=i||{},m?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==c())){let o=m.createEvent("Events");o.initEvent(e,!0,!0),i=w(o,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||w(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 P(t,e){let i=t.split(".");for(;i.length&&v(e);){let t=i.shift();if(void 0===t||"__proto__"===t)return;if("this"===t){let t;return z(e)&&(t=e["@this"]),t??e}let o=e[t.replace(/[\\'"]/g,"")];if(!v(o)||"function"==typeof o||"number"==typeof o.nodeType||o===g)return;e=o}return e}let j=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 L(t){v(t)&&clearTimeout(t)}function C(t){return z(t)&&"number"==typeof t.nodeType}function A(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function k(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function z(t,e){return!!t&&"object"==typeof t&&(!e||!k(t))}function B(t,...e){let i,o=[t,...e],s={},r=function(t,e){return"object"!=typeof t&&(t={}),E(e,function(i,o){if("__proto__"!==o&&"constructor"!==o){let s;!z(i,!0)||(s=i?.constructor,z(i,!0)&&!C(i)&&s?.name&&"Object"!==s.name)||C(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 n=o.length;for(i=0;i<n;i++)s=r(s,o[i]);return s}function E(t,e,i){for(let o in t)Object.hasOwnProperty.call(t,o)&&e.call(i||t[o],t[o],o,t)}function O(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}function S(t,e){return 0>t.indexOf(e)&&!!t.push(e)}function D(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)}function I(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)))}}!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=v((t=this.normalize(t)).wheelDelta)&&-t.wheelDelta/120||t.deltaY||t.detail;Math.abs(s)>=1&&(i+=Math.abs(s),e&&L(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&&w(e,t)}return e}function n(t){let e=this.chart.options.mapNavigation;e&&O(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||(w(e,{onContainerDblClick:o,onContainerMouseWheel:s}),I(e,"normalize",r),I(e,"zoomOption",n))}}(r||(r={}));let V=r;function X(e,i,o,s,r){if(r){let t=r?.r||0;r.brBoxY=i-t,r.brBoxHeight=s+t}return t.roundedRect(e,i,o,s,r)}function N(e,i,o,s,r){if(r){let t=r?.r||0;r.brBoxHeight=s+t}return t.roundedRect(e,i,o,s,r)}let R=function(e){(t=e.prototype.symbols).bottombutton=X,t.topbutton=N},{setOptions:G}=c(),{composed:F}=c();function Y(t){t&&(t.preventDefault?.(),t.stopPropagation?.(),t.cancelBubble=!0)}class Z{static compose(t,e,i){V.compose(e),R(i),S(F,"Map.Navigation")&&(f(t,"beforeRender",function(){this.mapNavigation=new Z(this),this.mapNavigation.update()}),G(u))}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),Y(t)},r=i.options.mapNavigation;for(t&&(r=i.options.mapNavigation=B(i.options.mapNavigation,t));o.length;)o.pop()?.destroy();!i.renderer.forExport&&O(r.enableButtons,r.enabled)&&(e.navButtonsGroup||(e.navButtonsGroup=i.renderer.g().attr({zIndex:7}).add()),E(r.buttons,(t,n)=>{let a={padding:(t=B(r.buttonOptions,t)).padding};!i.styledMode&&t.theme&&(w(a,t.theme),a.style=B(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,a,void 0,void 0,void 0,"zoomIn"===n?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+({zoomIn:"zoom-in",zoomOut:"zoom-out"})[n]).attr({width:h,height:p,title:i.options.lang[n],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,f(c.element,"dblclick",Y),o.push(c),w(t,{width:c.width,height:2*(c.height||0)}),i.hasLoaded)c.align(t,!1,t.alignTo);else{let e=f(i,"load",()=>{c.element&&c.align(t,!1,t.alignTo),e()})}}),i.hasLoaded||f(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,n=r.buttonOptions&&r.buttonOptions.verticalAlign;e.navButtonsGroup.attr({translateY:"bottom"===n?o:s})}}})),this.updateEvents(r)}updateEvents(t){let e=this.chart;O(t.enableDoubleClickZoom,t.enabled)||t.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||f(e.container,"dblclick",function(t){e.pointer.onContainerDblClick(t)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()),O(t.enableMouseWheelZoom,t.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||f(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&&Y(t)}return!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())}}let W=e.default.SeriesRegistry;var U=p.n(W);let _=e.default.SVGElement;var H=p.n(_);let{column:{prototype:$}}=U().seriesTypes;var q=n||(n={});function K(t){let e=this.series,i=e.chart.renderer;this.moveToTopOnHover&&this.graphic&&(e.stateMarkerGraphic||(e.stateMarkerGraphic=new(H())(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:""}))}q.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))}},q.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(t){let e={};return v(t.color)&&(!t.state||"normal"===t.state)&&(e[this.colorProp||"fill"]=t.color),e},pointAttribs:$.pointAttribs},q.compose=function(t){return f(t.prototype.pointClass,"afterSetState",K),t};let J=n,Q=e.default.Series;var tt=p.n(Q);let{deg2rad:te}=c();(i=a||(a={})).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,n=Math.min(o,s),a=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=[O(r?.[0],"50%"),O(r?.[1],"50%"),O(h&&h<0?void 0:t.size,"100%"),O(p&&p<0?void 0:t.innerSize||0,"0%")];for(!e.angular||this instanceof tt()||(u[3]=0),d=0;d<4;++d)c=u[d],l=d<2||2===d&&/%$/.test(c),u[d]=D(c,[o,s,n,u[2]][d])+(l?i:0);return u[3]>u[2]&&(u[3]=u[2]),A(a)&&2*a<u[2]&&a>0&&(u[3]=u[2]-2*a),T(this,"afterGetCenter",{positions:u}),u},i.getStartAndEndRadians=function(t,e){let i=A(t)?t:0,o=A(e)&&e>i&&e-i<360?e:i+360;return{start:te*(i+-90),end:te*(o+-90)}};let ti=a,to=e.default.Chart;var ts=p.n(to);let tr=e.default.SVGRenderer;var tn=p.n(tr);let{getOptions:ta}=c();class tl extends ts(){init(t,e){let i=ta().credits,o=B({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:O(i.mapText,' \xa9 <a href="{geojson.copyrightUrl}">{geojson.copyrightShort}</a>'),mapTextFull:O(i.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},t);super.init(o,e)}mapZoom(t,e,i,o,s){this.mapView&&(A(t)&&(t=Math.log(t)/Math.log(.5)),this.mapView.zoomBy(t,A(e)&&A(i)?this.mapView.projection.inverse([e,i]):void 0,A(o)&&A(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)}}(o=tl||(tl={})).maps={},o.mapChart=function(t,e,i){return new o(t,e,i)},o.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,tn().prototype.pathToSegments(e)};let th=tl,tp={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 n=t[t.length-2],a=t[t.length-1];"number"==typeof n&&"number"==typeof a&&(i=Math.min(i,n),e=Math.max(e,n),s=Math.min(s,a),o=Math.max(o,a),r=!0)}),r)return{x1:i,y1:s,x2:e,y2:o}}},{boundsFromPath:td}=tp,tc=U().seriesTypes.scatter.prototype.pointClass;class tu extends tc{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?w(o,{...r,name:o.name??r.name}):-1!==i.pointArrayMap.indexOf("value")&&(o.value=o.value||null)}return o}getProjectedBounds(t){let e=td(tu.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&&A(s)&&A(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)*O(this.middleX,A(t)?t:.5);let s=O(this.middleY,A(o)?o:.5);this.geometry||(s=1-s),e.midY=e.y2-(e.y2-e.y1)*s}return e}}onMouseOver(t){L(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=A(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}),n=i.pixelsToProjectedUnits({x:e.x,y:e.y});o={x1:r.x,y1:r.y,x2:n.x,y2:n.y}}i.fitToBounds(o,void 0,!1),this.series.isDirty=!0,e.redraw(t)}}}w(tu.prototype,{dataLabelOnNull:J.pointMembers.dataLabelOnNull,moveToTopOnHover:J.pointMembers.moveToTopOnHover,isValid:J.pointMembers.isValid});let tm={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"}},tg=e.default.Templating;var tf=p.n(tg);let{win:tb}=c(),{format:ty}=tf();!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||tb.proj4;if(!i)return void(0,d.error)(21,!1,this);let{jsonmarginX:o=0,jsonmarginY:s=0,jsonres:r=1,scale:n=1,xoffset:a=0,xpan:l=0,yoffset:h=0,ypan:p=0}=e,c=i(e.crs,[t.lon,t.lat]),u=e.cosAngle||e.rotation&&Math.cos(e.rotation),m=e.sinAngle||e.rotation&&Math.sin(e.rotation),g=e.rotation?[c[0]*u+c[1]*m,-c[0]*m+c[1]*u]:c;return{x:((g[0]-a)*n+l)*r+o,y:-(((h-g[1])*n+p)*r-s)}}function s(t,e){let i=this.options.chart.proj4||tb.proj4;if(!i)return void(0,d.error)(21,!1,this);if(null===t.y)return;let{jsonmarginX:o=0,jsonmarginY:s=0,jsonres:r=1,scale:n=1,xoffset:a=0,xpan:l=0,yoffset:h=0,ypan:p=0}=e,c={x:((t.x-o)/r-l)/n+a,y:((t.y-s)/r+p)/n+h},u=e.cosAngle||e.rotation&&Math.cos(e.rotation),m=e.sinAngle||e.rotation&&Math.sin(e.rotation),g=i(e.crs,"WGS84",e.rotation?{x:c.x*u+-(c.y*m),y:c.x*m+c.y*u}:c);return{lat:g.y,lon:g.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:n,translate:a}=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])*n[0]+a[0],(s+=l[t][1])*n[1]+a[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,n=[];for(let t=0,e=r.length;t<e;++t)n.push({type:"Feature",properties:r[t].properties,geometry:{type:r[t].type,coordinates:r[t].coordinates||s(r[t].arcs)}});let a={type:"FeatureCollection",copyright:t.copyright,copyrightShort:t.copyrightShort,copyrightUrl:t.copyrightUrl,features:n,"hc-recommended-mapview":i["hc-recommended-mapview"],bbox:t.bbox,title:t.title};return i["hc-decoded-geojson"]=a,a}function n(t,e){e=B(!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,I(r,"addCredits",n))},t.geojson=function(t,e="map",i){let o=[],s="Topology"===t.type?r(t):t,n=s.features;for(let t=0,i=n.length;t<i;++t){let i,s=n[t],r=s.geometry||{},a=r.type,l=r.coordinates,h=s.properties;if(("map"===e||"mapbubble"===e)&&("Polygon"===a||"MultiPolygon"===a)||"mapline"===e&&("LineString"===a||"MultiLineString"===a)?l.length&&(i={geometry:{coordinates:l,type:a}}):"mappoint"===e&&"Point"===a&&l.length&&(i={geometry:{coordinates:l,type:a}}),i){let t=h&&(h.name||h.NAME),e=h&&h.lon,s=h&&h.lat;o.push(w(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=ty(i.chart.options.credits?.mapText,{geojson:s}),i.chart.mapCreditsFull=ty(i.chart.options.credits?.mapTextFull,{geojson:s})),o},t.topo2geo=r}(l||(l={}));let tx=l;(s=h||(h={})).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}},s.getDistanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},s.getAngleBetweenPoints=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)},s.pointInPolygon=function({x:t,y:e},i){let o=i.length,s,r,n=!1;for(s=0,r=o-1;s<o;r=s++){let[o,a]=i[s],[l,h]=i[r];a>e!=h>e&&t<(l-o)*(e-a)/(h-a)+o&&(n=!n)}return n};let tM=h;function tv(t,e,i=!0){let o=e[e.length-1],s,r,n,a=t;for(let t=0;t<e.length;t++){let l=a;s=e[t],a=[],r=i?l[l.length-1]:l[0];for(let t=0;t<l.length;t++)tw(o,s,n=l[t])?(tw(o,s,r)||a.push(tT(o,s,r,n)),a.push(n)):tw(o,s,r)&&a.push(tT(o,s,r,n)),r=n;o=s}return a}function tw(t,e,i){return(e[0]-t[0])*(i[1]-t[1])>(e[1]-t[1])*(i[0]-t[0])}function tT(t,e,i,o){let s=[t[0]-e[0],t[1]-e[1]],r=[i[0]-o[0],i[1]-o[1]],n=t[0]*e[1]-t[1]*e[0],a=i[0]*o[1]-i[1]*o[0],l=1/(s[0]*r[1]-s[1]*r[0]),h=[(n*r[0]-a*s[0])*l,(n*r[1]-a*s[1])*l];return h.isIntersection=!0,h}let tP=Math.sign||(t=>0===t?0:t>0?1:-1),tj=Math.PI/180,tL=Math.PI/2,tC=t=>Math.tan((tL+t)/2),tA=class{constructor(t){let e=(t.parallels||[]).map(t=>t*tj),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(tC(o)/tC(i));1e-10>Math.abs(r)&&(r=1e-10*(tP(r)||1)),this.n=r,this.c=s*Math.pow(tC(i),r)/r}forward(t){let{c:e,n:i,projectedBounds:o}=this,s=t[0]*tj,r=t[1]*tj;e>0?r<-tL+1e-6&&(r=-tL+1e-6):r>tL-1e-6&&(r=tL-1e-6);let n=e/Math.pow(tC(r),i),a=n*Math.sin(i*s)*63.78137,l=(e-n*Math.cos(i*s))*63.78137,h=[a,l];return o&&(a<o.x1||a>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=tP(i)*Math.sqrt(o*o+s*s),n=Math.atan2(o,Math.abs(s))*tP(s);return s*i<0&&(n-=Math.PI*tP(o)*tP(s)),[n/i/tj,(2*Math.atan(Math.pow(e/r,1/i))-tL)/tj]}},tk=Math.sqrt(3)/2,tz=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(tk*Math.sin(t[1]*e)),o=i*i,s=o*o*o;return[t[0]*e*Math.cos(i)*74.03120656864502/(tk*(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,n,a,l;for(let t=0;t<12&&(n=(r=s*s)*r*r,a=s*(1.340264+-.081106*r+n*(893e-6+.003796*r))-i,s-=l=a/(1.340264+-.24331799999999998*r+n*(.0062510000000000005+.034164*r)),!(1e-9>Math.abs(l)));++t);n=(r=s*s)*r*r;let h=o*tk*e*(1.340264+-.24331799999999998*r+n*(.0062510000000000005+.034164*r))/Math.cos(s),p=o*Math.asin(Math.sin(s)/tk);return Math.abs(h)>180?[NaN,NaN]:[h,p]}},tB=Math.PI/4,tE=Math.PI/180,tO=class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}forward(t){return[t[0]*tE*63.78137,79.7267125*Math.log(Math.tan(tB+.4*t[1]*tE))]}inverse(t){return[t[0]/63.78137/tE,2.5*(Math.atan(Math.exp(.8*(t[1]/63.78137)))-tB)/tE]}},tS=Math.PI/180,tD=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]*tS,o=[Math.cos(i)*Math.sin(e*tS)*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))/tS,Math.asin(o&&i*r/o)/tS]}},tI=Math.PI/180,tV=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]*tI),i=[63.78137*t[0]*tI,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*tI),(2*Math.atan(Math.exp(t[1]/63.78137))-Math.PI/2)/tI]}},{clipLineString:tX,clipPolygon:tN}={clipLineString:function(t,e){let i=[],o=tv(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:tv},tR=2*Math.PI/360,tG=t=>(t<-180&&(t+=360),t>180&&(t-=360),t),tF=t=>(1-Math.cos(t))/2;class tY{static add(t,e){tY.registry[t]=e}static distance(t,e){let i,o,s,r,n,{atan2:a,sqrt:l}=Math,h=(i=Math.cos,o=t[1]*tR,s=t[0]*tR,r=e[1]*tR,n=e[0]*tR,tF(r-o)+i(o)*i(r)*tF(n-s));return 6371e3*(2*a(l(h),l(1-h)))}static geodesic(t,e,i,o=5e5){let{atan2:s,cos:r,sin:n,sqrt:a}=Math,l=tY.distance,h=t[1]*tR,p=t[0]*tR,d=e[1]*tR,c=e[0]*tR,u=r(h)*r(p),m=r(d)*r(c),g=r(h)*n(p),f=r(d)*n(c),b=n(h),y=n(d),x=l(t,e),M=x/6371e3,v=n(M),w=Math.round(x/o),T=[];if(i&&T.push(t),w>1){let t=1/w;for(let e=t;e<.999;e+=t){let t=n((1-e)*M)/v,i=n(e*M)/v,o=t*u+i*m,r=t*g+i*f,l=s(t*b+i*y,a(o*o+r*r)),h=s(r,o);T.push([h/tR,l/tR])}}return i&&T.push(e),T}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=tY.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;let{name:e,projectedBounds:i,rotation:o}=t;this.rotator=o?this.getRotator(o):void 0;let s=e?tY.registry[e]:void 0;s&&(this.def=new s(t));let{def:r,rotator:n}=this;r&&(this.maxLatitude=r.maxLatitude||90,this.hasGeoProjection=!0),n&&r?(this.forward=t=>r.forward(n.forward(t)),this.inverse=t=>n.inverse(r.inverse(t))):r?(this.forward=t=>r.forward(t),this.inverse=t=>r.inverse(t)):n&&(this.forward=n.forward,this.inverse=n.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]),n=o[r]+t*(s[r]-o[r]);return e?[n,i]:[i,n]}},n,a=t[0];return(n=r(t,0,e))?(a=n,t[1]=n):(n=r(t,0,i))&&(a=n,t[1]=n),(n=r(t,1,o))?a=n:(n=r(t,1,s))&&(a=n),a}getRotator(t){let e=t[0]*tR,i=(t[1]||0)*tR,o=(t[2]||0)*tR,s=Math.cos(i),r=Math.sin(i),n=Math.cos(o),a=Math.sin(o);if(0!==e||0!==i||0!==o)return{forward:t=>{let i=t[0]*tR+e,o=t[1]*tR,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*n-c*a,h*s-d*r)/tR,Math.asin(c*n+p*a)/tR]},inverse:t=>{let i=t[0]*tR,o=t[1]*tR,l=Math.cos(o),h=Math.cos(i)*l,p=Math.sin(i)*l,d=Math.sin(o),c=d*n-p*a;return[(Math.atan2(p*n+d*a,h*s+c*r)-e)/tR,Math.asin(c*s-h*r)/tR]}}}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 n=r[0],a=s[0];if((n<-90||n>90)&&(a<-90||a>90)&&n>0!=a>0){let t=x((180-(n+360)%360)/((a+360)%360-(n+360)%360),0,1),e=r[1]+t*(s[1]-r[1]);o.push({i,lat:e,direction:n<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=tG(180+1e-6*o[e].direction),n=tG(180-1e-6*o[e].direction),a=t.splice(i,o[e+1].i-i,...tY.geodesic([r,o[e].lat],[r,o[e+1].lat],!0));a.push(...tY.geodesic([n,o[e+1].lat],[n,o[e].lat],!0)),s.push(a),e-=2}if(i)for(let t=0;t<s.length;t++){let{direction:e,lat:o}=i,r=s[t],n=r.indexOf(i.lonLat);if(n>-1){let t=(o<0?-1:1)*this.maxLatitude,s=tG(180+1e-6*e),a=tG(180-1e-6*e),l=tY.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(...tY.geodesic([a,t],[a,i.lat],!0)),r.splice(n,0,...l);break}}}else{let e=o.length;for(;e--;){let i=o[e].i,r=t.splice(i,t.length,[tG(180+1e-6*o[e].direction),o[e].lat]);r.unshift([tG(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=[],n="Polygon"===t.type||"MultiPolygon"===t.type,a=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];a&&(tY.insertGeodesics(o),l&&(s=this.cutOnAntimeridian(o,n))),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(n&&g.push(g[0]),u){if(!m)return;if(e){if(n)g=tN(g,e);else if(i)return void tX(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:(n&&!o&&(o=i,t.push(i),g.push(r)),d&&s&&(n&&a?tY.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}}tY.registry={EqualEarth:tz,LambertConformalConic:tA,Miller:tO,Orthographic:tD,WebMercator:tV};let{composed:tZ}=c(),{pointInPolygon:tW}=tM,{topo2geo:tU}=tx,{boundsFromPath:t_}=tp,tH={};function t$(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 tq(t){t.seriesOptions.mapData&&this.mapView?.recommendMapView(this,[this.options.chart.map,t.seriesOptions.mapData],this.options.drilldown?.mapZooming)}class tK{static compose(t){S(tZ,"MapView")&&(tH=t.maps,f(t,"afterInit",function(){this.mapView=new tK(this,this.options.mapView)},{order:0}),f(t,"addSeriesAsDrilldown",tq),f(t,"afterDrillUp",tq))}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),B(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=B(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 tJ||this.recommendMapView(t,[t.options.chart.map,...(t.options.series||[]).map(t=>t.mapData)]),this.userOptions=e||{};let i=B(tm,this.recommendedMapView,e),o=this.recommendedMapView?.insets,s=e&&e.insets;o&&s&&(i.insets=tK.mergeInsets(o,s)),this.chart=t,this.center=i.center,this.options=i,this.projection=new tY(i.projection),this.playingField=t.plotBox,this.zoom=i.zoom||0,this.minZoom=i.minZoom,this.createInsets(),this.eventsToUnbind.push(f(t,"afterSetChartSize",()=>{this.playingField=this.getField(),(void 0===this.minZoom||this.minZoom===this.zoom)&&(this.fitToBounds(void 0,void 0,!1),!this.chart.hasRendered&&A(this.userOptions.zoom)&&(this.zoom=this.userOptions.zoom),this.userOptions.center&&B(!0,this.center,this.userOptions.center))})),this.setUpEvents()}createInsets(){let t=this.options,e=t.insets;e&&e.forEach(e=>{let i=new tJ(this,B(t.insetOptions,e));this.insets.push(i)})}fitToBounds(t,e,i=!0,o){let s=t||this.getProjectedBounds();if(s){let r=O(e,t?0:this.options.padding),n=this.getField(!1),a=k(r)?r:[r,r,r,r];this.padding=[D(a[0],n.height),D(a[1],n.width),D(a[2],n.height),D(a[3],n.width)],this.playingField=this.getField();let l=t$(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 tH[t]&&"Topology"===tH[t].type?tU(tH[t]):tH[t];if(z(t,!0)){if("FeatureCollection"===t.type)return t;if("Topology"===t.type)return tU(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=t_(t.path(i));return this.fitToGeometryCache}return this.projection.bounds||tK.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,n=this.getScale(),a=n*r,l=t+i/2-s[0]*n,h=e+o/2-s[1]*a;return{scaleX:n,scaleY:a,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&&tW(s,i[o].hitZone.coordinates[0]))return s}return e.transformFromLatLon(t,i.default)}for(let e of this.insets)if(e.options.geoBounds&&tW({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,n=r.x+r.width/2,a=r.y+r.height/2;return{x:s[0]+(e-n)/o,y:s[1]-(i-a)/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&&tW(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&&tW(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&&tK.compositeBounds(s);T(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)),A(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,n=this.getScale(),a=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=a.x,p=l.y,d=l.x,c=a.y;d-s<o?t[0]=h[0]:s<e&&d<e+o?t[0]+=Math.max(s-e,d-o-e)/n:d>e+o&&s>e&&(t[0]+=Math.min(d-o-e,s-e)/n),c-p<r?t[1]=h[1]:p<i&&c<i+r?t[1]-=Math.max(p-i,c-r-i)/n:c>i+r&&p>i&&(t[1]-=Math.min(c-r-i,p-i)/n),this.center=this.projection.inverse(t)}this.insets.forEach(t=>{t.options.field&&(t.hitZone=t.getHitZone(),t.playingField=t.getField())}),this.render()}T(this,"afterSetView"),i&&this.redraw(o)}setUpEvents(){let t,e,i,{chart:o}=this,s=s=>{let{lastTouches:r,pinchDown:n}=o.pointer,a=this.projection,l=s.touches,{mouseDownX:h,mouseDownY:p}=o,d=0;if(n?.length===1?(h=n[0].chartX,p=n[0].chartY):n?.length===2&&(h=(n[0].chartX+n[1].chartX)/2,p=(n[0].chartY+n[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)),A(h)&&A(p)){let r=`${h},${p}`,{chartX:n,chartY:c}=s.originalEvent;l?.length===2&&(n=(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=a.def&&a.def.bounds,m=u&&t$(u,this.playingField)||-1/0;if("Orthographic"===a.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-n)*t-i[0],s=x(-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(A(n)&&A(c)){let e=this.getScale(),i=this.projection.hasCoordinates?1:-1,o=this.projection.inverse([t[0]+(h-n)/e,t[1]-(p-c)/e*i]);isNaN(o[0]+o[1])||this.zoomBy(d,o,void 0,!1)}s.preventDefault()}};f(o,"pan",s),f(o,"touchpan",s),f(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:n,x:a}=this.pixelsToProjectedUnits({x:e+t.width,y:i+t.height});this.fitToBounds({x1:r,y1:s,x2:a,y2:n},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&&tY.toString(o)!==tY.toString(this.options.projection),r=!1;B(!0,this.userOptions,t),B(!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 tY(this.options.projection)),r&&this.createInsets(),!t.center&&Object.hasOwnProperty.call(t,"zoom")&&!A(t.zoom)&&this.fitToBounds(void 0,void 0,!1)),t.center||A(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 n,a,l,h=this.zoom+t;if(i){let[t,e]=i,o=this.getScale(),n=t-s.plotLeft-s.plotWidth/2,h=e-s.plotTop-s.plotHeight/2;a=r[0]+n/o,l=r[1]+h/o}if("number"==typeof a&&"number"==typeof l){let t=1-Math.pow(2,this.zoom)/Math.pow(2,h),e=r[0]-a,i=r[1]-l;r[0]-=e*t,r[1]+=i*t,n=this.projection.inverse(r)}this.setView(e||n,h,void 0,o)}else this.fitToBounds(void 0,void 0,void 0,o)}}class tJ extends tK{constructor(t,e){if(super(t.chart,e),this.id=e.id,this.mapView=t,this.options=B({center:[0,0]},t.options.insetOptions,e),this.allBounds=[],this.options.geoBounds){let e=t.projection.path(this.options.geoBounds);this.geoBoundsProjectedBox=t_(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]),r=o.map(t=>t[1]),n=Math.min.apply(0,s)+i[3],a=Math.max.apply(0,s)-i[1],l=Math.min.apply(0,r)+i[0],h=Math.max.apply(0,r)-i[2];if(A(n)&&A(l))return{x:n,y:l,width:a-n,height:h-l}}return super.getField.call(this,t)}getHitZone(){let{chart:t,mapView:e,options:i}=this,{coordinates:o}=i.field||{};if(o){let s=o[0];if("percent"===i.units){let o="mapBoundingBox"===i.relativeTo&&e.getMapBBox()||B(t.plotBox,{x:0,y:0});s=s.map(t=>[D(`${t[0]}%`,o.width,o.x),D(`${t[1]}%`,o.height,o.y)])}return{type:"Polygon",coordinates:[s]}}}getProjectedBounds(){return tK.compositeBounds(this.allBounds)}isInside(t){let{geoBoundsProjectedBox:e,geoBoundsProjectedPolygon:i}=this;return!!(e&&t.x>=e.x1&&t.x<=e.x2&&t.y>=e.y1&&t.y<=e.y2&&i&&tW(t,i))}render(){let{chart:t,mapView:e,options:i}=this,o=i.borderPath||i.field;if(o&&e.group){let s=!0;this.border||(this.border=t.renderer.path().addClass("highcharts-mapview-inset-border").add(e.group),s=!1),t.styledMode||this.border.attr({stroke:i.borderColor,"stroke-width":i.borderWidth});let r=this.border.strokeWidth(),n="mapBoundingBox"===i.relativeTo&&e.getMapBBox()||e.playingField,a=(o.coordinates||[]).reduce((e,o)=>o.reduce((e,o,s)=>{let[a,l]=o;return"percent"===i.units&&(a=t.plotLeft+D(`${a}%`,n.width,n.x),l=t.plotTop+D(`${l}%`,n.height,n.y)),a=M(a,r),l=M(l,r),e.push(0===s?["M",a,l]:["L",a,l]),e},e),[]);this.border[s?"animate":"attr"]({d:a})}}destroy(){this.border&&(this.border=this.border.destroy()),this.eventsToUnbind.forEach(t=>t())}setUpEvents(){}}let{animObject:tQ,stop:t0}=c(),{noop:t1}=c(),{splitPath:t2}=th,{column:t6,scatter:t3}=U().seriesTypes;class t8 extends t3{constructor(){super(...arguments),this.processedData=[]}animate(t){let{chart:e,group:i}=this,o=tQ(this.options.animation);t?i.attr({translateX:e.plotLeft+e.plotWidth/2,translateY:e.plotTop+e.plotHeight/2,scaleX:.001,scaleY:.001}):i.animate({translateX:e.plotLeft,translateY:e.plotTop,scaleX:1,scaleY:1},o)}clearBounds(){this.points.forEach(t=>{delete t.bounds,delete t.insetIndex,delete t.projectedPath}),delete this.bounds}doFullTranslate(){return!!(this.isDirtyData||this.chart.isResizing||!this.hasRendered)}drawMapDataLabels(){super.drawDataLabels(),this.dataLabelsGroups?.forEach(t=>t?.clip(this.chart.clipRect))}drawPoints(){let t=this,{chart:e,group:i,transformGroups:o=[]}=this,{mapView:s,renderer:r}=e;if(s){this.transformGroups=o,o[0]||(o[0]=r.g().add(i));for(let t=0,e=s.insets.length;t<e;++t)o[t+1]||o.push(r.g().add(i));this.doFullTranslate()&&(this.points.forEach(t=>{let{graphic:e}=t;t.group=o["number"==typeof t.insetIndex?t.insetIndex+1:0],e&&e.parentGroup!==t.group&&e.add(t.group)}),t6.prototype.drawPoints.apply(this),this.points.forEach(i=>{let o=i.graphic;if(o){let s=o.animate,r="";i.name&&(r+="highcharts-name-"+i.name.replace(/ /g,"-").toLowerCase()),i.properties?.["hc-key"]&&(r+=" highcharts-key-"+i.properties["hc-key"].toString().toLowerCase()),r&&o.addClass(r),e.styledMode&&o.css(this.pointAttribs(i,i.selected&&"select"||void 0)),o.attr({visibility:!i.visible&&(i.visible||i.isNull)?"hidden":"inherit"}),o.animate=function(i,r,n){let a=A(i["stroke-width"])&&!A(o["stroke-width"]),l=A(o["stroke-width"])&&!A(i["stroke-width"]);if(a||l){let s=O(t.getStrokeWidth(t.options),1)/(e.mapView?.getScale()||1);a&&(o["stroke-width"]=s),l&&(i["stroke-width"]=s)}return s.call(o,i,r,l?function(){o.element.removeAttribute("stroke-width"),delete o["stroke-width"],n&&n.apply(this,arguments)}:n)}}})),o.forEach((i,o)=>{let n=(0===o?s:s.insets[o-1]).getSVGTransform(),a=O(this.getStrokeWidth(this.options),1),l=n.scaleX,h=n.scaleY>0?1:-1,p=e=>{(t.points||[]).forEach(t=>{let i,o=t.graphic;o?.["stroke-width"]&&(i=this.getStrokeWidth(t.options))&&o.attr({"stroke-width":i/e})})};if(r.globalAnimation&&e.hasRendered&&s.allowTransformAnimation){let t=Number(i.attr("translateX")),e=Number(i.attr("translateY")),o=Number(i.attr("scaleX")),s=(s,r)=>{let d=o+(l-o)*r.pos;i.attr({translateX:t+(n.translateX-t)*r.pos,translateY:e+(n.translateY-e)*r.pos,scaleX:d,scaleY:d*h,"stroke-width":a/d}),p(d)},d=B(tQ(r.globalAnimation)),c=d.step;d.step=function(){c&&c.apply(this,arguments),s.apply(this,arguments)},i.attr({animator:0}).animate({animator:1},d,(function(){"boolean"!=typeof r.globalAnimation&&r.globalAnimation.complete&&r.globalAnimation.complete({applyDrilldown:!0}),T(this,"mapZoomComplete")}).bind(this))}else t0(i),i.attr(B(n,{"stroke-width":a/l})),p(l)}),this.isDrilling||this.drawMapDataLabels()}}getProjectedBounds(){if(!this.bounds&&this.chart.mapView){let{insets:t,projection:e}=this.chart.mapView,i=[];(this.points||[]).forEach(o=>{if(o.path||o.geometry){if("string"==typeof o.path?o.path=t2(o.path):k(o.path)&&"M"===o.path[0]&&(o.path=this.chart.renderer.pathToSegments(o.path)),!o.bounds){let i=o.getProjectedBounds(e);if(i){o.labelrank=O(o.labelrank,(i.x2-i.x1)*(i.y2-i.y1));let{midX:e,midY:s}=i;if(t&&A(e)&&A(s)){let r=j(t,t=>t.isInside({x:e,y:s}));r&&(delete o.projectedPath,(i=o.getProjectedBounds(r.projection))&&r.allBounds.push(i),o.insetIndex=t.indexOf(r))}o.bounds=i}}o.bounds&&void 0===o.insetIndex&&i.push(o.bounds)}}),this.bounds=tK.compositeBounds(i)}return this.bounds}getStrokeWidth(t){let e=this.pointAttrToOptions;return t[e?.["stroke-width"]||"borderWidth"]}hasData(){return!!this.dataTable.rowCount}pointAttribs(t,e){let{mapView:i,styledMode:o}=t.series.chart,s=o?this.colorAttribs(t):t6.prototype.pointAttribs.call(this,t,e),r=this.getStrokeWidth(t.options);if(e){let i=B(this.options.states?.[e],t.options.states?.[e]||{}),o=this.getStrokeWidth(i);v(o)&&(r=o),s.stroke=i.borderColor??t.color}r&&i&&(r/=i.getScale());let n=this.getStrokeWidth(this.options);return s.dashstyle&&i&&A(n)&&(r=n/i.getScale()),t.visible||(s.fill=this.options.nullColor),t.isNull&&this.options.nullInteraction&&(s.opacity=1),v(r)?s["stroke-width"]=r:delete s["stroke-width"],s["stroke-linecap"]=s["stroke-linejoin"]=this.options.linecap,s}updateData(){return!this.processedData&&super.updateData.apply(this,arguments)}setData(t,e=!0,i,o){delete this.bounds,super.setData(t,!1,void 0,o),this.processData(),this.generatePoints(),e&&this.chart.redraw(i)}dataColumnKeys(){return this.pointArrayMap}processData(){let t,e,i,o=this.options,s=o.data,r=this.chart,n=r.options.chart,a=this.joinBy,l=o.keys||this.pointArrayMap,h=[],p={},d=this.chart.mapView,u=d&&(z(o.mapData,!0)?d.getGeoMap(o.mapData):d.geoMap),m=r.mapTransforms=n.mapTransforms||u?.["hc-transform"]||r.mapTransforms;m&&E(m,t=>{t.rotation&&(t.cosAngle=Math.cos(t.rotation),t.sinAngle=Math.sin(t.rotation))}),k(o.mapData)?i=o.mapData:u&&"FeatureCollection"===u.type&&(this.mapTitle=u.title,i=c().geojson(u,this.type,this)),this.processedData=[];let g=this.processedData;if(s){let t;for(let e=0,i=s.length;e<i;++e){if(A(t=s[e]))g[e]={value:t};else if(k(t)){let i=0;g[e]={},!o.keys&&t.length>l.length&&"string"==typeof t[0]&&(g[e]["hc-key"]=t[0],++i);for(let o=0;o<l.length;++o,++i)l[o]&&void 0!==t[i]&&(l[o].indexOf(".")>0?tu.prototype.setNestedProperty(g[e],t[i],l[o]):g[e][l[o]]=t[i])}else g[e]=s[e];a&&"_i"===a[0]&&(g[e]._i=e)}}if(i){this.mapData=i,this.mapMap={};for(let o=0;o<i.length;o++)e=(t=i[o]).properties,t._i=o,a[0]&&e&&e[a[0]]&&(t[a[0]]=e[a[0]]),p[t[a[0]]]=t;if(this.mapMap=p,a[1]){let t=a[1];g.forEach(e=>{let i=P(t,e);p[i]&&h.push(p[i])})}if(o.allAreas){if(a[1]){let t=a[1];g.forEach(e=>{h.push(P(t,e))})}let t="|"+h.map(function(t){return t&&t[a[0]]}).join("|")+"|";i.forEach(e=>{a[0]&&-1!==t.indexOf("|"+e[a[0]]+"|")||g.push(B(e,{value:null}))})}}this.dataTable.rowCount=g.length}setOptions(t){let e=super.setOptions(t),i=e.joinBy;if(null===e.joinBy&&(i="_i"),i){var o;this.joinBy=k(o=i)?o:[o],this.joinBy[1]||(this.joinBy[1]=this.joinBy[0])}return e}translate(){let t=this.doFullTranslate(),e=this.chart.mapView,i=e?.projection;if(this.chart.hasRendered&&(this.isDirtyData||!this.hasRendered)&&(this.processData(),this.generatePoints(),delete this.bounds,!e||e.userOptions.center||A(e.userOptions.zoom)||e.zoom!==e.minZoom?this.getProjectedBounds():e.fitToBounds(void 0,void 0,!1)),e){let o=e.getSVGTransform();this.points.forEach(s=>{let r=A(s.insetIndex)&&e.insets[s.insetIndex].getSVGTransform()||o;r&&s.bounds&&A(s.bounds.midX)&&A(s.bounds.midY)&&(s.plotX=s.bounds.midX*r.scaleX+r.translateX,s.plotY=s.bounds.midY*r.scaleY+r.translateY),t&&(s.shapeType="path",s.shapeArgs={d:tu.getProjectedPath(s,i)}),!s.hiddenInDataClass&&(s.projectedPath&&!s.projectedPath.length?s.setVisible(!1):s.visible||s.setVisible(!0))})}T(this,"afterTranslate")}update(t){t.mapData&&this.chart.mapView?.recommendMapView(this.chart,[this.chart.options.chart.map,...(this.chart.options.series||[]).map((e,i)=>i===this._i?t.mapData:e.mapData)],!0),super.update.apply(this,arguments)}}t8.defaultOptions=B(t3.defaultOptions,{affectsMapView:!0,animation:!1,dataLabels:{crop:!1,formatter:function(){let{numberFormatter:t}=this.series.chart,{value:e}=this.point;return A(e)?t(e,-1):this.point.name||""},inside:!0,overflow:!1,padding:0,verticalAlign:"middle"},linecap:"round",marker:null,nullColor:"#f7f7f7",stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}<br/>"},turboThreshold:0,allAreas:!0,borderColor:"#e6e6e6",borderWidth:1,joinBy:"hc-key",states:{hover:{halo:void 0,borderColor:"#666666",borderWidth:2},normal:{animation:!0},select:{color:"#cccccc"}},legendSymbol:"rectangle"}),w(t8.prototype,{type:"map",axisTypes:J.seriesMembers.axisTypes,colorAttribs:J.seriesMembers.colorAttribs,colorKey:J.seriesMembers.colorKey,directTouch:!0,drawDataLabels:t1,drawGraph:t1,forceDL:!0,getCenter:ti.getCenter,getExtremesFromAll:!0,getSymbol:t1,isCartesian:!1,parallelArrays:J.seriesMembers.parallelArrays,pointArrayMap:J.seriesMembers.pointArrayMap,pointClass:tu,preserveAspectRatio:!0,searchPoint:t1,trackerGroups:J.seriesMembers.trackerGroups,useMapGeometry:!0}),J.compose(t8),U().registerSeriesType("map",t8);let t7=t8;class t9 extends t7{pointAttribs(t,e){let i=super.pointAttribs(t,e);return i.fill=this.options.fillColor,i}}t9.defaultOptions=B(t7.defaultOptions,{lineWidth:1,fillColor:"none",legendSymbol:"lineMarker"}),w(t9.prototype,{type:"mapline",colorProp:"stroke",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"}}),U().registerSeriesType("mapline",t9);let{scatter:t4}=U().seriesTypes;class t5 extends t4.prototype.pointClass{isValid(){return!!(this.options.geometry||A(this.x)&&A(this.y)||A(this.options.lon)&&A(this.options.lat))}}p.d({},{});let{noop:et}=c(),{map:ee,scatter:ei}=U().seriesTypes;class eo extends ei{constructor(){super(...arguments),this.clearBounds=ee.prototype.clearBounds}drawDataLabels(){super.drawDataLabels(),this.dataLabelsGroups?.forEach(t=>{t?.clip(this.chart.clipRect)})}projectPoint(t){let e=this.chart.mapView;if(e){let{geometry:i,lon:o,lat:s}=t,r=i&&"Point"===i.type&&i.coordinates;if(A(o)&&A(s)&&(r=[o,s]),r)return e.lonLatToProjectedUnits({lon:r[0],lat:r[1]})}}translate(){let t=this.chart.mapView;if(this.generatePoints(),this.getProjectedBounds&&this.isDirtyData&&(delete this.bounds,this.getProjectedBounds()),t){let e=t.getSVGTransform(),{hasCoordinates:i}=t.projection;this.points.forEach(o=>{let s,{x:r,y:n}=o,a=A(o.insetIndex)&&t.insets[o.insetIndex].getSVGTransform()||e,l=this.projectPoint(o.options)||o.properties&&this.projectPoint(o.properties);if(l?(r=l.x,n=l.y):o.bounds&&(r=o.bounds.midX,n=o.bounds.midY,a&&A(r)&&A(n)&&(o.plotX=r*a.scaleX+a.translateX,o.plotY=n*a.scaleY+a.translateY,s=!0)),A(r)&&A(n)){if(!s){let e=t.projectedUnitsToPixels({x:r,y:n});o.plotX=e.x,o.plotY=i?e.y:this.chart.plotHeight-e.y}}else o.y=o.plotX=o.plotY=void 0;o.isInside=this.isPointInside(o),o.zone=this.zones.length?o.getZone():void 0})}T(this,"afterTranslate")}}eo.defaultOptions=B(ei.defaultOptions,{dataLabels:{crop:!1,defer:!1,enabled:!0,formatter:function(){return this.point.name},overflow:!1,style:{color:"#000000"}},legendSymbol:"lineMarker",stickyTracking:!0,tooltip:{pointFormat:"{#if point.name}{point.name}{else}Lat: {point.lat}, Lon: {point.lon}{/if}"}}),tn().prototype.symbols.mapmarker=(t,e,i,o,s)=>{let r,n,a=s&&"legend"===s.context;a?(r=t+i/2,n=e+o):s&&"number"==typeof s.anchorX&&"number"==typeof s.anchorY?(r=s.anchorX,n=s.anchorY):(r=t+i/2,n=e+o/2,e-=o);let l=a?o/3:o/2;return[["M",r,n],["C",r,n,r-l,e+1.5*l,r-l,e+l],["A",l,l,1,1,1,r+l,e+l],["C",r+l,e+1.5*l,r,n,r,n],["Z"]]},w(eo.prototype,{type:"mappoint",axisTypes:["colorAxis"],forceDL:!0,isCartesian:!1,pointClass:t5,searchPoint:et,useMapGeometry:!0}),U().registerSeriesType("mappoint",eo);let es={borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0},{noop:er}=c(),en=class{constructor(t,e){this.setState=er,this.init(t,e)}init(t,e){this.options=t,this.visible=!0,this.chart=e.chart,this.legend=e}addToLegend(t){t.splice(this.options.legendIndex,0,this)}drawLegendSymbol(t){let e,i=O(t.options.itemDistance,20),o=this.legendItem||{},s=this.options,r=s.ranges,n=s.connectorDistance;if(!r||!r.length||!A(r[0].value)){t.options.bubbleLegend.autoRanges=!0;return}!function(t,e){let i,o,s=t.length;for(o=0;o<s;o++)t[o].safeI=o;for(t.sort(function(t,o){return 0===(i=e(t,o))?t.safeI-o.safeI:i}),o=0;o<s;o++)delete t[o].safeI}(r,function(t,e){return e.value-t.value}),this.ranges=r,this.setOptions(),this.render();let a=this.getMaxLabelSize(),l=this.ranges[0].radius,h=2*l;e=(e=n-l+a.width)>0?e:0,this.maxLabel=a,this.movementX="left"===s.labels.align?e:0,o.labelWidth=h+e+i,o.labelHeight=h+a.height/2}setOptions(){let t=this.ranges,e=this.options,i=this.chart.series[e.seriesIndex],o=this.legend.baseline,s={zIndex:e.zIndex,"stroke-width":e.borderWidth},r={zIndex:e.zIndex,"stroke-width":e.connectorWidth},n={align:this.legend.options.rtl||"left"===e.labels.align?"right":"left",zIndex:e.zIndex},a=i.options.marker.fillOpacity,l=this.chart.styledMode;t.forEach(function(h,p){l||(s.stroke=O(h.borderColor,e.borderColor,i.color),s.fill=h.color||e.color,s.fill||(s.fill=i.color,s["fill-opacity"]=a??1),r.stroke=O(h.connectorColor,e.connectorColor,i.color)),t[p].radius=this.getRangeRadius(h.value),t[p]=B(t[p],{center:t[0].radius-t[p].radius+o}),l||B(!0,t[p],{bubbleAttribs:B(s),connectorAttribs:B(r),labelAttribs:n})},this)}getRangeRadius(t){let e=this.options,i=this.options.seriesIndex,o=this.chart.series[i],s=e.ranges[0].value,r=e.ranges[e.ranges.length-1].value,n=e.minSize,a=e.maxSize;return o.getRadius.call(this,r,s,n,a,t)}render(){let t=this.legendItem||{},e=this.chart.renderer,i=this.options.zThreshold;for(let o of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),t.symbol=e.g("bubble-legend"),t.label=e.g("bubble-legend-item").css(this.legend.itemStyle||{}),t.symbol.translateX=0,t.symbol.translateY=0,t.symbol.add(t.label),t.label.add(t.group),this.ranges))o.value>=i&&this.renderRange(o);this.hideOverlappingLabels()}renderRange(t){let e=this.ranges[0],i=this.legend,o=this.options,s=o.labels,r=this.chart,n=r.series[o.seriesIndex],a=r.renderer,l=this.symbols,h=l.labels,p=t.center,d=Math.abs(t.radius),c=o.connectorDistance||0,u=s.align,m=i.options.rtl,g=o.borderWidth,f=o.connectorWidth,b=e.radius||0,y=p-d-g/2+f/2,x=(y%1?1:.5)-(f%2?0:.5),M=a.styledMode,v=m||"left"===u?-c:c;"center"===u&&(v=0,o.connectorDistance=0,t.labelAttribs.align="center"),l.bubbleItems.push(a.circle(b,p+x,d).attr(M?{}:t.bubbleAttribs).addClass((M?"highcharts-color-"+n.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(o.className||"")).add(this.legendItem.symbol)),l.connectors.push(a.path(a.crispLine([["M",b,y],["L",b+v,y]],o.connectorWidth)).attr(M?{}:t.connectorAttribs).addClass((M?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(o.connectorClassName||"")).add(this.legendItem.symbol));let w=a.text(this.formatLabel(t)).attr(M?{}:t.labelAttribs).css(M?{}:s.style).addClass("highcharts-bubble-legend-labels "+(o.labels.className||"")).add(this.legendItem.symbol),T={x:b+v+o.labels.x,y:y+o.labels.y+.4*w.getBBox().height};w.attr(T),h.push(w),w.placed=!0,w.alignAttr=T}getMaxLabelSize(){let t,e;return this.symbols.labels.forEach(function(i){e=i.getBBox(!0),t=t?e.width>t.width?e:t:e}),t||{}}formatLabel(t){let e=this.options,i=e.labels.formatter,o=e.labels.format,{numberFormatter:s}=this.chart;return o?tf().format(o,t,this.chart):i?i.call(t,t):s(t.value,1)}hideOverlappingLabels(){let t=this.chart,e=this.options.labels.allowOverlap,i=this.symbols;!e&&i&&(t.hideOverlappingLabels(i.labels),i.labels.forEach(function(t,e){t.newOpacity?t.newOpacity!==t.oldOpacity&&i.connectors[e].show():i.connectors[e].hide()}))}getRanges(){let t=this.legend.bubbleLegend,e=t.chart.series,i=t.options.ranges,o,s,r=Number.MAX_VALUE,n=-Number.MAX_VALUE;return e.forEach(function(t){t.isBubble&&!t.ignoreSeries&&(s=t.getColumn("z").filter(A)).length&&(r=O(t.options.zMin,Math.min(r,Math.max(b(s),!1===t.options.displayNegative?t.options.zThreshold:-Number.MAX_VALUE))),n=O(t.options.zMax,Math.max(n,y(s))))}),o=r===n?[{value:n}]:[{value:r},{value:(r+n)/2},{value:n,autoRanges:!0}],i.length&&i[0].radius&&o.reverse(),o.forEach(function(t,e){i&&i[e]&&(o[e]=B(i[e],t))}),o}predictBubbleSizes(){let t=this.chart,e=t.legend.options,i=e.floating,o="horizontal"===e.layout,s=o?t.legend.lastLineHeight:0,r=t.plotSizeX,n=t.plotSizeY,a=t.series[this.options.seriesIndex],l=a.getPxExtremes(),h=Math.ceil(l.minPxSize),p=Math.ceil(l.maxPxSize),d=Math.min(n,r),c,u=a.options.maxSize;return i||!/%$/.test(u)?c=p:(c=(d+s)*(u=parseFloat(u))/100/(u/100+1),(o&&n-c>=r||!o&&r-c>=n)&&(c=p)),[h,Math.ceil(c)]}updateRanges(t,e){let i=this.legend.options.bubbleLegend;i.minSize=t,i.maxSize=e,i.ranges=this.getRanges()}correctSizes(){let t=this.legend,e=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(e.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,e.maxPxSize),t.render())}},{setOptions:ea}=c(),{composed:el}=c();function eh(t,e,i){let o,s,r,n=this.legend,a=ep(this)>=0;n&&n.options.enabled&&n.bubbleLegend&&n.options.bubbleLegend.autoRanges&&a?(o=n.bubbleLegend.options,s=n.bubbleLegend.predictBubbleSizes(),n.bubbleLegend.updateRanges(s[0],s[1]),o.placed||(n.group.placed=!1,n.allItems.forEach(t=>{(r=t.legendItem||{}).group&&(r.group.translateY=void 0)})),n.render(),o.placed||(this.getMargins(),this.axes.forEach(t=>{t.setScale(),t.updateNames(),E(t.ticks,function(t){t.isNew=!0,t.isNewLabel=!0})}),this.getMargins()),o.placed=!0,t.call(this,e,i),n.bubbleLegend.correctSizes()):(t.call(this,e,i),n&&n.options.enabled&&n.bubbleLegend&&n.render())}function ep(t){let e=t.series,i=0;for(;i<e.length;){if(e[i]&&e[i].isBubble&&e[i].visible&&e[i].dataTable.rowCount)return i;i++}return -1}function ed(t){let e=this.bubbleLegend,i=this.options,o=i.bubbleLegend,s=ep(this.chart);e&&e.ranges&&e.ranges.length&&(o.ranges.length&&(o.autoRanges=!!o.ranges[0].autoRanges),this.destroyItem(e)),s>=0&&i.enabled&&o.enabled&&(o.seriesIndex=s,this.bubbleLegend=new en(o,this),this.bubbleLegend.addToLegend(t.allItems))}function ec(){if(this.bubbleLegend){let t=this.allItems,e=this.options.rtl,i=function(t){let e=t.allItems,i=[],o=e.length,s,r,n,a=0,l=0;for(a=0;a<o;a++)if(r=e[a].legendItem||{},n=(e[a+1]||{}).legendItem||{},r.labelHeight&&(e[a].itemHeight=r.labelHeight),e[a]===e[o-1]||r.y!==n.y){for(i.push({height:0}),s=i[i.length-1];l<=a;l++)e[l].itemHeight>s.height&&(s.height=e[l].itemHeight);s.step=a}return i}(this),o,s,r,n,a=0;t.forEach((t,l)=>{(n=t.legendItem||{}).group&&(o=n.group.translateX||0,s=n.y||0,((r=t.movementX)||e&&t.ranges)&&(r=e?o-t.options.maxSize/2:o+r,n.group.attr({translateX:r})),l>i[a].step&&a++,n.group.attr({translateY:Math.round(s+i[a].height/2)}),n.y=s+i[a].height/2)})}}function eu(t){let e;if(t.defaultPrevented)return!1;let i=t.legendItem,o=this.chart,s=i.visible;this&&this.bubbleLegend&&(i.visible=!s,i.ignoreSeries=s,e=ep(o)>=0,this.bubbleLegend.visible!==e&&(this.update({bubbleLegend:{enabled:e}}),this.bubbleLegend.visible=e),i.visible=s)}let em=function(t,e){S(el,"Series.BubbleLegend")&&(ea({legend:{bubbleLegend:es}}),I(t.prototype,"drawChartBox",eh),f(e,"afterGetAllItems",ed),f(e,"afterRender",ec),f(e,"itemClick",eu))},eg=e.default.Point;var ef=p.n(eg);let{seriesTypes:{scatter:{prototype:{pointClass:eb}}}}=U();class ey extends eb{haloPath(t){let e=(t&&this.marker&&this.marker.radius||0)+t;if(this.series.chart.inverted){let t=this.pos()||[0,0],{xAxis:i,yAxis:o,chart:s}=this.series,r=2*e;return s.renderer.symbols.circle((i?.len||0)-t[1]-e,(o?.len||0)-t[0]-e,r,r)}return ef().prototype.haloPath.call(this,e)}}w(ey.prototype,{ttBelow:!1});let ex=ey,{composed:eM,noop:ev}=c(),{series:ew,seriesTypes:{column:{prototype:eT},scatter:eP}}=U();function ej(){let t=this.len,{coll:e,isXAxis:i,min:o}=this,s=(this.max||0)-(o||0),r=0,n=t,a=t/s,l;("xAxis"===e||"yAxis"===e)&&(this.series.forEach(t=>{if(t.bubblePadding&&t.reserveSpace()){this.allowZoomOutside=!0,l=!0;let e=t.getColumn(i?"x":"y");if(i&&((t.onPoint||t).getRadii(0,0,t),t.onPoint&&(t.radii=t.onPoint.radii)),s>0){let i=e.length;for(;i--;)if(A(e[i])&&this.dataMin<=e[i]&&e[i]<=this.max){let s=t.radii&&t.radii[i]||0;r=Math.min((e[i]-o)*a-s,r),n=Math.max((e[i]-o)*a+s,n)}}}}),l&&s>0&&!this.logarithmic&&(n-=t,a*=(t+Math.max(0,r)-Math.min(n,t))/t,[["min","userMin",r],["max","userMax",n]].forEach(t=>{void 0===O(this.options[t[0]],this[t[1]])&&(this[t[0]]+=t[2]/a)})))}function eL(){let{ticks:t,tickPositions:e,dataMin:i=0,dataMax:o=0,categories:s}=this,r=this.options.type;if((s?.length||"category"===r)&&this.series.find(t=>t.bubblePadding)){let s=e.length;for(;s--;){let r=t[e[s]],n=r.pos||0;(n>o||n<i)&&r.label?.hide()}}}class eC extends eP{static compose(t,e,i){em(e,i),S(eM,"Series.Bubble")&&(f(t,"foundExtremes",ej),f(t,"afterRender",eL))}animate(t){!t&&this.points.length<this.options.animationLimit&&this.points.forEach(function(t){let{graphic:e,plotX:i=0,plotY:o=0}=t;e&&e.width&&(this.hasRendered||e.attr({x:i,y:o,width:1,height:1}),e.animate(this.markerAttribs(t),this.options.animation))},this)}getRadii(){let t=this.getColumn("z"),e=this.getColumn("y"),i=[],o,s,r,n=this.chart.bubbleZExtremes,{minPxSize:a,maxPxSize:l}=this.getPxExtremes();if(!n){let t,e=Number.MAX_VALUE,i=-Number.MAX_VALUE;this.chart.series.forEach(o=>{if(o.bubblePadding&&o.reserveSpace()){let s=(o.onPoint||o).getZExtremes();s&&(e=Math.min(O(e,s.zMin),s.zMin),i=Math.max(O(i,s.zMax),s.zMax),t=!0)}}),t?(n={zMin:e,zMax:i},this.chart.bubbleZExtremes=n):n={zMin:0,zMax:0}}for(s=0,o=t.length;s<o;s++)r=t[s],i.push(this.getRadius(n.zMin,n.zMax,a,l,r,e&&e[s]));this.radii=i}getRadius(t,e,i,o,s,r){let n=this.options,a="width"!==n.sizeBy,l=n.zThreshold,h=e-t,p=.5;if(null===r||null===s)return null;if(A(s)){if(n.sizeByAbsoluteValue&&(s=Math.abs(s-l),e=h=Math.max(e-l,Math.abs(t-l)),t=0),s<t)return i/2-1;h>0&&(p=(s-t)/h)}return a&&p>=0&&(p=Math.sqrt(p)),Math.ceil(i+p*(o-i))/2}hasData(){return!!this.dataTable.rowCount}markerAttribs(t,e){let i=super.markerAttribs(t,e),{height:o=0,width:s=0}=i;return this.chart.inverted?w(i,{x:(t.plotX||0)-s/2,y:(t.plotY||0)-o/2}):i}pointAttribs(t,e){let i=this.options.marker,o=i?.fillOpacity,s=ew.prototype.pointAttribs.call(this,t,e);return s["fill-opacity"]=o??1,s}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:t,options:e,radii:i}=this,{minPxSize:o}=this.getPxExtremes(),s=t.length;for(;s--;){let r=t[s],n=i?i[s]:0;"z"===this.zoneAxis&&(r.negative=(r.z||0)<(e.zThreshold||0)),A(n)&&(r.marker=w(r.marker,{radius:n,width:2*n,height:2*n})),A(n)&&n>=o/2?r.dlBox={x:r.plotX-n,y:r.plotY-n,width:2*n,height:2*n}:(r.shapeArgs=r.plotY=r.dlBox=void 0,r.isInside=!1)}}getPxExtremes(){let t=Math.min(this.chart.plotWidth,this.chart.plotHeight),e=e=>{let i;return"string"==typeof e&&(i=/%$/.test(e),e=parseInt(e,10)),i?t*e/100:e},i=e(O(this.options.minSize,8)),o=Math.max(e(O(this.options.maxSize,"20%")),i);return{minPxSize:i,maxPxSize:o}}getZExtremes(){let t=this.options,e=this.getColumn("z").filter(A);if(e.length){let i=O(t.zMin,x(b(e),!1===t.displayNegative?t.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),o=O(t.zMax,y(e));if(A(i)&&A(o))return{zMin:i,zMax:o}}}searchKDTree(t,e,i,o=ev,s=ev){return o=(t,e,i)=>{let o=t[i]||0,s=e[i]||0,r,n=!1;return o===s?r=t.index>e.index?t:e:o<0&&s<0?(r=o-(t.marker?.radius||0)>=s-(e.marker?.radius||0)?t:e,n=!0):r=o<s?t:e,[r,n]},s=(t,e,i)=>!i&&t>e||t<e,super.searchKDTree(t,e,i,o,s)}}eC.defaultOptions=B(eP.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:t}=this.series.chart,{z:e}=this.point;return A(e)?t(e,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),w(eC.prototype,{alignDataLabel:eT.alignDataLabel,applyZones:ev,bubblePadding:!0,isBubble:!0,keysAffectYAxis:["y"],pointArrayMap:["y","z"],pointClass:ex,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),f(eC,"updatedData",t=>{delete t.target.chart.bubbleZExtremes}),f(eC,"remove",t=>{delete t.target.chart.bubbleZExtremes}),f(eC,"update",t=>{let e=t.target.options;(v(e.zMin)||v(e.zMax))&&delete t.target.chart.bubbleZExtremes}),U().registerSeriesType("bubble",eC);let eA=eC,{seriesTypes:{map:{prototype:{pointClass:{prototype:ek}}}}}=U();class ez extends ex{isValid(){return"number"==typeof this.z}}w(ez.prototype,{applyOptions:ek.applyOptions,getProjectedBounds:ek.getProjectedBounds});let{seriesTypes:{map:{prototype:eB},mappoint:{prototype:eE}}}=U();class eO extends eA{constructor(){super(...arguments),this.clearBounds=eB.clearBounds}searchPoint(t,e){return this.searchKDTree({plotX:t.chartX-this.chart.plotLeft,plotY:t.chartY-this.chart.plotTop},e,t)}translate(){eE.translate.call(this),this.getRadii(),this.translateBubble()}}eO.defaultOptions=B(eA.defaultOptions,{lineWidth:0,animationLimit:500,joinBy:"hc-key",tooltip:{pointFormat:"{point.name}: {point.z}"},stickyTracking:!0}),w(eO.prototype,{type:"mapbubble",axisTypes:["colorAxis"],getProjectedBounds:eB.getProjectedBounds,isCartesian:!1,pointArrayMap:["z"],pointClass:ez,processData:eB.processData,projectPoint:eE.projectPoint,kdAxisArray:["plotX","plotY"],setData:eB.setData,setOptions:eB.setOptions,updateData:eB.updateData,useMapGeometry:!0,xyFromShape:!0}),U().registerSeriesType("mapbubble",eO);let eS=e.default.Color;var eD=p.n(eS);let{scatter:{prototype:{pointClass:eI}}}=U().seriesTypes;class eV extends eI{applyOptions(t,e){return(this.isNull||null===this.value)&&delete this.color,super.applyOptions(t,e),this.formatPrefix=this.isNull||null===this.value?"null":"point",this}getCellAttributes(){let t=this.series,e=t.options,i=(e.colsize||1)/2,o=(e.rowsize||1)/2,s=t.xAxis,r=t.yAxis,n=this.options.marker||t.options.marker,a=t.pointPlacementToXValue(),l=O(this.pointPadding,e.pointPadding,0),h={x1:x(Math.round(s.len-s.translate(this.x-i,!1,!0,!1,!0,-a)),-s.len,2*s.len),x2:x(Math.round(s.len-s.translate(this.x+i,!1,!0,!1,!0,-a)),-s.len,2*s.len),y1:x(Math.round(r.translate(this.y-o,!1,!0,!1,!0)),-r.len,2*r.len),y2:x(Math.round(r.translate(this.y+o,!1,!0,!1,!0)),-r.len,2*r.len)};for(let t of[["width","x"],["height","y"]]){let e=t[0],i=t[1],o=i+"1",a=i+"2",p=Math.abs(h[o]-h[a]),d=n&&n.lineWidth||0,c=Math.abs(h[o]+h[a])/2,u=n&&n[e];if(v(u)&&u<p){let t=u/2+d/2;h[o]=c-t,h[a]=c+t}l&&(("x"===i&&s.reversed||"y"===i&&!r.reversed)&&(o=a,a=i+"1"),h[o]+=l,h[a]-=l)}return h}haloPath(t){if(!t)return[];let{x:e=0,y:i=0,width:o=0,height:s=0}=this.shapeArgs||{};return[["M",e-t,i-t],["L",e-t,i+s+t],["L",e+o+t,i+s+t],["L",e+o+t,i-t],["Z"]]}isValid(){return this.value!==1/0&&this.value!==-1/0}}w(eV.prototype,{dataLabelOnNull:!0,moveToTopOnHover:!0,ttBelow:!1});let{doc:eX}=c(),{series:eN,seriesTypes:{column:eR,scatter:eG}}=U(),{prototype:{symbols:eF}}=tn(),{colorFromPoint:eY,getContext:eZ}={colorFromPoint:function(t,e){let i=e.series.colorAxis;if(i){let o=i.toColor(t||0,e).split(")")[0].split("(")[1].split(",").map(t=>O(parseFloat(t),parseInt(t,10)));return o[3]=255*O(o[3],1),v(t)&&e.visible||(o[3]=0),o}return[0,0,0,0]},getContext:function(t){let{canvas:e,context:i}=t;return e&&i?.clearRect?(i.clearRect(0,0,e.width,e.height),i):(t.canvas=eX.createElement("canvas"),t.context=t.canvas.getContext("2d",{willReadFrequently:!0})||void 0,t.context)}};class eW extends eG{constructor(){super(...arguments),this.valueMax=NaN,this.valueMin=NaN,this.isDirtyCanvas=!0}drawPoints(){let t=this,e=t.options,i=e.interpolation,o=e.marker||{};if(i){let{image:e,chart:i,xAxis:o,yAxis:s}=t,{reversed:r=!1,len:n}=o,{reversed:a=!1,len:l}=s,h={width:n,height:l};if(!e||t.isDirtyData||t.isDirtyCanvas){let n=eZ(t),{canvas:l,options:{colsize:p=1,rowsize:d=1},points:c,points:{length:u}}=t,m=i.colorAxis&&i.colorAxis[0];if(l&&n&&m){let{min:m,max:g}=o.getExtremes(),{min:f,max:b}=s.getExtremes(),y=g-m,x=b-f,M=Math.round(y/p/8*8),v=Math.round(x/d/8*8),[w,T]=[[M,M/y,r,"ceil"],[v,v/x,!a,"floor"]].map(([t,e,i,o])=>i?i=>Math[o](t-e*i):t=>Math[o](e*t)),P=l.width=M+1,j=P*(l.height=v+1),L=(u-1)/j,C=new Uint8ClampedArray(4*j),A=(t,e)=>4*Math.ceil(P*T(e-f)+w(t-m));t.buildKDTree();for(let t=0;t<j;t++){let e=c[Math.ceil(L*t)],{x:i,y:o}=e;C.set(eY(e.value,e),A(i,o))}n.putImageData(new ImageData(C,P),0,0),e?e.attr({...h,href:l.toDataURL("image/png",1)}):(t.directTouch=!1,t.image=i.renderer.image(l.toDataURL("image/png",1)).attr(h).add(t.group))}t.isDirtyCanvas=!1}else(e.width!==n||e.height!==l)&&e.attr(h)}else(o.enabled||t._hasPointMarkers)&&(eN.prototype.drawPoints.call(t),t.points.forEach(e=>{e.graphic&&(e.graphic[t.chart.styledMode?"css":"animate"](t.colorAttribs(e)),null===e.value&&e.graphic.addClass("highcharts-null-point"))}))}getExtremes(){let{dataMin:t,dataMax:e}=eN.prototype.getExtremes.call(this,this.getColumn("value"));return A(t)&&(this.valueMin=t),A(e)&&(this.valueMax=e),eN.prototype.getExtremes.call(this)}getValidPoints(t,e){return eN.prototype.getValidPoints.call(this,t,e,!0)}hasData(){return!!this.dataTable.rowCount}init(){super.init.apply(this,arguments);let t=this.options;t.pointRange=O(t.pointRange,t.colsize||1),this.yAxis.axisPointRange=t.rowsize||1,eF.ellipse=eF.circle,t.marker&&A(t.borderRadius)&&(t.marker.r=t.borderRadius);let e=this.canvas=document.createElement("canvas");e&&(this.context=e?.getContext("webgpu"))}markerAttribs(t,e){let i=t.shapeArgs||{};if(t.hasImage)return{x:t.plotX,y:t.plotY};if(e&&"normal"!==e){let o=t.options.marker||{},s=this.options.marker||{},r=s.states?.[e]||{},n=o.states?.[e]||{},a=(n.width||r.width||i.width||0)+(n.widthPlus||r.widthPlus||0),l=(n.height||r.height||i.height||0)+(n.heightPlus||r.heightPlus||0);return{x:(i.x||0)+((i.width||0)-a)/2,y:(i.y||0)+((i.height||0)-l)/2,width:a,height:l}}return i}pointAttribs(t,e){let i=eN.prototype.pointAttribs.call(this,t,e),o=this.options||{},s=this.chart.options.plotOptions||{},r=s.series||{},n=s.heatmap||{},a=t?.options.borderColor||o.borderColor||n.borderColor||r.borderColor,l=t?.options.borderWidth||o.borderWidth||n.borderWidth||r.borderWidth||i["stroke-width"];if(i.stroke=t?.marker?.lineColor||o.marker?.lineColor||a||this.color,i["stroke-width"]=l,e&&"normal"!==e){let s=B(o.states?.[e],o.marker?.states?.[e],t?.options.marker?.states?.[e]||{});i.fill=s.color||eD().parse(i.fill).brighten(s.brightness||0).get(),i.stroke=s.lineColor||i.stroke}return i}translate(){let{borderRadius:t,marker:e}=this.options,i=e?.symbol||"rect",o=eF[i]?i:"rect",s=-1!==["circle","square"].indexOf(o);for(let e of(this.generatePoints(),this.points)){let r=e.getCellAttributes(),n=Math.min(r.x1,r.x2),a=Math.min(r.y1,r.y2),l=Math.max(Math.abs(r.x2-r.x1),0),h=Math.max(Math.abs(r.y2-r.y1),0);if(e.hasImage=0===(e.marker?.symbol||i||"").indexOf("url"),s){let t=Math.abs(l-h);n=Math.min(r.x1,r.x2)+(l<h?0:t/2),a=Math.min(r.y1,r.y2)+(l<h?t/2:0),l=h=Math.min(l,h)}e.hasImage&&(e.marker={width:l,height:h}),e.plotX=e.clientX=(r.x1+r.x2)/2,e.plotY=(r.y1+r.y2)/2,e.shapeType="path",e.shapeArgs=B(!0,{x:n,y:a,width:l,height:h},{d:eF[o](n,a,l,h,{r:A(t)?t:0})})}T(this,"afterTranslate")}}eW.defaultOptions=B(eG.defaultOptions,{animation:!1,borderRadius:0,borderWidth:0,interpolation:!1,nullColor:"#f7f7f7",dataLabels:{formatter:function(){let{numberFormatter:t}=this.series.chart,{value:e}=this.point;return A(e)?t(e,-1):""},inside:!0,verticalAlign:"middle",crop:!1,overflow:"allow",padding:0},marker:{symbol:"rect",radius:0,lineColor:void 0,states:{hover:{lineWidthPlus:0},select:{}}},clip:!0,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}<br/>"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}),f(eW,"afterDataClassLegendClick",function(){this.isDirtyCanvas=!0,this.drawPoints(),this.options.enableMouseTracking&&this.drawTracker()}),w(eW.prototype,{axisTypes:J.seriesMembers.axisTypes,colorKey:J.seriesMembers.colorKey,directTouch:!0,getExtremesFromAll:!0,keysAffectYAxis:["y"],parallelArrays:J.seriesMembers.parallelArrays,pointArrayMap:["y","value"],pointClass:eV,specialGroup:"group",trackerGroups:J.seriesMembers.trackerGroups,alignDataLabel:eR.prototype.alignDataLabel,colorAttribs:J.seriesMembers.colorAttribs,getSymbol:eN.prototype.getSymbol}),J.compose(eW),U().registerSeriesType("heatmap",eW);let eU=c();eU.ColorMapComposition=J,eU.MapChart=eU.MapChart||th,eU.MapNavigation=eU.MapNavigation||Z,eU.MapView=eU.MapView||tK,eU.Projection=eU.Projection||tY,eU.mapChart=eU.Map=eU.MapChart.mapChart,eU.maps=eU.MapChart.maps,eU.geojson=tx.geojson,eU.topo2geo=tx.topo2geo,tx.compose(eU.Chart),eO.compose(eU.Axis,eU.Chart,eU.Legend),Z.compose(th,eU.Pointer,eU.SVGRenderer),tK.compose(th);let e_=c();export{e_ as default};