!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/tiledwebmap
 * @requires highcharts
 *
 * (c) 2009-2026
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/tiledwebmap",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/tiledwebmap"]=t(e._Highcharts,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t)=>(()=>{"use strict";var o={512:e=>{e.exports=t},944:t=>{t.exports=e}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return o[e](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s={};i.d(s,{default:()=>S});var a=i(944),n=i.n(a);let l={Esri:class{constructor(){this.defaultCredits="Tiles &copy; Esri &mdash; Source: Esri, DeLorme, NAVTEQ, USGS,  Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012",this.initialProjectionName="WebMercator",this.themes={WorldStreetMap:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:20},DeLorme:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}",minZoom:1,maxZoom:11,credits:"Tiles &copy; Esri &mdash; Copyright: &copy;2012 DeLorme"},WorldTopoMap:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:20,credits:"Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"},WorldImagery:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:20,credits:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"},WorldTerrain:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:13,credits:"Tiles &copy; Esri &mdash; Source: USGS, Esri, TANA, DeLorme, and NPS"},WorldShadedRelief:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:13,credits:"Tiles &copy; Esri &mdash; Source: Esri"},WorldPhysical:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:8,credits:"Tiles &copy; Esri &mdash; Source: US National Park Service"},NatGeoWorldMap:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:16,credits:"Tiles &copy; Esri &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"},WorldGrayCanvas:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:16,credits:"Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ"}}}},LimaLabs:class{constructor(){this.defaultCredits='Map data &copy;2023 <a href="https://maps.lima-labs.com/">LimaLabs</a>',this.initialProjectionName="WebMercator",this.requiresApiKey=!0,this.themes={Standard:{url:"https://cdn.lima-labs.com/{zoom}/{x}/{y}.png?api={apikey}",minZoom:0,maxZoom:20}}}},OpenStreetMap:class{constructor(){this.defaultCredits='Map data &copy2023 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',this.initialProjectionName="WebMercator",this.subdomains=["a","b","c"],this.themes={Standard:{url:"https://tile.openstreetmap.org/{zoom}/{x}/{y}.png",minZoom:0,maxZoom:19},Hot:{url:"https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",minZoom:0,maxZoom:19},OpenTopoMap:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",minZoom:0,maxZoom:17,credits:`Map data: &copy; <a href="https://www.openstreetmap.org/copyright">
                OpenStreetMap</a> contributors, <a href="https://viewfinderpanoramas.org">SRTM</a> 
                | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> 
                (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)`}}}},Stamen:class{constructor(){this.defaultCredits='&copy; Map tiles by <a href="https://stamen.com">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="https://openstreetmap.org">OpenStreetMap</a>, under <a href="https://www.openstreetmap.org/copyright">ODbL</a>',this.initialProjectionName="WebMercator",this.subdomains=["a","b","c","d"],this.themes={Toner:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png",minZoom:0,maxZoom:20},TonerBackground:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner-background/{z}/{x}/{y}.png",minZoom:0,maxZoom:20},TonerLite:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",minZoom:0,maxZoom:20},Terrain:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png",minZoom:0,maxZoom:18},TerrainBackground:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}.png",minZoom:0,maxZoom:18},Watercolor:{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png",minZoom:1,maxZoom:16,credits:'&copy Map tiles by <a href="https://stamen.com">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="https://openstreetmap.org">OpenStreetMap</a>, under <a href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'}}}},Thunderforest:class{constructor(){this.defaultCredits='Maps &copy <a href="https://www.thunderforest.com">Thunderforest</a>, Data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>',this.initialProjectionName="WebMercator",this.requiresApiKey=!0,this.subdomains=["a","b","c"],this.themes={OpenCycleMap:{url:"https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},Transport:{url:"https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},TransportDark:{url:"https://{s}.tile.thunderforest.com/transport-dark/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},SpinalMap:{url:"https://{s}.tile.thunderforest.com/spinal-map/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},Landscape:{url:"https://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},Outdoors:{url:"https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},Pioneer:{url:"https://{s}.tile.thunderforest.com/pioneer/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},MobileAtlas:{url:"https://{s}.tile.thunderforest.com/mobile-atlas/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22},Neighbourhood:{url:"https://{s}.tile.thunderforest.com/neighbourhood/{z}/{x}/{y}.png?apikey={apikey}",minZoom:0,maxZoom:22}}}},USGS:class{constructor(){this.defaultCredits='Tiles courtesy of the <a href="https://usgs.gov/">U.S. GeologicalSurvey</a>',this.initialProjectionName="WebMercator",this.themes={USTopo:{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:20},USImagery:{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:20},USImageryTopo:{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",minZoom:0,maxZoom:20}}}}};var p=i(512),m=i.n(p);let{doc:c,win:h}=n();function d(e){return null!=e}function u(e){return y(e)&&"number"==typeof e.nodeType}function y(e,t){let o;return!!e&&"object"==typeof e&&(!t||"[object Array]"!==(o=Object.prototype.toString.call(e))&&"[object Array Iterator]"!==o)}Array.prototype.find;function f(){let e=arguments,t=e.length;for(let o=0;o<t;o++){let t=e[o];if(null!=t)return t}}let{composed:g}=n(),{map:x}=m().seriesTypes;function M(e){let{geoBounds:t,chart:o}=e,r=(o.options.series||[]).filter(e=>"tiledwebmap"===e.type)[0];if(r&&r.provider&&r.provider.type&&!r.provider.url){let e=l[r.provider.type];if(d(e)){let{initialProjectionName:o}=new e;if(t){let{x1:e,y1:r,x2:i,y2:s}=t;this.recommendedMapView={projection:{name:o,parallels:[r,s],rotation:[-(e+i)/2]}}}else this.recommendedMapView={projection:{name:o},minZoom:0};return!1}(0,a.error)("Highcharts warning: Tiles Provider not defined in the Provider Registry.",!1)}return!0}class v extends x{constructor(){super(...arguments),this.redrawTiles=!1,this.isAnimating=!1}static compose(e){0>g.indexOf("TiledWebMapSeries")&&g.push("TiledWebMapSeries")&&function(e,t,o,r={}){let i="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(i,"hcEvents")||(i.hcEvents={});let s=i.hcEvents;n().Point&&e instanceof n().Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let a=e.addEventListener;a&&a.call(e,t,o,!!n().supportsPassiveEvents&&{passive:void 0===r.passive?-1!==t.indexOf("touch"):r.passive,capture:!1}),s[t]||(s[t]=[]);let l={fn:o,order:"number"==typeof r.order?r.order:1/0};s[t].push(l),s[t].sort((e,t)=>e.order-t.order)}(e,"onRecommendMapView",M)}lonLatToTile(e,t){let{lon:o,lat:r}=e;return{x:Math.floor((o+180)/360*Math.pow(2,t)),y:Math.floor((1-Math.log(Math.tan(r*Math.PI/180)+1/Math.cos(r*Math.PI/180))/Math.PI)/2*Math.pow(2,t))}}tileToLonLat(e,t,o){let r=e/Math.pow(2,o)*360-180,i=Math.PI-2*Math.PI*t/Math.pow(2,o);return{lon:r,lat:180/Math.PI*Math.atan(.5*(Math.exp(i)-Math.exp(-i)))}}drawPoints(){let e=this.chart,t=e.mapView;if(!t)return;let o=this.tiles=this.tiles||{},r=this.transformGroups=this.transformGroups||[],i=this,s=this.options.provider,{zoom:n}=t,p=f(t.projection.options.rotation&&t.projection.options.rotation[0],0),m=200*!e.renderer.forExport,c=e=>{for(let r of Object.keys(o))parseFloat(r)===(t.zoom<0?0:Math.floor(t.zoom))||i.minZoom&&(t.zoom<0?0:Math.floor(t.zoom))<i.minZoom&&parseFloat(r)===i.minZoom||i.maxZoom&&(t.zoom<0?0:Math.floor(t.zoom))>i.maxZoom&&parseFloat(r)===i.maxZoom?Object.keys(o[r].tiles).forEach((t,i)=>{o[r].tiles[t].animate({opacity:1},{duration:e},()=>{i===Object.keys(o[r].tiles).length-1&&(o[r].isActive=!0)})}):Object.keys(o[r].tiles).forEach((t,i)=>{o[r].tiles[t].animate({opacity:0},{duration:e,defer:e/2},()=>{o[r].tiles[t].destroy(),delete o[r].tiles[t],i===Object.keys(o[r].tiles).length-1&&(o[r].isActive=!1,o[r].loaded=!1)})})},h=n<0?0:Math.floor(n),u=Math.pow(2,h),y=.638436911716859*Math.pow(2,n)/(.638436911716859*Math.pow(2,h)),g=256*y;if(s&&(s.type||s.url)){if(s.type&&!s.url){let o=l[s.type];if(!d(o))return void(0,a.error)("Highcharts warning: Tiles Provider '"+s.type+"' not defined in the ProviderRegistry.",!1);let r=new o,i=r.initialProjectionName,n,p="";if(s.theme&&d(r.themes[s.theme]))n=r.themes[s.theme];else{let e=Object.keys(r.themes)[0];n=r.themes[e],(0,a.error)("Highcharts warning: The Tiles Provider's Theme '"+s.theme+"' is not defined in the Provider definition - falling back to '"+e+"'.",!1)}s.subdomain&&r.subdomains&&-1!==r.subdomains.indexOf(s.subdomain)?p=s.subdomain:d(r.subdomains)&&-1!==n.url.indexOf("{s}")&&(p=f(r.subdomains&&r.subdomains[0],""),(0,a.error)("Highcharts warning: The Tiles Provider's Subdomain '"+s.subdomain+"' is not defined in the Provider definition - falling back to '"+p+"'.",!1)),r.requiresApiKey&&(s.apiKey?n.url=n.url.replace("{apikey}",s.apiKey):((0,a.error)("Highcharts warning: The Tiles Provider requires API Key to use tiles, use provider.apiKey to provide a token.",!1),n.url=n.url.replace("?apikey={apikey}",""))),s.url=n.url.replace("{s}",p),this.minZoom=n.minZoom,this.maxZoom=n.maxZoom;let m=f(e.userOptions.credits&&e.userOptions.credits.text,"Highcharts.com "+f(n.credits,r.defaultCredits));e.credits?e.credits.update({text:m}):e.addCredits({text:m,style:f(e.options.credits?.style,{})}),t.projection.options.name!==i&&(0,a.error)("Highcharts warning: The set projection is different than supported by Tiles Provider.",!1)}else t.projection.options.name||(0,a.error)("Highcharts warning: The set projection is different than supported by Tiles Provider.",!1);if(d(this.minZoom)&&h<this.minZoom?(u=Math.pow(2,h=this.minZoom),g=256*(y=.638436911716859*Math.pow(2,n)/(.638436911716859*Math.pow(2,h)))):d(this.maxZoom)&&h>this.maxZoom&&(u=Math.pow(2,h=this.maxZoom),g=256*(y=.638436911716859*Math.pow(2,n)/(.638436911716859*Math.pow(2,h)))),t.projection&&t.projection.def){t.projection.hasCoordinates=!0,r[h]||(r[h]=e.renderer.g().add(this.group));let a=(a,n,l,p,h)=>{let d=a%u,y=n%u,f=d<0?d+u:d,x=y<0?y+u:y;if(!o[`${l}`].tiles[`${a},${n}`]&&s.url){let d,u=(d=s.url,d.replace("{x}",f.toString()).replace("{y}",x.toString()).replace("{zoom}",l.toString()).replace("{z}",l.toString()));o[l].loaded=!1,o[`${l}`].tiles[`${a},${n}`]=e.renderer.image(u,a*g-p,n*g-h,g,g).attr({zIndex:2,opacity:0}).on("load",function(){s.onload&&s.onload.apply(this),(l===(t.zoom<0?0:Math.floor(t.zoom))||l===i.minZoom)&&(o[`${l}`].actualTilesCount++,o[`${l}`].howManyTiles===o[`${l}`].actualTilesCount&&(o[l].loaded=!0,i.isAnimating?i.redrawTiles=!0:(i.redrawTiles=!1,c(m)),o[`${l}`].actualTilesCount=0))}).add(r[l]),o[`${l}`].tiles[`${a},${n}`].posX=a,o[`${l}`].tiles[`${a},${n}`].posY=n,o[`${l}`].tiles[`${a},${n}`].originalURL=u}},n=t.pixelsToProjectedUnits({x:0,y:0}),l=t.projection.def.inverse([n.x,n.y]),d={lon:l[0]-p,lat:l[1]},y=t.pixelsToProjectedUnits({x:e.plotWidth,y:e.plotHeight}),f=t.projection.def.inverse([y.x,y.y]),x={lon:f[0]-p,lat:f[1]};(d.lat>t.projection.maxLatitude||x.lat<-1*t.projection.maxLatitude)&&(d.lat=t.projection.maxLatitude,x.lat=-1*t.projection.maxLatitude);let M=this.lonLatToTile(d,h),v=this.lonLatToTile(x,h),T=this.tileToLonLat(M.x,M.y,h),S=t.projection.def.forward([T.lon+p,T.lat]),b=t.projectedUnitsToPixels({x:S[0],y:S[1]}),Z=M.x*g-b.x,w=M.y*g-b.y;o[`${h}`]||(o[`${h}`]={tiles:{},isActive:!1,howManyTiles:0,actualTilesCount:0,loaded:!1}),o[`${h}`].howManyTiles=(v.x-M.x+1)*(v.y-M.y+1),o[`${h}`].actualTilesCount=0;for(let e=M.x;e<=v.x;e++)for(let t=M.y;t<=v.y;t++)a(e,t,h,Z,w)}for(let r of Object.keys(o))for(let s of Object.keys(o[r].tiles))if(t.projection&&t.projection.def){let a=256*(.638436911716859*Math.pow(2,n)/(.638436911716859*Math.pow(2,parseFloat(r)))),l=o[r].tiles[Object.keys(o[r].tiles)[0]],{posX:u,posY:y}=o[r].tiles[s];if(d(u)&&d(y)&&d(l.posX)&&d(l.posY)){let n=this.tileToLonLat(l.posX,l.posY,parseFloat(r)),d=t.projection.def.forward([n.lon+p,n.lat]),f=t.projectedUnitsToPixels({x:d[0],y:d[1]}),g=l.posX*a-f.x,x=l.posY*a-f.y;if(e.renderer.globalAnimation&&e.hasRendered){let e=Number(o[r].tiles[s].attr("x")),t=Number(o[r].tiles[s].attr("y")),n=Number(o[r].tiles[s].attr("width")),l=Number(o[r].tiles[s].attr("height")),p=(i,p)=>{o[r].tiles[s].attr({x:e+(u*a-g-e)*p.pos,y:t+(y*a-x-t)*p.pos,width:n+(Math.ceil(a)+1-n)*p.pos,height:l+(Math.ceil(a)+1-l)*p.pos})};i.isAnimating=!0,o[r].tiles[s].attr({animator:0}).animate({animator:1},{step:p},function(){i.isAnimating=!1,i.redrawTiles&&(i.redrawTiles=!1,c(m))})}else(i.redrawTiles||parseFloat(r)!==h||(o[r].isActive||parseFloat(r)===h)&&Object.keys(o[r].tiles).map(e=>o[r].tiles[e]).some(e=>0===e.opacity))&&(i.redrawTiles=!1,c(m)),o[r].tiles[s].attr({x:u*a-g,y:y*a-x,width:Math.ceil(a)+1,height:Math.ceil(a)+1})}}}else(0,a.error)("Highcharts warning: Tiles Provider not defined in the Provider Registry.",!1)}update(e){let{transformGroups:t}=this,o=this.chart,r=o.mapView,{provider:i}=e;if(t&&(t.forEach(e=>{0!==Object.keys(e).length&&e.destroy()}),this.transformGroups=[]),r&&!d(o.userOptions.mapView?.projection)&&i?.type){let e=l[i.type];e&&r.update({projection:{name:new e().initialProjectionName}})}super.update.apply(this,arguments)}}v.defaultOptions=function(e,...t){let o,r=[e,...t],i={},s=function(e,t){return"object"!=typeof e&&(e={}),function(e,t,o){for(let o in e)Object.hasOwnProperty.call(e,o)&&t.call((0,e[o]),e[o],o,e)}(t,function(o,r){if("__proto__"!==r&&"constructor"!==r){let i;!y(o,!0)||(i=o?.constructor,y(o,!0)&&!u(o)&&i?.name&&"Object"!==i.name)||u(o)?e[r]=t[r]:e[r]=s(e[r]||{},o)}}),e};!0===e&&(i=r[1],r=Array.prototype.slice.call(r,2));let a=r.length;for(o=0;o<a;o++)i=s(i,r[o]);return i}(x.defaultOptions,{states:{inactive:{enabled:!1}}}),m().registerSeriesType("tiledwebmap",v);let T=n();T.TilesProviderRegistry=T.TilesProviderRegistry||l,v.compose(T.MapView);let S=n();return s.default})());